New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed fatal error message on session timeout #9011
Fixed fatal error message on session timeout #9011
Conversation
Two comments:
|
Thank you @mbabker Code has been updated. |
I have tested this item ✅ successfully on bbb6f33 But I still have to login twice and am not returned to the page I was on when the session timed out This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9011. |
@roland-d I have tested this successfully as described above in test instructions, BUT: When updating from 3.4.8 using a patched Beta 2 update container wia Joomla Update (custom URL with patched XML), the update ends with following display: And the error log file of PHP contains following error:
Please advice if I shall set my test result to "success" because this is another issue or cannot be avoided when upgrading from a pre-3.5, or to "failed" because you wanna fix that here, too. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9011. |
P.S.: My PHP version is 5.6.15 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9011. |
@richard67 That error comes from the old native.php file. Line 221 only has a curly brace on it once this patch is applied. A timeout during update, sounds odd though. Perhaps that is another issue. Your test is good I would say, since we need to test with the new native.php file. |
I have tested this item ✅ successfully on bbb6f33 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9011. |
All that points to is what I was saying in the last pull request; something is trying to start/shutdown the session more than the expected once per request cycle. That error specifically isn't related to this pull request, but it needs to be dug into. If someone who is experiencing these issues can open a new bug report and include a stack trace (the |
Hello Michael, When I debugged this, the stack trace wouldn't show anything, it just shows this: When I step through it I went from
in index.php to
in session.php. The validation comes back as false because more than 60 seconds has passed in my case. This then calls:
in session.php which ends up at the save() method in native.php because that is registered as shutdown function. Since the session hasn't started (it was destroyed earlier) it now fails the check:
in native.php, throwing out the RuntimeException. That is what I dug up. |
@mbabker See also my error log above with the problem on update from 3.4.8 and the new native.php: A stack trace was printed out, but is shows only the 1 frame for JSessionHandlerNative->save(). And I am not familiar with debug_backtrace(), so I have the issue but am not sure if I can be the one who digs into this deeper. But if you want I can at least open an issue for that in the issue tracker. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9011. |
When something is triggered as a shutdown function it won't have a stack trace. So if the first occurrence is at that point then the shutdown handler shouldn't be the issue unless there's a bug in the shutdown workflow in general. This patch is fine specifically for the error about writing the session data when the session isn't started (according to Joomla's state). But there still seems to be some deep rooted logic error if the scenario @richard67 tested results in trying to start the session multiple times (meaning there's a disconnect between Joomla's internal state tracking and PHP's own active status). |
I have tested this item ✅ successfully on bbb6f33 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9011. |
Fatal error is gone here but I still have to log twice here. Warning |
@roland-d is this PR supposed to fix the double login and the regression to not be returned to the page you were on when the session timed out or just the fatal error |
@brianteeman This PR is only for fixing the fatal error. |
Fixed fatal error message on session timeout
This PR supposed to be merged but just tested and verified issue without patching. |
It has been merged so it is no longer present in the list of patches displayed by com_patchtester |
Correct but the issue remained on Joomla downloaded from Github this morning |
Yes it will be - but if you look it says merged On 30 January 2016 at 10:48, Gary Barclay notifications@github.com wrote:
Brian Teeman |
Doesn't that mean the patch is applied to the staging version? |
yes On 30 January 2016 at 10:50, Gary Barclay notifications@github.com wrote:
Brian Teeman |
This is a redo of PR #8808 based on the feedback by @mbabker
Test instructions
A signal for @wilsonge :)