We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22851
    • 805 Posts
    Quote from: PMS at Sep 28, 2009, 03:30 PM

    @French Fries. Are you using multilingual aliases? I suspect that treasurechest is outputting standard MODx URLs and that YAMS is responding with page not found rather than redirecting to a multilingual alias. It would improve compatibility with standard MODx resources (Ditto included) if YAMS would redirect from normal MODx URLs to multilingual ones. Let me see what I can do about this.

    YAMS 1.1.7 alpha RC4 is now available. This version re-implements old behaviour whereby if YAMS doesn’t recognise an URL as being valid, but MODx does, then YAMS will redirect from the MODx recognised URL to the correct URL using the status codes defined on the ’Other Params’ tab, rather than generating 404 not found. This aids compatibility with existing MODx resources that don’t understand multilingual URLs.

    @French Fries, hopefully this will mean that treasurechest will just work again without you having to make any changes to the way URLs generated by it. Please can you try it out and let me know?

    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.
      • 10152
      • 156 Posts
      Thanks for those answers !

      TreasureChest .js is loaded when adding this line to server config, after RewriteBase /:
      RewriteRule ^en/(.*)\.js$ $1.js [L]
      


      Was treasurechest working with a previous version of YAMS?! How has it stopped working now?

      Yams was working perfectly, I am now trying to install treasurechest :

      The cart is almsot working ( bug : it adds products twice when triggering "add-to-cart").

      I keep working and i’ll post feedback soon about and yams + treasurechest.

      RC4 leads to 404 for french language when having same aliases on both languages.
      Only RC1 makes the cart work.

        • 8951
        • 10 Posts
        Quote from: PMS at Sep 24, 2009, 11:18 AM

        Quote from: EPSBV at Sep 24, 2009, 08:46 AM

        Next problem: After changing the .htaccess file I am unable to get into the manager. when trying to reach it i get diverted to ../nl/manager.

        How to solve?
        Before the friendly URLs stuff and after the RewriteBase line you need to have
              # Exclude /assets and /manager directories from rewrite rules
              RewriteRule ^(manager|assets) - [L]
        

        For info, I also have

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

        HI, and thanks again. The exclude rule apparently doesn’t work, i’m still redirected to www.epsbv.com/nl/manager when browsing to www.epsbv.com/manager/ (nl is my default language). This is my .htaccess file:


        # For full documentation and other suggested options, please see
        # http://svn.modxcms.com/docs/display/MODx096/Friendly+URL+Solutions
        # including for unexpected logouts in multi-server/cloud environments
        
        Options +FollowSymlinks
        RewriteEngine On
        RewriteBase /
        
        # Exclude /assets and /manager directories from rewrite rules
        RewriteRule ^(manager|assets|2005|stats) - [L]
        
        # Fix Apache internal dummy connections from breaking [(site_url)] cache
        RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
        RewriteRule .* - [F,L]
        
        # Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin
        #RewriteCond %{HTTP_HOST} .
        #RewriteCond %{HTTP_HOST} !^example\.com [NC]
        #RewriteRule (.*) http://example.com/$1 [R=301,L]
        
        
        # Friendly URLs
        RewriteEngine On
        RewriteBase /
        # 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 ^nl/(.*)$ index.php?q=$1&yams_lang=nl [L,QSA]
        RewriteCond ${REQUEST_FILENAME} !-f
        RewriteCond ${REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
        
        
        # Reduce server overhead by enabling output compression if supported.
        #php_flag zlib.output_compression On
        #php_value zlib.output_compression_level 5



        Best regards,

        Michiel
          • 22851
          • 805 Posts
          Quote from: EPSBV at Sep 29, 2009, 01:55 AM

          HI, and thanks again. The exclude rule apparently doesn’t work, i’m still redirected to www.epsbv.com/nl/manager when browsing to www.epsbv.com/manager/ (nl is my default language). This is my .htaccess file:
          ...
          The problem is that you have
          RewriteEngine On
          RewriteBase /

          twice. The second occurrence isn’t needed. This is what you need:

          # For full documentation and other suggested options, please see
          # http://svn.modxcms.com/docs/display/MODx096/Friendly+URL+Solutions
          # including for unexpected logouts in multi-server/cloud environments
          
          Options +FollowSymlinks
          RewriteEngine On
          RewriteBase /
          
          # Exclude /assets and /manager directories from rewrite rules
          RewriteRule ^(manager|assets|2005|stats) - [L]
          
          # Fix Apache internal dummy connections from breaking [(site_url)] cache
          RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
          RewriteRule .* - [F,L]
          
          # Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin
          #RewriteCond %{HTTP_HOST} .
          #RewriteCond %{HTTP_HOST} !^example\.com [NC]
          #RewriteRule (.*) http://example.com/$1 [R=301,L]
          
          # Redirect from mydomain.com/rootname to mydomain.com/rootname/
          RewriteRule ^en$ en/ [R=301,L]
          RewriteRule ^nl$ nl/ [R=301,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 ^nl/(.*)$ index.php?q=$1&yams_lang=nl [L,QSA]
          RewriteCond ${REQUEST_FILENAME} !-f
          RewriteCond ${REQUEST_FILENAME} !-d
          RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
          
          
          # Reduce server overhead by enabling output compression if supported.
          #php_flag zlib.output_compression On
          #php_value zlib.output_compression_level 5


          By the way, I have improved YAMS slightly, so that if you upgrade to the very latest alpha of YAMS it will provides you with exactly the .htaccess code you need, which, for your case should be the same as above (rather than providing you with bits of .htaccess of code that have to be copied into the correct location).
            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.
            • 24189
            • 19 Posts
            Hey evr1

            Modx: Evo1.0
            YAMS: 1.1.7rc4
            Wayfinder: 2.0

            This is an awesome piece of code!
            Thank you.

            While installing and playing around I seem not be able to solve the following problem.

            Everything works fine (Back- and Frontend), expect the Wayfinder-Call to build the navigation.
            I wonder if you have an idea.

            I’m using the standard modx-minimal-template, so nothing customized yet.

            The standard call works fine (but w/o translation of course):
            [[Wayfinder? &startId=`0`]]


            When I add the &rowTpl there is no output at all:
            [[Wayfinder? &startId=`0` &rowTpl=`@FILE:assets/modules/yams/tpl/wayfinder/docr/row.tpl`]]


            Also, the output of the following call returns nothing:
            [[YAMS? &get=`data` &from=`pagetitle` &docid=`[+id+]`]]


            But this gives me the list:
            [[YAMS? &get=`list`]]


            Can you help find the answer?

            Thanks in advance.

            QT
              • 22851
              • 805 Posts
              Quote from: qtx at Sep 29, 2009, 06:36 AM

              While installing and playing around I seem not be able to solve the following problem.

              Everything works fine (Back- and Frontend), expect the Wayfinder-Call to build the navigation.
              I wonder if you have an idea.

              I’m using the standard modx-minimal-template, so nothing customized yet.
              Have you made your modx-minimal-template multilingual and populated it with some multilingual content? Assuming that you have a) already set up your language settings on the Language Settings tab, b) updated your .htaccess file and c) configured your ManagerManager plugin with rules for YAMS, then you need to do the following: Go to Modules > YAMS > Multilingual Templates and make modx-minimal-template multilingual. Then edit your document and populate it with some multilingual content.

              Note: You should be using
              [[YAMS? &get=`data` &from=`pagetitle` &docid=`[*id*]`]]
              (note the start instead of plus-es) if the snippet call has been inserted into your document template rather than a ditto/wayfinder snippet template.
                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.
                • 24189
                • 19 Posts
                Hi PMS

                == Note
                Of course:
                [[YAMS? &get=`data` &from=`pagetitle` &docid=`[*id*]`]]

                This works in the minimal-Template.

                But, there is another strange thing.
                If I call two [[YAMS]]:
                [[YAMS? &get=`data` &from=`pagetitle` &docid=`[*id*]`]]
                [[YAMS? &get=`list`]]

                there is only the output of the first one (did try also with non cacheable [!!]).
                == Note end

                Thanks for the quick answer.

                I (think that I) set up YASM according to your manual, and yes I populated the minimal-template with the *tv’s* (I see them too smiley.

                At the moment the only problem is, that the [[YAMS]]-call does not work how it should.

                When I switch the language (as mentioned, the [[YAMS? &get=`list`]] works.
                And it displays the correct content (also when I *hardcode* the url and change just the language part).

                So to me, it looks that somehow the (yams_xxxx) variables are not beeing executed in Wayfinder.

                Any other clue?

                Thanks again.
                QT
                  • 22851
                  • 805 Posts
                  What version of Wayfinder are you using? Please can you tell me more about your language set-up so that I can try to reproduce the problem?
                  Thanks.
                    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.
                    • 24189
                    • 19 Posts
                    Hi PMS

                    Wayfinder: v2.0

                    There is no language setup.
                    The sitestructure is *flat*, so everything in the root folder.

                    The pages can be edited and saved in english/german (as configured).
                    They are being delievered by entering the url by hand.

                    e.f. http://modxcms/en/test.html -> english content, title
                    e.f. http://modxcms/de/test.html -> german content, title

                    But the menu stays empty by using:
                    [[Wayfinder? &startId=`0` &rowTpl=`@FILE:assets/modules/yams/tpl/wayfinder/docr/row.tpl`]]



                    But, there is another strange thing.
                    If I call two [[YAMS]]:
                    [[YAMS? &get=`data` &from=`pagetitle` &docid=`[*id*]`]]
                    [[YAMS? &get=`list`]]

                    there is only the output of the first one (did try also with non cacheable [!!]).


                    Your help is appreciated very much, thank you!
                    QT
                      • 22851
                      • 805 Posts
                      @qtx.

                      This is very strange... I don’t understand what could be causing such odd behaviour. I was going to suggest that maybe Wayfinder couldn’t find your YAMS templates... which could point to a permissions problem - but that wouldn’t explain the other behaviour. Oh... The `list` option reads its default templates from file too. So, maybe it is a permissions problem after-all? All the YAMS files should be readable by your web-server user/group. In addition, the yams.config.inc.php file needs to be writable. That’s something to check anyway. Another thing to check is whether there are any YAMS related errors appearing under Reports > System Events.

                      Let me know if helps or provides more info. Failing that, I’ll do some further investigation this evening on a local install and get back to you.
                        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.