We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6848
    • 52 Posts
    I had some problem with links inside the content which point to a file (pdf for example) in the "assets/files" folder.
    The URL with default TinyMCE configuration (Path Options = docrelative) is "assets/files/docname.pdf".
    This link is converted to http://sitename/en/assets... which is "wrong"
    To make the links work correctly the configuration of TinyMCE should be changed to (Path Options = rootrelative)
    After that the urls will have starting slash and will work correctly.
    To make the life easier additional rewrite rules can be put like:

    #Remove language codes from assets

    RewriteCond ${REQUEST_FILENAME} !-f
    RewriteCond ${REQUEST_FILENAME} !-d
    RewriteRule ^en/assets(.*)$ assets$1 [L,QSA]
    RewriteCond ${REQUEST_FILENAME} !-f
    RewriteCond ${REQUEST_FILENAME} !-d
    RewriteRule ^bg/assets(.*)$ assets$1 [L,QSA]

    With these rules you should not care about the configuration of the editor (or in case some hardcoded relative links to the assets are put somewhere)

    (I’m not mod_rewrite specialist and may be the rules are not perfect, but in my case they do the job.)

    Forgot to mention that this is valid for root mode of yams
      • 22851
      • 805 Posts
      Hi ddim.

      I don’t understand why you are getting URLs of the form: http://sitename/en/assets

      Are you using a <base href=... tag? If so, what are you using?

      I would suggest using:
      <base href="(yams_server)"></base>

      That way no rewrite rules should be necessary.
        YAMS: Yet Another Multilingual Solution for MODx
        YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
        Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.
        • 6848
        • 52 Posts
        Thank you.
        Sometimes it is good to read more than to write more smiley
        You probably can delete the topic or change it to something like "be careful with base tag" smiley
          • 22851
          • 805 Posts
          I renamed it. Cheers.
            YAMS: Yet Another Multilingual Solution for MODx
            YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
            Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.