No Code Attached Yet
avatar richard67
richard67
12 Dec 2022

Steps to reproduce the issue

Configure PHP so that errors are logged into a file.

Switch on debug in global configuration.

Set error reporting to maximum in global configuration.

Make sure the "Track Request History" option in the "Debug" system plugin is disabled.

Load the system dashboard and check the icon right beside "Install - Discover", "Update - Joomla" and "Update - Extensions".

Check PHP error log.

Expected result

2022-12-12_j4 3_quickicons-system-dashboard_ok

Note the green check marks right beside the "Install - Discover", "Update - Joomla" and "Update - Extensions".

The PHP error log file doesn't show anything special.

Actual result

2022-12-12_j4 3_quickicons-system-dashboard

Note the red crosses right beside the "Install - Discover", "Update - Joomla" and "Update - Extensions".

What is interesting: The quick icons for "Maintenance - Database", "Maintenance - Global Check-in" and "Information - Warnings" seem to work.

In the PHP error log file:

Warning:  session_write_close(): Failed to write session data using user defined save handler. (session.save_path: /var/lib/php/sessions) in /home/richard/lamp/public_html/joomla-cms-4.2-dev/libraries/vendor/joomla/session/src/Storage/NativeStorage.php on line 114, referer: https://www.joomla-42-dev.vmubu01.vmnet2.local/administrator/index.php?option=com_cpanel&view=cpanel&dashboard=system
Stack trace:, referer: https://www.joomla-42-dev.vmubu01.vmnet2.local/administrator/index.php?option=com_cpanel&view=cpanel&dashboard=system
  1. Joomla\\CMS\\Session\\Storage\\JoomlaStorage->close() /home/richard/lamp/public_html/joomla-cms-4.2-dev/libraries/src/Session/Storage/JoomlaStorage.php:0, referer: https://www.joomla-42-dev.vmubu01.vmnet2.local/administrator/index.php?option=com_cpanel&view=cpanel&dashboard=system
  2. Joomla\\Session\\Storage\\NativeStorage->close() /home/richard/lamp/public_html/joomla-cms-4.2-dev/libraries/src/Session/Storage/JoomlaStorage.php:136, referer: https://www.joomla-42-dev.vmubu01.vmnet2.local/administrator/index.php?option=com_cpanel&view=cpanel&dashboard=system
  3. session_write_close() /home/richard/lamp/public_html/joomla-cms-4.2-dev/libraries/vendor/joomla/session/src/Storage/NativeStorage.php:114, referer: https://www.joomla-42-dev.vmubu01.vmnet2.local/administrator/index.php?option=com_cpanel&view=cpanel&dashboard=system
Warning:  session_write_close(): Failed to write session data using user defined save handler. (session.save_path: /var/lib/php/sessions) in /home/richard/lamp/public_html/joomla-cms-4.2-dev/libraries/vendor/joomla/session/src/Storage/NativeStorage.php on line 114, referer: https://www.joomla-42-dev.vmubu01.vmnet2.local/administrator/index.php?option=com_cpanel&view=cpanel&dashboard=system
Stack trace:, referer: https://www.joomla-42-dev.vmubu01.vmnet2.local/administrator/index.php?option=com_cpanel&view=cpanel&dashboard=system
  1. Joomla\\CMS\\Session\\Storage\\JoomlaStorage->close() /home/richard/lamp/public_html/joomla-cms-4.2-dev/libraries/src/Session/Storage/JoomlaStorage.php:0, referer: https://www.joomla-42-dev.vmubu01.vmnet2.local/administrator/index.php?option=com_cpanel&view=cpanel&dashboard=system
  2. Joomla\\Session\\Storage\\NativeStorage->close() /home/richard/lamp/public_html/joomla-cms-4.2-dev/libraries/src/Session/Storage/JoomlaStorage.php:136, referer: https://www.joomla-42-dev.vmubu01.vmnet2.local/administrator/index.php?option=com_cpanel&view=cpanel&dashboard=system
  3. session_write_close() /home/richard/lamp/public_html/joomla-cms-4.2-dev/libraries/vendor/joomla/session/src/Storage/NativeStorage.php:114, referer: https://www.joomla-42-dev.vmubu01.vmnet2.local/administrator/index.php?option=com_cpanel&view=cpanel&dashboard=system
Warning:  session_write_close(): Failed to write session data using user defined save handler. (session.save_path: /var/lib/php/sessions) in /home/richard/lamp/public_html/joomla-cms-4.2-dev/libraries/vendor/joomla/session/src/Storage/NativeStorage.php on line 114, referer: https://www.joomla-42-dev.vmubu01.vmnet2.local/administrator/index.php?option=com_cpanel&view=cpanel&dashboard=system
Stack trace:, referer: https://www.joomla-42-dev.vmubu01.vmnet2.local/administrator/index.php?option=com_cpanel&view=cpanel&dashboard=system
  1. Joomla\\CMS\\Session\\Storage\\JoomlaStorage->close() /home/richard/lamp/public_html/joomla-cms-4.2-dev/libraries/src/Session/Storage/JoomlaStorage.php:0, referer: https://www.joomla-42-dev.vmubu01.vmnet2.local/administrator/index.php?option=com_cpanel&view=cpanel&dashboard=system
  2. Joomla\\Session\\Storage\\NativeStorage->close() /home/richard/lamp/public_html/joomla-cms-4.2-dev/libraries/src/Session/Storage/JoomlaStorage.php:136, referer: https://www.joomla-42-dev.vmubu01.vmnet2.local/administrator/index.php?option=com_cpanel&view=cpanel&dashboard=system
  3. session_write_close() /home/richard/lamp/public_html/joomla-cms-4.2-dev/libraries/vendor/joomla/session/src/Storage/NativeStorage.php:114, referer: https://www.joomla-42-dev.vmubu01.vmnet2.local/administrator/index.php?option=com_cpanel&view=cpanel&dashboard=system

System information (as much as possible)

Current 4.2-dev branch or current 4.3-dev branch.

PHP 8.x. (I haven't checked if it also happens with PHP < 8).

Global Configuration:

  • Debug System = Yes
  • Error Reporting = maximum
  • System Cache = Off
  • Session Handler = Database

"Track Request History" option in the "Debug" system plugin is disabled.

Additional comments

The network or the console don't show any errors in the browser's developer tools when the error happens.

The quick icons in the home dashboard work fine and so are not concerned by this error.

When the the "Track Request History" option in the "Debug" system plugin is enabled, the problem disappears, and the quick icons in the system dashboard work fine.

=> Same cause as issue #39341 ?

See comment #39341 (comment) by @SharkyKZ there:

This is coming from recent changes in debug plugin. When Track Request History option is disabled, an unlimited number of request data is stored in the session until a HTML page is opened.

This fits to the symptoms because before I had increased the memory limit from 128 to 256 MB I got a memory limit exceeded error, too.

So this issue might be considered a duplicate, but I created it to have the very different symptoms documented.

avatar richard67 richard67 - open - 12 Dec 2022
avatar joomla-cms-bot joomla-cms-bot - change - 12 Dec 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 12 Dec 2022
avatar richard67 richard67 - change - 12 Dec 2022
The description was changed
avatar richard67 richard67 - edited - 12 Dec 2022
avatar richard67 richard67 - change - 12 Dec 2022
The description was changed
avatar richard67 richard67 - edited - 12 Dec 2022
avatar richard67 richard67 - change - 12 Dec 2022
The description was changed
avatar richard67 richard67 - edited - 12 Dec 2022
avatar richard67 richard67 - change - 12 Dec 2022
The description was changed
avatar richard67 richard67 - edited - 12 Dec 2022
avatar richard67 richard67 - change - 12 Dec 2022
Title
Quick icons in system dashboard fail on PHP 8.x when debug is on with the "Track Request History" option disabled
Quick icons in system dashboard fail when debug is on with the "Track Request History" option disabled
avatar richard67 richard67 - edited - 12 Dec 2022
avatar richard67 richard67 - change - 12 Dec 2022
The description was changed
avatar richard67 richard67 - edited - 12 Dec 2022
avatar richard67 richard67 - change - 12 Dec 2022
The description was changed
avatar richard67 richard67 - edited - 12 Dec 2022
avatar richard67 richard67 - change - 12 Dec 2022
The description was changed
avatar richard67 richard67 - edited - 12 Dec 2022
avatar richard67 richard67 - change - 12 Dec 2022
The description was changed
avatar richard67 richard67 - edited - 12 Dec 2022
avatar Fedik
Fedik - comment - 13 Dec 2022

Please try remove these lines

if ($app instanceof SessionAwareWebApplicationInterface) {
$this->session = $app->getSession();
}

And check if it works after, also whether it still work when "Track Request History" is On (whether it collects history, look in /cahce/plg_debug folder)

avatar richard67
richard67 - comment - 13 Dec 2022

Please try remove these lines

@Fedik Would this then be the fix, or is this just for testing/investigation?

avatar Fedik
Fedik - comment - 13 Dec 2022

Just testing

avatar richard67
richard67 - comment - 13 Dec 2022

@Fedik It works. But I think that's not the final fix, right? I would not understand what the $session class variable is good for in this case.

avatar Fedik
Fedik - comment - 13 Dec 2022

It works. But I think that's not the final fix, right?

Yeah, not final. We probably have to remove use of a real session from JoomlaHttpDriver for debug plugin.
Sometime I try to do some test also, and will prepare PR if all be good.

avatar Fedik
Fedik - comment - 30 Dec 2022

Please test #39526

avatar Fedik
Fedik - comment - 30 Dec 2022

The reason of the issue, that when track_request_history set to Off, then whole log stored in session, and it become huge after a while.

avatar richard67 richard67 - close - 30 Dec 2022
avatar richard67
richard67 - comment - 30 Dec 2022

Closing as having a pull request.

avatar richard67 richard67 - change - 30 Dec 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-12-30 09:34:20
Closed_By richard67

Add a Comment

Login with GitHub to post a comment