Currently working with a production site using 2.5.19 and we suddenly received the following fatal error on our homepage:
This error only occurs on the homepage so we're able to access every other page of the website.Duplicate entry 'odi6ccrbmhrqbbu5not9dqq4v0' for key 'PRIMARY' SQL=INSERT INTO `jos_session` (`session_id`, `client_id`, `time`) VALUES ('odi6ccrbmhrqbbu5not9dqq4v0', 0, '1620301575')
What we've tried:
1. Fixing the database from the Extensions Manager in the admin panel
2. Optimizing, repairing, truncating the sessions table in PHP MyAdmin
3. Using code from the following tracker
4. Clearing Joomla and browser cache
5. Dropping the sessions table and creating it again
As the error only occurs on the home page, we're able to employ a degree of damage limitation and switch the home page in the menu item. However, this doesn't rectify the issue and is only a sticking plaster to the problem.
We had a similar issue in March. I'd like to say we resolved it ourselves but the issue seemed to correct itself after 20 hours or so. Obviously, now this is happening again we now need to look into the problem a little deeper.
My analysis is somewhat of a novice but, as the issue is strictly related to the homepage, I've been looking into the "includes" folder to see why the page is dying. There is some code somewhere displaying the error code and then shutting down all other code.
I've attempted to resolve this by using a php function called "register_shutdown_function" which will execute a function when a fatal error occurs. Again, I've had no luck so far in employing this method.
Any help would be very welcome.