We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21341
    • 26 Posts
    Hello,

    please push me in the right direction to solve this:

    I am using MODx Revolution 2.0.8-pl (traditional) on my site www.nedab.de.
    Its a linux server with mod_rewrite ON and a every setting as modx revo required.

    And on my last article i tried to use pictures, following settings a in place:

    • i use a rewrite from my server root to a subdirectory /r, but everything is working fine
    • base_url etc. is set in the header, i read the rtfm...
    • set the base in my modx htaccess to my sub /r
    • a folder assets/web/images with 755
    • src attribute in img-tag was set right as "web/images/sushi1.jpg"
    • i wrote the article with and without TinyMCE, the HTML is correct
    Well, now i tried to look at the result, but:
    What went wrong? Cant i see the tree in the forest, can I?

    THANKS!
      • 26016
      • 561 Posts
      Hallo,
      Indeed, http://nedab.de/web/images/sushi1.jpg is working.

      But if you put this as your src=....
      web/images/sushi1.jpg


      I think that your Base Href will make the full path into this:

      http://nedab.de/r/web/images/sushi1.jpg


      ... so it won’t be found. So you could try this is your src= (note the dots):
      ../web/images/sushi1.jpg


      But then if you move the site, the image link will break again. That "/r" is complicating things! If I were you, I would make a folder here and use that for your images instead. Then if you move the site, your image links will still be good.

      nedab.de/r/assets/web/images/


      Cheers
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 21341
        • 26 Posts
        Thanks for you answer!

        I know that working with subfolders is always tricky, but after modx, drupal, typolight, joomla and now modx again i like to have them, because i am just interested in the technology rather than a site... by now.

        BUT your answer does not explain something new to me, finding the paths is ok, i would figure that out by myself,
        WHEN i would see the source code in which the src attribute is set... that is not the case or does modx debug the output and delete everything wrong?

        Tomorrow i will give it a new try.
          • 36592
          • 970 Posts
          Use this.
          <img src="[[++site_url]]web/images/sushi1.jpg" />

            • 21341
            • 26 Posts
            Quote from: tkfm at Apr 21, 2011, 10:18 PM

            Use this.
            <img src="[[++site_url]]web/images/sushi1.jpg" />


            Thanks, you both together pushed me in the right direction. Your idea is the solution, but i wanted TinyMCE to know that too.

            I could not find any documentation on how tiny is configurated, but tried to make sure modx knows everything:

            • set filemanager_path and rb_base_dir to my site base ./
            • and set filemanager_url and rb_base_url to my site base http://www.xxx.de/

            This is working with my configuration because i redirect every request to / to /r .

            Thanks for your help,
            its much easier when being guided in the right direction, to have more brain power in order to stand in front of a pile of to-dos.

            PS: the only thing that bugs me about this is that modx didnt give me the output, but left the attribute empty instead of a wrong address.