0

I have updated a website from Joomla 3 to Joomla 4 on my local machine. When I upload it all the main menu items are shown on the frontend with the HREF fields empty.

I can't understand why this is happening. On my local machine, everything works fine.

If I open a menu item in the menu manager and copy its URL and add it to the homepage link the subpage opens correctly.

I lost a couple of hours trying to understand the cause.

Do you have any idea of what can be the cause of this issue?

enter image description here

Diving deep into the problem and debugging the JRoute, that returns null just in production. I'm debugging this file: /libraries/src/Router/Route.php

If I make a dump of the error thrown I see:

enter image description here

2 Answers 2

1

Unless I'm mistaken, you are using nginx - which is known to cause this problem, this is because one important PHP $_SERVER variable is returned as empty in nginx, which is $_SERVER['PHP_SELF']. We ran into this problem before with a client of ours, and this article explains in details how to address the issue. Essentially, you will need to modify several configuration files: the nginx.conf file, the fastcgi_params file, and the php.ini file. You will need to restart the nginx server, and php-fpm.

Note that this article is relatively old, so it might be that the configuration settings are a bit different - it is a good idea to do this change during off hours to avoid any downtime during peak hours. Also, needless to say, make sure you backup each and every file that you change before working on it.

1
  • Thank you for your answer ictopus, I checked that variable but in my case was not the problem. I lost some more hours and I decided to buy the paid version of the Falang plugin and to open a ticket to the developers. After installing the paid version which was the actually same version as the free one, everything started to work properly. I hope this can help somebody that have similar problems. Aug 11, 2023 at 16:51
1

After I lost some more hours on the problem I decided to buy the paid version of the Falang plugin and to open a ticket to the developers. After installing the paid version which was the actually same version as the free one, everything started to work properly. I hope this can help somebody that has similar problems.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.