We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37068
    • 3 Posts
    Hi!

    i set up a multi-context / multilingual site using Babel Plugin. Right now I have two contexts:

    en.mydomain.com -> english version
    www.mydomain.stilltesting.com -> german version

    Switching context / language works perfectly and everything is loaded as it should. Except images.
    In the german version all image-paths start with /uploads/myimage.png as set in the media source setttings. In the english context the image paths do not contain the prefix: myimage.png

    Can anyone give me a hint? I'm running out of ideas here...

    Thanks a lot for your help!

    Cheers,
    Sean
    • Any solution found here? I am having the same issue..
        Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
        • 37068
        • 3 Posts
        I used a snippet to correct this as a quick solution:

        if (strpos($input, "/uploads/") === false)
        {
        return "/uploads/".$input;
        } else {
        return "";
        }


        That piece of code is very basic of course smiley
        I called the snippet fixImageLink so now I can use it as a custom filter:

        +myImageUrl:fixImageLink

        It will simply add the uploads component iof the path if missing.
        • Thanks for this. Were you able to use your media source in the non "web" contexts? I am having the problem in the manager that in the second context that all of my image tv's do not use the media source...
            Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
          • I found the problem. I created the new context and after I created my TVs.. so in the media resources section of the TV, I needed to set the media resource with the new context as listed there.
              Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
              • 37693
              • 47 Posts
              Yes, I just had to go into every TV and re-save. Didn't even have to change the Media Source as already set to the correct one. Clearing cache + refresh didn't work.

              Bug has been filed here: http://tracker.modx.com/issues/9058
                • 37076
                • 12 Posts
                Hello all,

                here is how I have solved it,
                First I went to:
                tv > my_image_tv > media sources
                change the "source" on context to another (I have docs, downloads) and save it
                than change it back to "image media source" and save it

                check the site it was working smiley
                I hope it helps...
                  • 51729
                  • 1 Posts
                  Quote from: wzavhpem at Mar 04, 2013, 02:59 PM
                  Hello all,

                  here is how I have solved it,
                  First I went to:
                  tv > my_image_tv > media sources
                  change the "source" on context to another (I have docs, downloads) and save it
                  than change it back to "image media source" and save it

                  check the site it was working smiley
                  I hope it helps...
                  Thank you wzavhpem! that was the solution for me..this is still an issue in MODX Revolution 2.4.2-pl (traditional) ..
                    • 42892
                    • 44 Posts
                    Just had a similar Problem, with a newly created media source for a multiple context modx setup.

                    After simply switching the TVs to the new media source (you have to assign the TV to the media source for each context in the TV configuration tab 'media sources') there where no correct paths in the frontend because the baseUrl/basePath was missing.

                    Then I found out, that I have to process the TVs. After that everything is working as expected.