Mambo BTS

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.

| Tasklist |

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
Task Type Defect
Category Frontend
Status Researching
Assigned To Andres Felipe Vargas valencia (andphe)
Operating System All
Severity High
Priority Normal
Reported Version 4.6.4
Due in Version 4.6.6
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Enable SEF and try to Vote ...

its showing this error :

Thanks for your
are not authorized to view this resource.

This task depends upon

Comment by Dean Marshall (DeanMarshall) - Monday, 19 May 2008, 10:19 GMT-4

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.

Comment by Mohsen (mohsen) - Monday, 19 May 2008, 10:26 GMT-4

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

Comment by Dean Marshall (DeanMarshall) - Monday, 19 May 2008, 11:19 GMT-4

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

Comment by Dean Marshall (DeanMarshall) - Monday, 19 May 2008, 22:38 GMT-4

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

Comment by Lynne Pope (Elpie) - Tuesday, 20 May 2008, 03:20 GMT-4

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?

Comment by Dean Marshall (DeanMarshall) - Tuesday, 20 May 2008, 08:10 GMT-4

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

Comment by suryanto rachmat (suryanto) - Wednesday, 11 June 2008, 05:34 GMT-4

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

Comment by Lynne Pope (Elpie) - Tuesday, 17 June 2008, 07:45 GMT-4

There is a known issue with SEF and a workaround here: http://forum.mambo-foundation.org/showpost.php?p=63286&postcount=3

Comment by Lynne Pope (Elpie) - Tuesday, 05 August 2008, 23:27 GMT-4

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.

Comment by Lynne Pope (Elpie) - Tuesday, 05 August 2008, 23:28 GMT-4
  • Field changed: Status (Unconfirmed → Researching)
  • Field changed: Reported Version (In progress → 4.6.4)
  • Field changed: Due in Version (Undecided → 4.7)
  • Task assigned to Lynne Pope (Elpie)

Assigning to myself to follow up on code inconsistencies.

Comment by Lynne Pope (Elpie) - Tuesday, 05 August 2008, 23:30 GMT-4

Loading...