?
avatar schnuti
schnuti
28 Nov 2015

Steps to reproduce the issue

Joomla SEF set in the configuration.

Open an article with non "english" characters in the alias.
Have a look in the Html head source code.
Sorry, I had to manipulate the links a little to get them visible in the text.

Expected result

base h...="...://localhost/joomla/286-news/3-vi-går-i-snöväder" />

Actual result

base h...="...//localhost/joomla/286-news/3-vi-g%C3%A5r-i-sn%C3%B6v%C3%A4der" />
link h...="...//localhost/joomla/286-news/3-vi-går-i-snöväder" rel="canonical" />

System information (as much as possible)

Joomla 3.5.0 beta latest, XAMPP, Win10

More info

I've tried to find where the uri is set. I came only so far, that the uri used in the Sef plugin gets a uri with those funny characters.

The problem with it is mainly, that you get canonical links, that shouldn't be there! Search engines do not like that.

The problem is probably not new, but I have no other Joomla instance available right now.

avatar schnuti schnuti - open - 28 Nov 2015
avatar schnuti
schnuti - comment - 28 Nov 2015

Have a look at gitHub to see he missing expected and actual result info.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8566.

avatar infograf768
infograf768 - comment - 29 Nov 2015

There is a simple way to display url decoded <base
Change line 76 of ROOT/libraries/joomla/document/html/renderer/head.php
from
$buffer .= $tab . '<base href="' . $document->getBase() . '" />' . $lnEnd;
to
$buffer .= $tab . '<base href="' . urldecode($document->getBase()) . '" />' . $lnEnd;
or
$buffer .= $tab . '<base href="' . rawurldecode($document->getBase()) . '" />' . $lnEnd;
`

I am not sure it is useful as percentencoding is perfectly understood/decoded by Search engines.

avatar infograf768 infograf768 - change - 29 Nov 2015
Category Plugins Router / SEF Front End
avatar joomla-cms-bot joomla-cms-bot - change - 29 Nov 2015
Title
Uri not utf8 encoded - base path in Html head bad - cononical link created
Uri not utf8 encoded - base path in Html head bad - cononical link created
avatar schnuti
schnuti - comment - 29 Nov 2015

@infograf768
Thanks for the tip. As I wrote above the problem is not really the the percentencoding but the canonical links. I found some recomendation to use rawurldecode before urldecode.

I made a PR to make this change in the system plugin sef.php.

#8568 SEF plugin, Fix the uri comparison to be utf8 conform
Ready to test.

You can close this as I have the PR.

avatar zero-24 zero-24 - change - 29 Nov 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-11-29 14:00:37
Closed_By zero-24
avatar zero-24 zero-24 - close - 29 Nov 2015

Add a Comment

Login with GitHub to post a comment