In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
365 [In-Portal CMS] Front End bug report always 2009-10-09 04:36 2011-03-14 02:10
closed 5.0.1  
none 5.0.2-B1  
0000365: Mod-rewrite erases page number given in "env" request parameter
Let's say we have two rewrite listeners:
1. UserRewriteListener - handles template name transformations
2. PrivateMessageRewriteListener - handles private message pagination and ids

When UserRewriteListener is pretty sure, that there nothing to give to other rewrite listeners it returns false and PrivateMessageRewriteListener is not called.

I'm building url, that contains such prefixes "m,u,private-message" and private-message prefix event is OnDelete - this is url to delete individual private message.

Both rewrite listeners are written the way, that when event is present, then they don't rewrite prefix data. This way url will be:\-message-16-2-10-OnDelete-

As you can see, it contains private message ID - 16, current page in private message list - 2 and per page in private message list - 10. And I'm assuming that such values (16, 2, 10) will be available in OnDelete event, when I visit mentioned above url. But this doesn't happen (see call trace below):

1. "env" variable is parsed and given variables are extracted from it (we have page number here).
2. page numbers from all rewrite listeners are set to "1" (setting to all rewrite listeners, because we don't know what of that will be represented in event/template; setting to "1" to override page number stored in session) - this is where we loose our page number.
3. when url ends with number, like " set this number as current page for all rewrite listeners.

Problem happens in 2nd step, because it's setting first page to all rewrite listeners no matter will they be called or not.

I propose we apply 2nd and 3rd steps individually before each rewrite listener is called. This way wrong page number won't be set for rewrite listener, that's not even is called.
child of 0000098closed  (5.0.1)alex Redo Mod-Rewrite for Better Flexibility 
patch mod rewrite page override.patch (2,366) 2009-10-09 05:02
Issue History
2011-03-14 02:10 alex Relationship added child of 0000098
2010-01-11 22:05 Dmitry Note Added: 0001359
2010-01-11 22:05 Dmitry Status resolved => closed
2009-10-25 15:29 alex Note Added: 0000968
2009-10-25 15:29 alex Status reviewed and tested => resolved
2009-10-25 15:29 alex Fixed in Version => 5.0.2-B1
2009-10-25 15:29 alex Resolution open => fixed
2009-10-25 15:29 alex Changeset attached 5.0.x r12784
2009-10-25 15:24 alex Note Added: 0000967
2009-10-25 15:24 alex Target Version Icebox => 5.0.2
2009-10-18 02:37 Dmitry Note Added: 0000921
2009-10-18 02:37 Dmitry Assigned To !COMMUNITY => alex
2009-10-18 02:37 Dmitry Status needs testing => reviewed and tested
2009-10-09 05:02 alex Assigned To => !COMMUNITY
2009-10-09 05:02 alex Status active => needs testing
2009-10-09 05:02 alex File Added: mod rewrite page override.patch
2009-10-09 04:40 alex Target Version => Icebox
2009-10-09 04:36 alex New Issue

2009-10-18 02:37   
Reviewed the code - ok, but have no test case to check this.
2009-10-25 15:24   
Moving to 5.0.2 release as community input during 5.0.2-B1 version testing.
2009-10-25 15:29   
Fix committed to 5.0.x branch. Commit Message:

Fixes 0000365: Mod-rewrite erases page number given in "env" request parameter
2010-01-11 22:05   
Closing completed tasks.