This is the bug tracking and feature request tracking system for the Mambo open source CMS project. To add a new task, or comment or vote on an existing task, please register, preferably by using the same username that you use on the forums.
Please do not open tasks for bugs in versions earlier than Mambo 4.6.5.
FS#347 - SEF & Rate
Attached to Project:
Mambo BTS
Opened by Mohsen (mohsen) - Monday, 19 May 2008, 08:21 GMT-4
Last edited by Andres Felipe Vargas valencia (andphe) - Tuesday, 21 October 2008, 09:04 GMT-4
Opened by Mohsen (mohsen) - Monday, 19 May 2008, 08:21 GMT-4
Last edited by Andres Felipe Vargas valencia (andphe) - Tuesday, 21 October 2008, 09:04 GMT-4
|
DetailsEnable SEF and try to Vote ... its showing this error :
Thanks for your |
This task depends upon
I’m not actually able to confirm the above report - it works for me because the poll module’s form points to the fully qualified url but I did find some sef related issues that look significant. I have however moved one item above the ‘home’ link in mainmenu so perhaps I’ve avoided some weird Itemid issue.
Base href is fubar when sef is on and this is breaking
For
href=”http://wamp.deanmarshall.co.uk/mambo-ext-464/mos/Frontpage/Itemid,1//” />
Comment form submission on this page:
this ‘base’ <base href=”http://wamp.deanmarshall.co.uk/mambo-464-svn/content/view/15/27//”
us to this url
the comment isn’t added.
Dean
Edit: Just realised the ‘vote’ reference was to the ‘rating system’ as per the tracker item’s
works fine also on my testbed - again apparently because of the fully qualified path in the form.
Hi Dean
Please Download Latest release : http://mambo-code.org/releases/Mambo_Full_Package.4.6.4.1713.tar.gz and check everything on this
Mohsen
Updated to 1713 from
the ‘fix’ does workaround the problem as far as the comments are concerned - but I’m worried it is fixing a symptom and not solving the
<base href... /> tag is still broken when sef is
href=”http://wamp.deanmarshall.co.uk/mambo-464-svn/content/view/15/27//” />
Dean
Guys - this code from core.classes.php is just so wrong I can’t tell you - well, okay, I’m about
if (mamboCore::get('mosConfig_sef')) { $baseHref = sefRelToAbs('index.php?'.mosGetParam ($_SERVER,"QUERY_STRING","")); $head['base'] = "<base href=\"{$baseHref}/\" />"; }[/code]
The $baseHref value needs to be set to the $mosConfig_live_site value + a terminal ‘/’.
We seem to have reverted to this core classes method of doing things away from Al’s html helper class - was that a deliberate decision?
Dean
Base href was causing problems with relative links to images and within the site. It was also killing anchors. The helper class was also causing bugs elsewhere. Ok, we have to fix this but it would be easier to take SEF out and stomp it into the ground! We have to get 4.6.4 out so perhaps everyone could indicate what they are prepared to live with until 4.6.5?
Didn’t mean my last post to sound so snarky -
- I think we have three or four entries on the bug tracker that are related to the base href issue.
The line below doesn’t make for a useable base from which relative links can resolve. That breaks images, comments, polls?, captcha?, /admininstrator/ link, and probably others that I can’t recall off
href=”http://example.com/index.php?/” />
Dean
I got the same problem with base href when activate the SEF url. Then I change the core.classes.php to:
if (mamboCore::get('mosConfig_sef')) { //$baseHref = sefRelToAbs('index.php?'.mosGetParam ($_SERVER,"QUERY_STRING","")); $baseHref = mamboCore::get('mosConfig_live_site'); // Set $baseHref to $mosConfig_live_site $head['base'] = "<base href=\"{$baseHref}/\" />"; }Is it OK with this code?
Rachmat
There is a known issue with SEF and a workaround here: http://forum.mambo-foundation.org/showpost.php?p=63286&postcount=3
Suryanto's code works for me however it raises one issue that we must address in 4.7. There are inconsistencies in the code over the use of the trailing slash. We need to make this consistent. If someone uses a trailing slash in $mosConfig_live_site then Suryanto's code with result in a double slash. We need to either remove all trailing slashes from the code and educate users to add it to their $mosConfig_live_site, or we add trailing slashes and tell users not to.
Assigning to myself to follow up on code inconsistencies.
Related: http://mambo-developer.org/tracker/index.php?do=details&task_id=339
Also related to http://mambo-developer.org/tracker/index.php?do=details&task_id=406