Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Oct 17, 2014

add url decode in tag base

Original Report

Steps to reproduce the issue

  1. Joomla with several languages installed, some using latin characters, some featuring diacritics, some with non-latin characters such as Chinese, Burmese and Thai
  2. Aliases set to Unicode and not Transliteration
  3. Associations between menu items are all set correctly

Expected result

(this is what appears in the head for English and other languages using latin characters with no diacritics)

base href="http://wilddogdesigngroup.com/us/about"
[...]
link href="http://wilddogdesigngroup.com/us/about" rel="canonical"
link href="http://wilddogdesigngroup.com/mm/မိတ်ဆက်" rel="alternate" hreflang="my-MM"
link href="http://wilddogdesigngroup.com/cn/为什么选择我们" rel="alternate" hreflang="zh-CN"
link href="http://wilddogdesigngroup.com/id/mengapa-kami" rel="alternate" hreflang="id-ID"
link href="http://wilddogdesigngroup.com/my/kenapa-kami" rel="alternate" hreflang="ms-MY"
link href="http://wilddogdesigngroup.com/th/เหตุผลที่ควรเลือกเรา" rel="alternate" hreflang="th-TH"
link href="http://wilddogdesigngroup.com/vi/tại-sao-chọn-chúng-tôi" rel="alternate" hreflang="vi-VN"

Actual result

(this is what appears in the head for languages using non-latin characters (Chinese, Burmese, Thai) as well as latin characters with diacritics (Vietnamese); the example below is from Thai)

base href="http://wilddogdesigngroup.com/th/%E0%B9%80%E0%B8%AB%E0%B8%95%E0%B8%B8%E0%B8%9C%E0%B8%A5%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%84%E0%B8%A7%E0%B8%A3%E0%B9%80%E0%B8%A5%E0%B8%B7%E0%B8%AD%E0%B8%81%E0%B9%80%E0%B8%A3%E0%B8%B2"
[...]
link href="http://wilddogdesigngroup.com/th/เหตุผลที่ควรเลือกเรา" rel="canonical"

System information (as much as possible)

PHP Built On Linux serv01.ams2.siteground.eu 2.6.32.59-sg3 #9 SMP Wed Sep 26 03:29:25 CDT 2012 x86_64
Database Version 5.5.32-31.0-log
Database Collation utf8_general_ci
PHP Version 5.3.29
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 3.3.6 Stable [ Ember ] 01-October-2014 02:00 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT

Additional comments

In a nutshell, the alternate URLs are correctly appearing in the head of the site on pages in languages using latin characters. They don't appear on pages with latin characters + diacritics (Vietnamese) or non-latin scripts (Chinese, Burmese)

@ghost ghost changed the title libraries/joomla/document/html/renderer/head.php [fix]decode url in tag base Oct 17, 2014
@agata-wdd
Copy link

Just noticed one more detail - the head of the homepage always features the alternate URLs regardless of language, the problem occurs only on the subpages where there are special characters in the URL and the base URL and Canonical appearing different in the source:
base href="http://wilddogdesigngroup.com/th/%E0%B9%80%E0%B8%AB%E0%B8%95%E0%B8%B8%E0%B8%9C%E0%B8%A5%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%84%E0%B8%A7%E0%B8%A3%E0%B9%80%E0%B8%A5%E0%B8%B7%E0%B8%AD%E0%B8%81%E0%B9%80%E0%B8%A3%E0%B8%B2"
link href="http://wilddogdesigngroup.com/th/เหตุผลที่ควรเลือกเรา" rel="canonical"

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

@javigomez javigomez changed the title [fix]decode url in tag base [fix] Decode url in tag base Nov 12, 2014
@javigomez
Copy link
Contributor

adding @infograf768 in cc

@zero-24
Copy link
Contributor

zero-24 commented Nov 27, 2014

@angre can you explain why your test fail?

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

@infograf768
Copy link
Member

Sorry, just saw this..
afaik URL appearing as percent encoding in the head of a page have no impact at all on spiders search engine as they are readable as should by them.
If we urldecode() the base, we should also urldecode the alternates in language filter.

@infograf768
Copy link
Member

btw, test is OK.

@Engholm
Copy link

Engholm commented Jul 6, 2015

The patched code in the /libraries/jooml/document/html/renderer/head.php decodes the base URLs properly. But the hreflang alternate language META links are still missing.

Example:

Spanish: http://www.chriwa.de/es/tecnología
[Missing hreflang META Urls]

English: http://www.chriwa.de/en/technology
hreflang META are rendered properly also in unicode

@roland-d
Copy link
Contributor

Hello @seakson

Thank you for your contribution.

The last comment here was on 6th July. Can you look into the unsuccessful test?

If no reply is received within 4 weeks we will close this issue.

Thanks for understanding!


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

@brianteeman
Copy link
Contributor

Closed


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants