Skip to content

Comments

[5.0] 500 error when 404 and debug on [BLOCKER]#41880

Closed
brianteeman wants to merge 1 commit intojoomla:5.0-devfrom
brianteeman:18_issue_500_when_404_and_debug_on
Closed

[5.0] 500 error when 404 and debug on [BLOCKER]#41880
brianteeman wants to merge 1 commit intojoomla:5.0-devfrom
brianteeman:18_issue_500_when_404_and_debug_on

Conversation

@brianteeman
Copy link
Contributor

Enable debug and then trigger a 404 on the frontend

Instead of the regular 404 page we get a 404 and a 500

This is caused by the line commented out in this PR.

That line was added by #35655

Sorry I can't contribute a real solution as I don't understand the code. I was just able to locate the source and provide this PR to showcase the problem

image

Enable debug and then trigger a 404 on the frontend

Instead of the regular 404 page we get a 404 and a 500

This is caused by the line commented out in this PR.

That line was added by joomla#35655

Sorry I can't contribute a _real_ solution as I don't understand the code. I was just able to locate the source
@richard67
Copy link
Member

So I understand right that this PR is not a fix but just for demonstrating the issue? If yes: Maybe it would have been safer to use an issue and describe the code change for the test in that issue?

@Fedik Fedik added the bug label Sep 23, 2023
@Fedik
Copy link
Member

Fedik commented Sep 23, 2023

@brianteeman Please remove these 2 lines, and we will call it a fix, and please make it to 4.4-dev (it comes from there)
the plugin should not manipulate the session.

// Close session to collect possible session-related queries.
$this->getApplication()->getSession()->close();

@HLeithner
Copy link
Member

HLeithner commented Sep 23, 2023

maybe @Denitz can explain the reason behind these 2 lines? #35655

@brianteeman
Copy link
Contributor Author

maybe @Denitz can explain the reason behind these 2 lines? #35655

thats why I did not make a real pr as i didnt understand the reason.

in this case making the pr here was a better way to show the problem imho than a regular issue

@Denitz
Copy link
Contributor

Denitz commented Sep 23, 2023

@brianteeman I will take a look in 1h, we close the session in debug plugin in order to collect the queries related to session close.

@Fedik
Copy link
Member

Fedik commented Sep 23, 2023

@Denitz plugin should not close session, it is wrong to me

@Denitz
Copy link
Contributor

Denitz commented Sep 23, 2023

@brianteeman @Fedik If we don't close the session, we won't see the queries from the session handler.

I've create PR for 4.4-dev, please check #41893

@brianteeman brianteeman deleted the 18_issue_500_when_404_and_debug_on branch September 23, 2023 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants