Search code examples
androidwebcontent-management-systemsmartphonegrav

Website link not working on phone


I have a deployed website, working perfectly fine on local and server :

autrecote.be/en

except that the menu (including Description & Contact) doesn't work but only on smartphones.

As I used the Grav CMS, I didn't do the responsive adaptation and I have no idea where to begin to look. What could cause the links to work only on computer browsers ?

Thank you a lot for your help

EDIT :

Thanks to the answer below, I managed to find the error, these lines were in the file for the normal menu but not in the mobile menu :

Indeed, I found the error, this line was in the file for the normal menu but not in the mobile menu :

<li class='menu-item menu-item-type-post_type'><a href='{{base_url_absolute }}/{{ item.url|replace({"page:":''}) }}'>{{ item.text }}</a></li>

It is working now, thanks a lot.


Solution

  • It's not a matter of computer versus smartphone browsers. You'll see the same behavior if you make your desktop browser window small enough. (In Firefox you have a handy tool called "Responsive Design Mode" that you can use for this.)

    In the page's source you'll see that there are two menus defined, one "normal" one and one "mobile" one (with the 'hamburger' icon with the 3 horizontal lines). It is this menu that seems to have the wrong links: the href values are things like page:description, instead of the actual page links.