Bug #3754
closed
J3.0: GET emptied when SEF is enabled
Added by krileon about 12 years ago.
Updated about 12 years ago.
Start date:
29 October 2012
Description
When pulling variables from GET with SEF enabled on Joomla 3.0 it'll always return nothing as GET is being completely emptied by Joomla before CB is reached. This completely breaks _getAbsURLwithParam wherever used (profilebook/profilegallery for example).
Files
$_GET = array_merge( array_diff( $_REQUEST, $_POST ), $_GET );
The above works in CBs router file of function comprofilerBuildRoute.
This is due to JRequest::set($result, 'get', false); being removed from function route in JApplication.
This entire usage is depreciated. Joomla 3.0 strictly uses $_REQUEST only.
- File 3754.patch 3754.patch added
- Status changed from Assigned to Feedback
- Assignee changed from krileon to beat
- % Done changed from 0 to 50
Attached is my proposed fix to Joomla. Aside from this the JInput would need to be improved to handle this. Only $_REQUEST is passed by reference when using the input api and if you pass a new source it won't be by reference and you'd lose any other existing $_GET variables.
- Assignee changed from beat to krileon
That fix will be rejected.
Fix should IMHO not be in the use of def() but in the def() function itself, with $_GET being assigned at same time as $_REQUEST internally.
Patch to apply a fix to CBs router by preparing $_GET and $_REQUEST from $vars.
Rev1 patch implements a data2 only in cases where $_REQUEST is used. This is simply to prepare $_GET when def is used in case of $_REQUEST.
- Status changed from Feedback to Closed
- Assignee changed from krileon to beat
- % Done changed from 50 to 100
- Estimated time set to 2:00 h
After discussion, Joomla JInput is broken by design as it does not distinguish between $_GET and $_POST and $_COOKIE.
So fix is in CB router.php to fix that design bug of JInput.
r1873 implements and fixes that.
Also available in: Atom
PDF