Bug #3754
closedJ3.0: GET emptied when SEF is enabled
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
Updated by krileon almost 12 years ago
$_GET = array_merge( array_diff( $_REQUEST, $_POST ), $_GET );
The above works in CBs router file of function comprofilerBuildRoute.
Updated by krileon almost 12 years ago
This is due to JRequest::set($result, 'get', false); being removed from function route in JApplication.
Updated by krileon almost 12 years ago
This entire usage is depreciated. Joomla 3.0 strictly uses $_REQUEST only.
Updated by krileon almost 12 years ago
- 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.
Updated by beat almost 12 years ago
- 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.
Updated by krileon almost 12 years ago
- File router.php.patch router.php.patch added
Patch to apply a fix to CBs router by preparing $_GET and $_REQUEST from $vars.
Updated by krileon almost 12 years ago
- File 3754_rev1.patch 3754_rev1.patch added
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.
Updated by beat almost 12 years ago
- 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.