We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17705
    • 501 Posts
    I was working in a local server and uploaded image files (as Template Variable), and after transfer and setup everything as the documentation said, all that images have an url of http://localhost/..../images/ what did I make wrong?
      • 17705
      • 501 Posts
      It is strange... I have "Rewrite image paths" ON...
      "Turning this on will have MODx rewrite image src’s to be relative instead of absolute. This is very handy if you should ever wish to move your MODx installation (for example from a staging site to a production site)."

      And used the backup dump of modx...

      and I didnt realise that that SQL file is full of localhost absolute paths...

      Is there any way to fix this? it is a lot of images...

      INSERT INTO `modxdi_site_tmplvar_contentvalues` VALUES (’25’,’4’,’47’,’’,’’,’http://localhost/assets/images/anahi_roitman_02.jpg’);
        • 4041
        • 788 Posts
        Do you have a text editor handy which will do a search and replace?

        Make a new file with just the sql statements you need changed and then modify them accordingly. Then go drop the existing tables and sql the new changes into phpmyadmin.
          xforum
          http://frsbuilders.net (under construction) forum for evolution
          • 17705
          • 501 Posts
          yep, sure... but then, wich is the idea of "Rewrite image paths"?

          it is the same, Yes or No, the paths are always full
            • 19726
            • 239 Posts
            Take a look at the following topic, I think it will solve your problem.
            http://modxcms.com/forums/index.php/topic,2470.0.html
              • 17705
              • 501 Posts
              Thanks Mitch
              I will try that on next projects... smiley