We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25483
    • 741 Posts
    Quote from: PMS at Aug 20, 2009, 01:50 PM

    Quote from: MediaGuy at Aug 20, 2009, 12:16 PM

    Well, The document itself is uncacheable, but the Ditto call is cached and works! If I make the Ditto call uncached it stops working. Very strange, I don’t know what is causing this... normally it should not work this way!!
    If the document is uncacheable, then the ditto call wont be cached, no matter whether it is specified with [! or [[. I can’t imagine why it wont work with both document and snippet call specified as uncacheable though. You’re right - it should still work.

    Optimally, you should have it set-up the other way around by the way. The document should be cacheable, but the snippet call should be set to uncacheable. I’m pretty sure that configuration works, because I have tested it in the past.

    EDIT: Just to be sure we’re not talking at cross-purposes. It’s [!uncacheable!] and [[cacheable]]

    I did try making the document cachable and run the snippet uncachable, but it still has the same problem. Maybe it’s a MODx 1.0 Evolution bug?
      with regards,

      Ronald Lokers
      'Front-end developer' @ h2o Media

      • 30497
      • 245 Posts
      ok, I am back from Greece with a tan. and ready to dive back into YAMS.

      I’ll download the latest beta, and start to set up that. First I’ll try the subdomain default type set up, but my question is, PMS, did you have any insights into whether subdomains per language can actually work?

      thx.

        • 30497
        • 245 Posts
        I have set up YAMS 1.0.5 Beta:


        And I have Russian and Spanish working with default root name configuration:

        http://www.quitsmokingin10days.com/en/

        http://www.quitsmokingin10days.com/ru/

        http://www.quitsmokingin10days.com/es/

        Great. I can actually use this, but I’d like to try and achieve my ideal solution as outlined on page 8, with a unique (sub)domain per language. Specifically, I want:

        http://www.quitsmokingin10days.com/ - ENGLISH

        http://ru.quitsmokingin10days.com/ - RUSSIAN

        http://es.quitsmokingin10days.com/ - SPANISH

        As a second preference, I could have the Russian/Spanish as sub-directories, but I’d still like English to be http://www.quitsmokingin10days.com/

        Last week using a release candidate for 1.0.4, I followed your (PMS) advice and made mono.quitsmokingin10days.com my root for the monolingual version, and www.quitsmoking...., ru.quitsmoking....., and es.quitsmoking.... the roots for the multilingual versions.

        This didn’t work for me. Specifically, all my relative paths for links, CSS, and so on in MODx became mono.quitsmoking..., making it unusable for me.

        PMS, do you think it is possible to set up YAMS as it currently exists, the way I would like? At minimum, with English at www.quitsmokingin10days.com/ ?








          • 22851
          • 805 Posts
          Quote from: towerofbabel at Aug 20, 2009, 04:25 PM

          Specifically, I want:

          http://www.quitsmokingin10days.com/ - ENGLISH
          http://ru.quitsmokingin10days.com/ - RUSSIAN
          http://es.quitsmokingin10days.com/ - SPANISH
          That should be possible. It’s standard ’server name’ mode.
          Quote from: towerofbabel at Aug 20, 2009, 04:25 PM

          Last week using a release candidate for 1.0.4, I followed your (PMS) advice and made mono.quitsmokingin10days.com my root for the monolingual version, and www.quitsmoking...., ru.quitsmoking....., and es.quitsmoking.... the roots for the multilingual versions.

          This didn’t work for me. Specifically, all my relative paths for links, CSS, and so on in MODx became mono.quitsmoking..., making it unusable for me.
          I’m afraid I don’t understand your last point. Please can you provide an example of the kind of URL that doesn’t work?

          You should be able to safely set your base href tag to http://mono.quitsmoking.../. This will only affect your real files, like CSS etc. YAMS always outputs full absolute URLs for MODx documents and as a result they are not affected by the base meta tag. Hope that helps.
            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
            By the way, I don’t know if you had a chance to catch up with developments on this thread, but it is possible to set up the latest YAMS alpha version to use multilingual aliases. If you make the aliases unique then you don’t need root names or server names. You can simply have the following as three different language versions of the same page:

            http://www.quitsmokingin10days.com/stop-smoking
            http://www.quitsmokingin10days.com/dejar-de-fumar
            http://www.quitsmokingin10days.com/Остановите курить

            You can even have the Russian characters in the URL if you like. (All characters will be correctly encoded, which will allow them to be rendered correctly in all browsers ... apart from IE, which will display the % escaped version of non-latin characters - which is not very pretty.)
              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.
              • 30497
              • 245 Posts
              Quote from: PMS at Aug 20, 2009, 07:53 PM

              Quote from: towerofbabel at Aug 20, 2009, 04:25 PM

              Specifically, I want:

              http://www.quitsmokingin10days.com/ - ENGLISH
              http://ru.quitsmokingin10days.com/ - RUSSIAN
              http://es.quitsmokingin10days.com/ - SPANISH
              That should be possible. It’s standard ’server name’ mode.
              Quote from: towerofbabel at Aug 20, 2009, 04:25 PM

              Last week using a release candidate for 1.0.4, I followed your (PMS) advice and made mono.quitsmokingin10days.com my root for the monolingual version, and www.quitsmoking...., ru.quitsmoking....., and es.quitsmoking.... the roots for the multilingual versions.

              This didn’t work for me. Specifically, all my relative paths for links, CSS, and so on in MODx became mono.quitsmoking..., making it unusable for me.
              I’m afraid I don’t understand your last point. Please can you provide an example of the kind of URL that doesn’t work?

              You should be able to safely set your base href tag to http://mono.quitsmoking.../. This will only affect your real files, like CSS etc. YAMS always outputs full absolute URLs for MODx documents and as a result they are not affected by the base meta tag. Hope that helps.


              Ok, I have set up the subdomains. Note - I physically created the subdomains on the server - that is the only thing I did apart from the changes in YAMS itself, and updating the .htaccess on the www directory.


              and the .htaccess changes, based on what YAMS tells me:
              RewriteCond %{HTTP_HOST} ^www\.quitsmokingin10days\.com$
              RewriteCond ${REQUEST_FILENAME} !-f
              RewriteCond ${REQUEST_FILENAME} !-d
              RewriteRule ^(.*)$ index.php?q=$1&yams_lang=en [L,QSA]
              RewriteCond %{HTTP_HOST} ^ru\.quitsmokingin10days\.com$
              RewriteCond ${REQUEST_FILENAME} !-f
              RewriteCond ${REQUEST_FILENAME} !-d
              RewriteRule ^(.*)$ index.php?q=$1&yams_lang=ru [L,QSA]
              RewriteCond %{HTTP_HOST} ^es\.quitsmokingin10days\.com$
              RewriteCond ${REQUEST_FILENAME} !-f
              RewriteCond ${REQUEST_FILENAME} !-d
              RewriteRule ^(.*)$ index.php?q=$1&yams_lang=es [L,QSA]
              RewriteCond %{HTTP_HOST} ^mono\.quitsmokingin10days\.com$
              RewriteCond ${REQUEST_FILENAME} !-f
              RewriteCond ${REQUEST_FILENAME} !-d
              RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]



              Now, if you go to the site, you will see that all my modx managed links (css, links to other pages) are "broken" because they now call mono..... . Images still work because they are defined outside of modx.

              You will also see that the subdomains ru and es don’t work.

              Where to from here?
                • 30497
                • 245 Posts
                Ok, I realize I left out something important you outlined on pg. 8:

                Quote from: PMS at Aug 12, 2009, 03:21 PM

                Monolingual
                 mono.domain.com
                Multilingual
                 English - www.domain.com
                 Russian - ru.domain.com
                 Spanish - es.domain.com
                

                Yes. That should work. Just use the server names above, set the root names to empty, and update your .htaccess. You’ll probably also need something like:
                ServerName www.domain.com
                ServerAlias ru.domain.com
                ServerAlias es.domain.com
                ServerAlias mono.domain.com
                

                in your virtual host block, if you are using that approach.

                Let me know how you get on.
                So, I need to be using virtual aliases, not "real" subdomains.

                I am going to make these changes now.
                  • 30497
                  • 245 Posts
                  Ok!

                  Now I am in business!

                  setting up the virtual aliases correctly solved my remaining issues - I am now delivering multilingual content on:

                  www.quitsmokingin10days.com
                  ru.quitsmokingin10days.com
                  es.quitsmokingin10days.com

                  One caveat - this method only works when ALL templates in use are multi-lingual - otherwise, links to pages with non-multi templates go to the mono. domain, and the www. domain links for those pages obviously doesn’t work (it actually gives an infinite redirect loop). I need to get YAMS to manage all my templates anyway, but is that a bug or an oversight?

                  Anyway PMS, thank you!
                    • 22851
                    • 805 Posts
                    Quote from: towerofbabel at Aug 21, 2009, 03:14 AM

                    Now I am in business!
                    Phew! Glad we got there in the end. I need to build that advice on setting up the aliases into the docs and the .htaccess config that YAMS provides.

                    Quote from: towerofbabel at Aug 21, 2009, 03:14 AM

                    One caveat - this method only works when ALL templates in use are multi-lingual - otherwise, links to pages with non-multi templates go to the mono. domain, and the www. domain links for those pages obviously doesn’t work (it actually gives an infinite redirect loop). I need to get YAMS to manage all my templates anyway, but is that a bug or an oversight?

                    I don’t know yet. I’m struggling to understand exactly where it’s going wrong. Any links that YAMS generates or automatically converts which point to monolingual pages should be of the form: http://mono.quitsmoking...

                    When you click on such a link it should take you to http://mono.quitsmoking..., not launch you into an infinite redirect loop.

                    Which bit is going wrong? Are the links to monolingual pages being displayed incorrectly, or are the links being displayed correctly, but being launched into some redirection loop? If it’s the former, then please show me what the code within your document template for the link looks like, or how it is being generated (ditto, Wayfinder, etc.)

                    Thank 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.
                      • 30497
                      • 245 Posts
                      on further thought, it is just a result of the method I have used.

                      I said that the www version goes to an infinite loop, when the template is not multi. But it is logical that it doesn’t work - the non-multi document is mono., not www. in my case.