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

    I´m a web developer that have got into MODx a couple of months ago. I found YAMS a week ago and are in the implementation phase right now.

    I´ve unfortunately encountered a weird problem. I followed all instructions and enabled my templates i use unique aliases and the adresses looks like this:

    http://www.domain.com/(lang, e.g en)/alias

    My problem is that it works on the first and the second page but not on the rest!? On my 7th resource (regular HTML) it will show in Swedish (my default language) but not in English, instead it will redirect to the start page showing in English? Same thing with the ones that "doesn´t work", I will just be redirected to the chosen language?

    I´m using the latest version of YAMS, 1.1.7 alpha RC7 for testing.

    Is this a known problem? Or is there a good troubleshooting method? I can´t find any differences between the resources that work and the ones that don´t..

    EDIT: I guess I can attach a copy of my .htaccess:

    Options +FollowSymlinks
    # Friendly URLs
    RewriteEngine On
    RewriteBase /
    
    RewriteCond %{HTTP_HOST} ^domain\.se$
    RewriteRule (.*) http://www.domain.se/$1 [R=301,L]
    
    # Fix Apache internal dummy connections from breaking [(site_url)] cache
    RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
    RewriteRule .* - [F,L]
    
    # Exclude /assets and /manager directories from rewrite rules
    RewriteRule ^(manager|assets) - [L]
    
    # Redirect from mydomain.com/rootname to mydomain.com/rootname/
    RewriteRule ^en$ en/ [R=301,L]
    RewriteRule ^sv$ sv/ [R=301,L]
    
    # The Friendly URLs part
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^en/(.*)$ index.php?q=$1 [L,QSA]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^sv/(.*)$ index.php?q=$1 [L,QSA]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
    

      • 22851
      • 805 Posts
      Your .htaccess looks fine. This is the first time a problem like this has been reported - so I am not sure what the problem is. Several other people have been using root name mode successfully, including myself - so hopefully this is just a configuration problem that can be simply resolved.

      Please could you tell me what character encoding you are using? Also, are you using multilingual aliases?

      If you are able to send me a personal message with some login details I’d be happy to have a quick look to see if I spot any problems.
        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.
        • 22851
        • 805 Posts
        Thanks for sending me the login details. The problem appears to be that your YAMS plugin is not activated on the OnLoadWebPageCache event, but it needs to be. In support of this the documents that are not functioning correctly are those that are uncacheable.
          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.
          • 26069
          • 16 Posts
          Soo? Did you activate it or should I do it? Do the pages have to be cacheable?

          EDIT: Another question: What release do you recommend to use? The stable version that is on the regular repository doesn´t support everything I want.. Or is the latest release enough stable for production?
            • 22851
            • 805 Posts
            I didn’t have sufficient permissions to enable it, so please try and let me know. The documents can be cacheable or uncacheable - but in general cacheable documents are better for performance.

            Currently the recommended version is YAMS 1.1.7 alpha RC7. This has been published to the MODx repository - but for some unexplainable reason this appears on the "Previous Versions" tab. I contacted MODx about this but got no response.
              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.
              • 26069
              • 16 Posts
              Ok, yes I changed it, but no success. Is there any cases were you don´t want your pages cached?
                • 22851
                • 805 Posts
                There’s one more missing event (OnPageNotFound), and one incorrect event (OnDocFormSave). The full list for YAMS 1.1.7 alpha RC7 is:

                - OnLoadWebDocument
                - OnParseDocument
                - OnWebPageInit
                - OnWebPagePrerender
                - OnLoadWebPageCache
                - OnPageNotFound
                - OnBeforeDocFormSave

                I’m not sure if this is the problem - but it would be good if you could check the events and try again to be sure.
                  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.
                  • 26069
                  • 16 Posts
                  Ok, I´ll do that as soon as you have logged out, the plugin is locked right now..
                    • 26069
                    • 16 Posts
                    Works! smiley My problem was that I had installed one of the previous versions and when I upgraded I forgot to change the systemevents for the plugin.