We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22851
    • 805 Posts
    Thanks bjan. However, YAMS doesn’t do any database access at all, so the particular error you reported was not caused by YAMS.

    So, either the MODx parse error you encountered initially wasn’t caused by YAMS, or, if it was caused by YAMS, then that error is somewhere else in your System Events log. The word ’yams’ will almost certainly appear in any YAMS related MODx parse error.


    EDIT: I was wrong. Of course, YAMS does do database access. It creates and updates multilingual template variables... but if you haven’t yet selected any multilingual templates then you would get the SQL error above. Getting this error wont have caused any problems for you. I’ll correct it for the next release.

    Thanks for helping me out!
      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.
      • 3465
      • 19 Posts
      Now I get stuck one step further...

      When I look at the site now with unupdated htaccess I get both languages underneath each other saying (yams-select:2)(lang:2:en) at the top (lang:2:de) just above the second language and (/yams-select:2) at the very bottom.

      With updated htaccess same thing just without any styling.

      I just changed the friendly url part plus this:

      #Options +FollowSymlinks
      RewriteEngine On
      RewriteBase /modx/
        • 22851
        • 805 Posts
        Please can you check that the YAMS plugin is active on all the following events and tell me if you still have the same problems:

        - OnWebPageInit
        - OnLoadWebDocument
        - OnParseDocument
        - OnWebPageComplete
        - OnWebPagePrerender
        - OnDocFormSave

        (The older version of YAMS you had installed didn’t require as many events to be activated. Perhaps you didn’t update the plugin when you updated.) Please also try clearing your site cache. Let me know if you still have problems. 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.
          • 3465
          • 19 Posts
          indeed I forgot one them.
          Now it’s good as long I don’t upload the htaccess. If I do the missing style is still missing and this line appears at the end:

          MySQL: 0.0049 s, 4 request(s), PHP: 0.0298 s, total: 0.0347 s, document retrieved from cache.
            • 22851
            • 805 Posts
            Quote from: bjan at Jul 29, 2009, 06:25 AM

            With updated htaccess same thing just without any styling.

            I just changed the friendly url part plus this:

            #Options +FollowSymlinks
            RewriteEngine On
            RewriteBase /modx/

            I can only assume that the change to the .htaccess file you have just made means that real files which were previously located at mysite.com/modx/some-path... are now located elsewhere - probably at mysite.com/some-path. Check your template/html source to see what the location of your css file is specified as, and then check that this is compatible with your server configuration.

              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.
              • 3465
              • 19 Posts
              No, the files are where they have been all the time. It’s a fresh sandbox installation and I didn’t move anything but the YAMS into the assets.

              That’s what the template says:
              <link rel="stylesheet" href="[(base_url)]assets/templates/default/site.css" type="text/css" media="screen" />

              That’s what filezilla says:
              public_html/modx/assets/templates/default/site.css

              And that’s what htaccess says:
              #Options +FollowSymlinks
              RewriteEngine On
              RewriteBase /modx/

              # Fix Apache internal dummy connections from breaking [(site_url)] cache
              RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
              RewriteRule .* - [F,L]

              # The Friendly URLs part
              RewriteCond ${REQUEST_FILENAME} !-f
              RewriteCond ${REQUEST_FILENAME} !-d
              RewriteRule ^en/(.*)$ index.php?q=$1&yams_lang=en [L,QSA]
              RewriteCond ${REQUEST_FILENAME} !-f
              RewriteCond ${REQUEST_FILENAME} !-d
              RewriteRule ^de/(.*)$ index.php?q=$1&yams_lang=de [L,QSA]
              RewriteCond ${REQUEST_FILENAME} !-f
              RewriteCond ${REQUEST_FILENAME} !-d
              RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
                • 22851
                • 805 Posts
                The YAMS part of your configuration looks good to me, considering you are using RewriteBase /modx. You have installed MODx into a modx subdirectory of your server through though, so shouldn’t your template contain
                <link rel="stylesheet" href="[(base_url)]modx/assets/templates/default/site.css" type="text/css" media="screen" />

                ? (Note the additional modx directory.)
                  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.
                  • 3465
                  • 19 Posts
                  No it shouldn’t. The base url for modx is mysite.com/modx. If I change the template with modx/ than it doesn’t find the style at all.
                  And it works without changes and without htaccess
                    • 22851
                    • 805 Posts
                    Okay. bjan, I have created local install on my server with which I was able to test your particular set-up. I have found and corrected several bugs and now everything is functioning as it should be.

                    Since this update contains several additional bug fixes not directly related to the subdirectory issue, I recommend it for everyone. However, I’m not going to submit it to the MODx repository yet, because I am still only part way through implementing my main goal for this version of having a translatable module interface.

                    Please grab version 1.0.4 alpha RC 2 from my sever. When updating, please don’t install straight over your existing version, since I have moved some files around. Instead, please rename your existing yams directory, copy over the new yams directory and then copy your yams.config.inc.php file from the old yams directory to the new one. This process is described in more detail in the Readme.txt.

                    bjan, your .htaccess file should now contain:

                    #Options +FollowSymlinks
                    RewriteEngine On
                    RewriteBase /modx
                    
                    # Fix Apache internal dummy connections from breaking [(site_url)] cache
                    # PMS: Don't know about this one since I don't use it...
                    RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
                    RewriteRule .* - [F,L]
                    
                    # The Friendly URLs part
                    RewriteCond ${REQUEST_FILENAME} !-f
                    RewriteCond ${REQUEST_FILENAME} !-d
                    RewriteRule ^en/(.*)$ index.php?q=$1&yams_lang=en [L,QSA]
                    RewriteCond ${REQUEST_FILENAME} !-f
                    RewriteCond ${REQUEST_FILENAME} !-d
                    RewriteRule ^de/(.*)$ index.php?q=$1&yams_lang=de [L,QSA]
                    RewriteCond ${REQUEST_FILENAME} !-f
                    RewriteCond ${REQUEST_FILENAME} !-d
                    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
                    
                      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
                      Just found and squashed another bug. Since I doubt anyone has downloaded the 1.0.4 alpha RC2 file yet, I just updated that version.
                        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.