Project

General

Profile

Actions

Bug #3754

closed

J3.0: GET emptied when SEF is enabled

Added by krileon about 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Target version:
Start date:
29 October 2012
Due date:
% Done:

100%

Estimated time:
2:00 h

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

3754.patch (458 Bytes) 3754.patch krileon, 30 October 2012 18:26
router.php.patch (503 Bytes) router.php.patch krileon, 30 October 2012 19:05
3754_rev1.patch (820 Bytes) 3754_rev1.patch krileon, 30 October 2012 19:08
Actions #1

Updated by krileon about 12 years ago

$_GET = array_merge( array_diff( $_REQUEST, $_POST ), $_GET );

The above works in CBs router file of function comprofilerBuildRoute.

Actions #2

Updated by krileon about 12 years ago

This is due to JRequest::set($result, 'get', false); being removed from function route in JApplication.

Actions #3

Updated by krileon about 12 years ago

This entire usage is depreciated. Joomla 3.0 strictly uses $_REQUEST only.

Actions #4

Updated by krileon about 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.

Actions #5

Updated by beat about 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.

Actions #6

Updated by krileon about 12 years ago

Patch to apply a fix to CBs router by preparing $_GET and $_REQUEST from $vars.

Actions #7

Updated by krileon about 12 years ago

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.

Actions #8

Updated by beat about 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.

Actions

Also available in: Atom PDF