We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    This sometimes means that the error page specified in the Configuration doesn’t exist. If the page requested doesn’t exist, then MODx loads the error page. If the error page doesn’t exist, then MODx loads the error page... ad infinitum, so error page redirects are coded to keep a count and after x number of redirects it quits with that error.

    Or you could have a page that redirects to another page which redirects to the first page... you can see where this would go!
      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
      • 16694
      • 5 Posts
      Help me please! I’ve tried to make it many times, but it doesn’t work :’(. In HTML code it looks like empty tags

      <div id="languageselection"></div>
      <div id="navigation"></div>

      Why can it be so?

      When I make the tracing ([+debugMsg+] code) it shows on the home page:

      LanguageID from cookie:
      LanguageID at finish:
      $language: page-21

      Why it choose the language as the alias of the page?

      This includes the languageChooser and a php-file "assets/languages/currentlanguage.php" (currentlanguage is the two-letter ISO Country Code). And you get a navigation with only the pages in the current language.

      Should I create this files? What have to be there? Am I need to change something in that code?
        • 16694
        • 5 Posts
        Everything works! I didn’t install all of MODx snippets. Thank you VERY VERY much!
          • 33968
          • 863 Posts
          Hi there

          I wanted to share this tutorial I found that will allow auto-detection of language settings based on browser language. Check it out: http://www.mediaguy.eu/blog/modx-redirect-based-on-browser-language.html?jnfa31cab0=1#jotnavfa31cab0f0248ac76f0025d20de01781
            • 33968
            • 863 Posts
            One question:

            How can I use [[link_to_language]] or possibly another snippet to always call the docId or TV value from the english-language version of a page?

            ie. I am in an Italian language page, and want to grab the docId and a TV from the english version of the same page.

            I have integrated a gallery and want the end user to upload images to the english pages and have them automatically appear on the other language pages, rather than having to duplicate for each language page on the site. There are other TVs including prices that I would also like to pull from the English pages.

            The gallery I am using is a new one, EvoGallery

            Or am I overcomplicating things?!

            Thanks in advance

            *** EDIT ***


            Ok, I found a partial solution to this, although it’s not ideal. I’ve decided to instruct the end-user to always enter the English page DocID into the [*languageIdentifier*] TV field. This does basically the same as using a page title anyway, but I can then have easy access to the English-version docID of all language pages within the site.

            Of course, if anyone can find a better way to do this without having the end user involved- well, great!
              • 22823
              • 25 Posts
              I need different hereTpl for language chooser, so I added the line of code to snippei languagechooser:
              "hereTpl"=>'selectedLang'

              and created the chunk selectedLang with the following code:
              <li class="selected some">[+wf.linktext+]</li>


              But it works for the very first page of the site, for the inner pages the active language class remains default WF <li class=active>, and not <li class="selected some">.

              Do i do something wrong?
                • 31566
                • 14 Posts
                My wayfinder call is not working:

                Here is the wf call for my main navigation list of links:
                [!Wayfinder? &startId=`[+LanguageID+]` &level=`2` &rowIdPrefix=`colorNav`!]

                No links outputted by wayfinder. If I use &startId=`1` like it was before I started to implement multilingual, links are there, but of course, the other language link is not working.

                It seems that there is something wrong with [+LanguageID+] but I can’t get a clue of how to fix this. Anyone ?

                I have a site tree like this (not the whole structure here, just to give an idea) :
                français (1)
                   |->Home (2)
                   |->Page (3)
                             |--->SubPage (61)
                             |--->SubPage (52)
                             |--->SubPage (14)
                                           |----->Sub-SubPage (24)
                                           |----->Sub-SubPage (25)
                             |--->SubPage (20)
                   |->Page (5)
                
                english (71)
                   |->Home (72)
                   |->Page (73)
                             |--->SubPage (79)
                             |--->SubPage (78)
                             |--->SubPage (74)
                                           |----->Sub-SubPage (81)
                                           |----->Sub-SubPage (82)
                             |--->SubPage (83)
                   |->Page (99)


                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Do you have the snippet that sets the [+LanguageId+] placeholder somewhere at the top of your template? Are you sure the spelling and case of the placeholder is correct?
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 349
                    • 76 Posts
                    In the first row of your template insert the snippet call "[[language]]"
                    Then put [[LanguageChooser]] where you need it. That should be all.
                      • 31566
                      • 14 Posts
                      Yep you were right I had [!language!] instead of [[language]]
                      —thanks a lot!!!—

                      Okay now my links are in place. BUT
                      link to other language page is not working.

                      Whatever is the page I am, when I click on the flag (to go to the other language corresponding page) the debug message give me:
                      LanguageID from cookie: 1
                      LanguageID at finish: 71 (the ID of my EN home page, not working)
                      $language: en (that's ok)


                      The "LanguageID at finish" is not calculated at all.

                      What have I missed ?