Page 1 of 1

[fixed]Not working links to pages with Czech characters in..

Posted: Sun Apr 02, 2017 10:40 am
by esmiran
After the update of CMS 2.1.6 to 2.2 beta2 not work all the internal links to pages with Czech accents in the name.
URL and Alias these pages contains any of the characters in the national character set. These are mainly latin small/capital letters with caron, acute and more.

On this page you will find a table Czech characters:
https://cs.wikipedia.org/wiki/Unicode#Unicode_8.0

In version 2.1.6, everything worked well. Can you return to the previous method, or when you create a URL alias convert these characters to standard latin?

In this state, it is useless for me.

Re: Not working links to pages with Czech characters in the

Posted: Sun Apr 02, 2017 1:41 pm
by Rolf
Created a page with Title and Menu name "pět emoji modifikátorů"
https://www.cmscanbesimple.com/index.ph ... 1tor%C5%AF
After that I created a menu button "Test" with an internal link to that page and it works for me...

Re: Not working links to pages with Czech characters in the

Posted: Sun Apr 02, 2017 4:32 pm
by esmiran
Tested again on fresh instalation 2.2 beta svn: not working! Link points to homepage.
To repeat bug:
admin - Add new content - Title: Čeština krásná
New content have alias "čeština-krásná".
In Content manager edit another page and create here CMSMS link to page with title "Čeština krásná". Submit, go to edited page and try new created link.
It will point to home page instead of the alias "čeština-krásná".

Re: Not working links to pages with Czech characters in the

Posted: Sun Apr 02, 2017 5:46 pm
by calguy1000
Sorry, but I also cannot reproduce this.

I followed your steps exactly and cannot reproduce this issue. With pretty urls enabled, or disabled.

But as a reminder in your diagnosing efforts. There are two parts to the problem:

a: the URL that is generated by the internal page link
b: routing to the proper page when the URL is requested.

You can isolate part a from part b by looking at the URL that is generated in the output HTML. if it is correct, but when you click on that link it still goes to another page, then you have an issue with mod_rewrite or your server's rewrite rules.

Re: Not working links to pages with Czech characters in the

Posted: Sun Apr 02, 2017 9:58 pm
by esmiran
There is a problem in generated HTML code, a href="" is empty:

Code: Select all

<article class='content' id='main'>
                            <h1>test </h1> 
                                <p>Link to page : <a href="">Če&scaron;tina kr&aacute;sn&aacute;</a></p>
                        </article>
but below it is okay in:

Code: Select all

<span class='previous'>Previous page: <a href="/čeština-krásná" title="Čeština krásná" >Čeština krásná</a></span>

Re: Not working links to pages with Czech characters in the

Posted: Sun Apr 02, 2017 10:38 pm
by esmiran
In a database table: cms_content_props - content_en is:

Code: Select all

<p>Link to page : <a href="{cms_selflink href='če&scaron;tina-kr&aacute;sn&aacute;'}">Če&scaron;tina kr&aacute;sn&aacute;</a></p>
I think that it does not interpret correctly "{cms_selflink href='če&scaron;tina-kr&aacute;sn&aacute;'}" to Alias, command returns an empty result.

Re: Not working links to pages with Czech characters in the

Posted: Mon Apr 03, 2017 8:59 am
by esmiran
I do not know if I've properly described what does not work...
I need to fix first sentence in the report: Internal links with national characters do not work when they are inserted or edited by MicroTiny or TinyMCE in content of page. From the menu links woks well.

Re: Not working links to pages with Czech characters in the

Posted: Mon Apr 03, 2017 12:32 pm
by calguy1000
Internal links with national characters do not work when they are inserted or edited by MicroTiny or TinyMCE in content of page. From the menu links woks well.
This is because tinymce intentionally converts special characters to html entities on form submission. That's just the way it works. So {cms_selflink href='Čeština-krásná'} will be converted to {cms_selflink href=''če&scaron;tina-kr&aacute;sn&aacute;'} on save... there is nothing we can do about that.

You have the ability to specify the alias when editing the page content though.

Re: Not working links to pages with Czech characters in the

Posted: Mon Apr 03, 2017 2:13 pm
by esmiran
I think this not only error in Tiny editor..
If I put the same link to the news, I get a different result:

Code: Select all

<p><a href="{cms_selflink href='če&scaron;tina-kr&aacute;sn&aacute;'}">XXX</a></p>
it seems that internal links in the news do not work.

Re: Not working links to pages with Czech characters in the

Posted: Mon Apr 03, 2017 5:14 pm
by calguy1000
The issue that you're seeing there is because {eval} is not called by default on core templates.

I have made a modification to the {cms_selflink} plugin to do an entity_decode on the href or page parameter before processing it. We'll see if that solves the issue without causing more problems.

Re: [fixed]Not working links to pages with Czech characters

Posted: Tue Apr 04, 2017 7:17 am
by esmiran
[edited]

Please do not post code modifications on this forum.

CMSMS 2.0+ supports UTF-8 characters in page aliases and URL's just like modern browsers do. We will not be implementing a translation to latin characters as there is more than just the european languages to worry about.

Re: [fixed]Not working links to pages with Czech characters

Posted: Tue Apr 04, 2017 1:28 pm
by esmiran
I'm sorry.

Ok, I know about that. But it seems that even your code has a issue with the full implementation of the UTF-8.