-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[4.1] Fix Debug plugin to dump $_POST requests #37465
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
Conversation
|
I have tested this item ✅ successfully on c77d011 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37465. |
|
I have tested this item ✅ successfully on c77d011 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37465. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37465. |
| 'onAjaxDebug' => 'onAjaxDebug', | ||
| 'onBeforeRespond' => 'onBeforeRespond', | ||
| 'onAfterRespond' => 'onAfterRespond', | ||
| ApplicationEvents::AFTER_RESPOND => 'onAfterRespond', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't this two lines identical?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, and that the issue, should be somehow fixed in J5, I guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Application class trigger diferent AfterRespond event for normal request, and for redirect (that usualy happen after POST)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here for respond
joomla-cms/libraries/src/Application/WebApplication.php
Lines 160 to 161 in c604191
| // Trigger the onBeforeRespond event. | |
| $this->triggerEvent('onBeforeRespond'); |
and there for
redirecthttps://github.com/joomla-framework/application/blob/e7b950d2d1358c0baac95a8633a60de20a1e82ab/src/AbstractWebApplication.php#L519-L521
|
Tested after latest changes. It is still RTC and can be merged when tests are ok. |
|
Thanks!! |
Summary of Changes
This enable Debug plugin to collect data while post request (save, cancel tasks, etc).
This was introduced a couple years ago #22327, but broken somwhere in the midle of 4.0 development (due to some refactoring in Application classes).
Testing Instructions
Apply patch, enable debug.

Try to edit any article, save, cancel etc.
Then open debug bar "history viewer"
Actual result BEFORE applying this Pull Request
In history you can see and select only GET requests.
Expected result AFTER applying this Pull Request
In history you can see and select GET and POST requests.

Documentation Changes Required
none