We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44433
    • 33 Posts
    I have put a site online and everything works fine, the rest of my images work except for Minishop2 gallery images.
    /dev/mysite/assets/images/products/249/120x90/test.jpg

    This is what Minishop2 is outputting. But I need to remove the first part
    /dev/mysite
    for them to work.

    Where is this path set?

    I cant find the settting in the media source, within the chunks or in system settings, could anyone point me in the right direction?

    Thanks

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

      Follow me on twitter @christofvonlee
      • 19872
      • 1,078 Posts
      There are settings that are in the core/congif/core.config.inc I believe. At least this was the case when going from a temporary URL to going Live.
        • 44433
        • 33 Posts
        Thanks for your reply.

        I configured this file when the site went live, all the other files e.g. images are loading except for those used in the Minishop2 plugin.

        The placeholder automatically looks under he wrong path, and I'm not sure where this is set.
          Follow me on twitter @christofvonlee
          • 19872
          • 1,078 Posts
          Then it must be a minishop system setting perhaps? I find the system setting to be a bit tricky to search for some reason. Have you tried that first select menu in the system settings, and seeing if minishop is listed as an option. That way you can view only those settings and perhaps you will see a the path listed there and it can then be modified.
            • 44433
            • 33 Posts
            I looked at the system settings for Minishop2 but I cant find anything that defines a path. The system does use a media source defined by Minishop2 but I can't see any paths that are defined as going to the development area.

            I could try going backwards through the snippet to see where the path is generated from.

            I don't want to have to re-install the package in case it breaks.
              Follow me on twitter @christofvonlee
            • That looks more like something from phpthumbof, or whatever image manipulation plugin you are using. Try manually clearing the entire core/cache folder.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
              • discuss.answer
                • 44433
                • 33 Posts
                I solved the problem, but it may be caused by a bug.

                Minishop2 saves the paths to the files in the database relative to the host, not the modx install's root. So if your developing in a sub directory then the folder will be stored in the path too e.g.
                /developmentarea/subdirectory/assets/images/products/249/120x90/test.jpg
                Thus breaking the links when the site goes live.

                The tables holding the path were modx_ms2_products and modx_ms2_product_files.

                I exported the tables then opened in a text editor and corrected the path by removing
                /developmentarea/subdirectory/
                leaving only
                assets/images/products/249/120x90/test.jpg
                in the table. I then imported it back into the database which meant image source was correctly linked to the modx install.

                With help from @nadakbar.
                  Follow me on twitter @christofvonlee