We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13218
    • 134 Posts
    Hi,
    atfer moving a working 2.4.2 installation to a new location, I have troubles with the media sources and the filesystem.

    - I'm using the staticsaver plugin for snippets and chunks.
    - When I edit a snippet/chunk in the manager now, there is no content. Also the pages won't get rendered, meaning the system can't read the static files/can't connect the elements in the database with the static files.
    - Non-static elements have their content as per usual.
    - To make it weirder: when I open a media source in the file tree to look at the static files, it actually shows some filenames, but not all by far.
    - When I open a file to edit from the file tree, it shows 0 bytes.
    - And weirder still: the default filesystem i.e. does show the core folder, but inside it only shows the elements and none of the other core folders, like cache, export, packages.
    - When I create a new media source with a new snippet (as static with staticsaver) and a new static file on the server, it's the same status. But the new snippet file will show up in the file tree.
    - Files on the server have the same permissions and owner as in the old, working installation, as far as I can tell.

    I have no idea where to even start. Could this be cache related? I did empty all the cache of course...

    Thanks for all ideas.

    This question has been answered by itWillBeOk. See the first response.

      @itWilllBeOK
      • 38783
      • 571 Posts
      Was the path to the static files on the original server inside or outside your web root folder?

      Looking at the video for Static Saver https://www.youtube.com/watch?v=l3ObHPfFKTM they specify that files stored outside the web root must be defined with an absolute path. If they were defined with an absolute path this could have changed when you moved the site.
        If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

        email: [email protected] | website: https://andytough.com
        • 13218
        • 134 Posts
        Thanks Andy, but in this case all media sources point inside web root. This was actually the first thing I thought to check, since usually I try to move the core outside the web root. But not in this case.
        Also, the regular file system (is this also just another media source?) has the same problems showing as the custom media sources.
          @itWilllBeOK
          • 3749
          • 24,544 Posts
          Did you run setup and manually delete all files in the core/cache directory after the move?

          Clearing the browser cache *and cookies* is often necessary after moving a site.

          Check the paths in config.inc.php, especially the connectors path.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 13218
            • 134 Posts
            Hi Bob,
            I did the whole thing. I have moved many sites successfully before and can navigate most of the pitfalls.
            The system works just fine otherwise, I can create resources, do all the usual stuff. It's only the media sources/file system that's skewed.
              @itWilllBeOK
              • 3749
              • 24,544 Posts
              Did you check the default_media_source setting? Mine shows the ID of the default media source, but the drop-down shows the names.

              Check the basePath and basePathRelative settings for that media source (or the media source assigned to the user). For mine, the basePath is empty and basePathRelative is set to 'yes'.

              Any basePaths that are not empty should end in a trailing slash. If basePathRelative is true, there should be no leading slash.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
              • discuss.answer
                • 13218
                • 134 Posts
                It works now. I'm still not sure what the problem was, but it seems like there was something wrong server side. I was actually seeing different things via ftp program than what was actually on the server. Maybe some etheral form of caching in some place I have never heard of? Anyway, at one point it just switched and I could see, that there were actually files missing on the server that were shown as uploaded before.

                I hate it when magic screws up my workflow...
                  @itWilllBeOK
                  • 3749
                  • 24,544 Posts
                  I hate it when magic screws up my workflow...

                  Amen to that. Glad you got it sorted. smiley
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting