|
|
#1 |
![]() Join Date: Jan 2005
Posts: 5
![]() |
Appearment:
1. when using SEO-type URLs (/component/option,com_rsgallery/ ... etc) AND 2. when using third-party components (potentially this bug can appear in original modules) File: MAMBOROOT/includes/sef.php Function: sefRelToAbs( $string ) Description: This function does URL transformations and it permits non-unique parameter key in URL. I found the following transform result: http://domain.com/component/option,c.../catid,0/id,1/limitstart,0/limit,1/limitstart,1/ So 'limitstart' variable must have a value of '0', but it was rewrited to '1'. So page navigation did not work. My fix was: Code:
--- old/sef.php Wed Sep 8 13:24:43 2004
+++ new/sef.php Tue Jan 18 03:31:01 2005
@@ -203,8 +203,15 @@
$sefstring = "component/";
$temp = split("\?", $string);
$temp = split("&", $temp[1]);
+ $keyvals=array();
+
foreach($temp as $key => $value) {
- $sefstring .= $value."/";
+ $keyvalue=explode('=',$value,2);
+ $keyvals[$keyvalue[0]]=$keyvalue[1];
+ }
+
+ foreach($keyvals as $key => $value) {
+ $sefstring .= $key.'='.$value."/";
}
$string = str_replace( '=', ',', $sefstring );
}
PPS: This bug is mostly related to com_rsgallery component, but the fact of non-unique key permittion in original code is a bug also i think. |
|
|
|
|
#2 |
![]() Join Date: Oct 2003
Location: Sweden
Posts: 760
![]() |
Hello,
Can you please also post how the corespondent non-sef URL looks like here? |
|
|
|
|
#3 |
![]() Join Date: Jan 2005
Posts: 5
![]() |
Actually i didnt understand your question - my english is not good.
I'll try to describe the situation. Lets say i have 3rd party component which uses standard pagenavigation tools. Also I use SEO-type URLs = 'On' in global config (URLs like directories and they are without parameters). So, Before fix my page navigation didnt work in this component. When i click any page number i redirected to 1st page. Before fix script generated the following URL like: Code:
http://domain.com/component/option,com_rsgallery/page,inline/catid,0/id,1/limitstart,0/limit,1/limitstart,1/ Code:
http://domain.com/component/option,com_rsgallery/page,inline/catid,0/id,1/limitstart,0/limit,1/limitstart,2/ After fix script generated URL: Code:
http://domain.com/component/option,com_rsgallery/page,inline/catid,0/id,1/limit,1/limitstart,1/ Code:
http://domain.com/component/option,com_rsgallery/page,inline/catid,0/id,1/limit,1/limitstart,2/ |
|
|
|
|
#4 |
![]() Join Date: Dec 2003
Location: Charlottesville, VA USA
Posts: 2,836
![]() |
He wants you to temporarily disable (turn off) SEF, and post the non-rewritten (non-SEF) URL.
-Tony |
|
|
|
|
#5 |
![]() Join Date: Jan 2005
Posts: 5
![]() |
Got it -thanks. I'll try
|
|
|
|
|
#6 |
![]() Join Date: Jan 2005
Posts: 5
![]() |
Okay. I uninstalled patch and turned SEF off.
Pagenavigation works okay, but duplicate parameters are present: Code:
Without patch and SEF=off (works) to 2nd page: option=com_rsgallery&page=inline&catid=0&id=1&limitstart=0&limit=1&limitstart=1 to 3rd page: option=com_rsgallery&page=inline&catid=0&id=1&limitstart=0&limit=1&limitstart=2 Code:
Without patch and SEF=on (dont work page selection. anyway i have 1st page) to 2nd page: /component/option,com_rsgallery/page,inline/catid,0/id,1/limitstart,0/limit,1/limitstart,1/ to 3rd page: /component/option,com_rsgallery/page,inline/catid,0/id,1/limitstart,0/limit,1/limitstart,2/ Code:
With patch and SEF=on (works) to 2nd page: /component/option,com_rsgallery/page,inline/catid,0/id,1/limitstart,1/limit,1/ to 3rd page: /component/option,com_rsgallery/page,inline/catid,0/id,1/limitstart,2/limit,1/ |
|
|
|
|
#7 |
![]() Join Date: Jan 2005
Posts: 5
![]() |
Also there are some other minor fixes and hacks were done. Where can i publish them?
|
|
|
|
|
#8 |
![]() Join Date: Oct 2003
Location: Sweden
Posts: 760
![]() |
Hello!
Well, as you can see, the problem is in the RSgallery component that has double limitstart argument in the URL. Code:
option=com_rsgallery&page=inline&catid=0&id=1&limitstart=0&limit=1&limitstart=1 We could, as you suggest, put a check in the SEF function to disable duplicates, but this would actually lead to inconsistency between non-sef and sef URL. We want both these links to give the same result. You are welcome to put your other fixes here for consideration. Thanks. |
|
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Installing Mambo Server on Windows - IIS | phardstaff | Installation Questions | 105 | September 6th, 2007 14:37 |
| Mambo OS Performance; Experienced Mambo Developers required | Ritchie | General Questions | 4 | July 23rd, 2006 11:01 |
| NZMac.com goes Mambo | Philip Roy | Sites using Mambo | 14 | July 21st, 2005 22:03 |
| Do developers give up on Mambo? | aerdt | Components | 2 | December 5th, 2004 02:52 |
| Installation von Mambo Stable 4.5. Für Anfänger mit geringen Kenntnissen geeignet ! | hello | German Forum | 17 | November 2nd, 2004 08:48 |