We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36446
    • 184 Posts
    I have a strange problem with wayfinder when browsing the page on smartphones - i tried android and iphone.
    At first everything is working fine (for the first click) but my secod click in the menu produces links like this:

    mypage.com/click1.html (1.click)
    mypage.com/click1/click2.html (2.click)
    mypage.com/click1/click2/click3.html (3. click)

    only the first link is directing to the correct page - all the other links are directed to the home page - because this is my error page. I tried to set cache to off for every ressource but this didn’t help.

    Here are some maybe critical settings from htaccess (needed for multilanguage)

    # The Friendly URLs part
    # detect language when requesting the root (/)
    RewriteCond %{HTTP:Accept-Language} !^de [NC]
    RewriteRule ^$ en/ [R=301,L]
    RewriteRule ^$ de/ [R=301,L]
     
    # redirect all requests to /en/favicon.ico and /de/favicon.ico
    # to /favicon.ico
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(en|de)/favicon.ico$ favicon.ico [L,QSA]
     
    # redirect all requests to /en/assets* and /de/assets* to /assets*
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(en|de)/assets(.*)$ assets$2 [L,QSA]
     
    # redirect all other requests to /en/* and /de/*
    # to index.php and set the cultureKey parameter
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(en|de)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA]
    


    Can anyone tell me what is wrong here?

    I’m using a multilingual site with 2 contexts and a accordion menu from i-marco.

    I used this menu
    http://www.kunane.com/modx/wayfinder-nested-accordion.html

    Would be great if someone has an idea how to fix this.

    Thank you very much!

      https://www.beautyislife-shop.de - premium make-up!
      https://www.topsterne.de - sell it here!
      ---------------------------------------------------------
      • 7914
      • 137 Posts
      While I haven’t experienced that issue, I am noticing that on a smartphone, (in this case safari) isn’t capturing the "current" class. Wayfinder is doing everything correctly - the class is getting appended to the "li" element. However, the browser isn’t reflecting the change when I press the back button (actual browser back button).

      Has anyone seen this before?
        • 1343 ☆ A M B ☆
        • 2,213 Posts
        Do you have the base tag in your template (or use MetaX?)?
          Patrick | Server Wrangler
          About Me: Website | Tweets |  MODX Hosting
          • 7914
          • 137 Posts
          Yeah, everything is there - and working correctly. I hated to post my comments in this thread, but it made the most sense I think if someone was searching. I think it is a mobile browser issue. It’s almost like I need to force a page refresh if the browsers back button is pressed.

          If I view the source when button "A" and "B" are highlighted (current state) the source shows that only "A" has the current class applied to it. The browser is failing to clear the css styles. If you refresh, all is good.
            • 36446
            • 184 Posts
            hmmm thanks for the replies, but my problem still exists - im starting to become desperate...

            Maybe i have to clarify my problem a little - i use a jquery menu - the "category" pages don’t exist - if these top level category links are clicked the menu opens up and there is no page loaded. Then when i click a menu item in on the second level of my menu it opens correct but when i click a second link in the same menu level the whole messed up urls is the result on mobile devices and on safari. Even if i disable the menu.js...


            The menu items that are not containers and are in the first level of the menu are working fine.

            Would be great if someone could help me. The url to the page is

            http://www.hhbs.de/de/


              https://www.beautyislife-shop.de - premium make-up!
              https://www.topsterne.de - sell it here!
              ---------------------------------------------------------
              • 33968
              • 863 Posts
              I have noticed that some browsers handle relative links slightly differently (I’ve experienced similar problems with IE). It could be that those mobile browsers are not picking up the base tag?

              One thing you could try is modifying your Wayfinder rowTpl and prefixing the full url path to create full link paths:

              <li><a href="[[++site_url]][[+wf.link]]">[[+wf.linktext]]</a> - [[+wf.description]] [[+wf.wrapper]]</li>

              Or if you prefer, a forward slash to ensure the path is always always relative to the root and not the current page:

              <li><a href="/[[+wf.link]]">[[+wf.linktext]]</a> - [[+wf.description]] [[+wf.wrapper]]</li>
                • 36446
                • 184 Posts
                Hey Lucas!
                The menu i used didn’t use a rowTPL in the first place but i included the rowTpl as you sugested and now it is working fine! puiih.... thank you very much! But one problem still exists - when i click on the home link i get a url like this:

                http://www.hhbs.de/de/http://www.hhbs.de/de/

                This is not a big problem because this is redirecting to the home page (because there is no corresponding page to this url) but it is not ideal ... but thank you for the hint with the rowTpl - you made my day!

                  https://www.beautyislife-shop.de - premium make-up!
                  https://www.topsterne.de - sell it here!
                  ---------------------------------------------------------
                  • 33968
                  • 863 Posts
                  That’s not ideal though as it’s actually a broken link - looking into it further, you can scrap my suggestion and use the &scheme property instead:
                  [[!Wayfinder? &startId=`0` &scheme=`full` ]]
                  

                  That does the same thing but should prevent the double-up.

                  I need to read up on the docs regularly, MODx is moving ahead so quickly now!
                    • 36446
                    • 184 Posts
                    thanks again - but with the scheme property the links are broken again...

                    Maybe i digg into the wayfinder docs as well a little deeper wink
                      https://www.beautyislife-shop.de - premium make-up!
                      https://www.topsterne.de - sell it here!
                      ---------------------------------------------------------
                      • 33968
                      • 863 Posts
                      I think &scheme only works in the latest Wayfinder version, so check the snippet you have installed is up to date.