2.2.14 news title problem - special characters
2.2.14 news title problem - special characters
I have three sites running CMS made easy, and with the last one I installed 2.2.14.
There seemed to a bug concerning the title field. If you used some special characters like "-", then it was coded with - and that seemed to be stored in the database. Quite OK it every other code part agrees with the approach, but none of the templates I use and not even the news list with titles in Core seems to be in line with this. So I changed this behaviour in the action.addarticle.php and action.editarticle.php in modules back to the code that was there in 2.2.13:
[removed by admin]
I don't really understand what it the motivation behind the change that was made. I suspect it was made without proper testing (like putting all kinds of special characters into the title field and see what happens).
Any way, if somebody runs into this problem, there was a simple solution to it.
There seemed to a bug concerning the title field. If you used some special characters like "-", then it was coded with - and that seemed to be stored in the database. Quite OK it every other code part agrees with the approach, but none of the templates I use and not even the news list with titles in Core seems to be in line with this. So I changed this behaviour in the action.addarticle.php and action.editarticle.php in modules back to the code that was there in 2.2.13:
[removed by admin]
I don't really understand what it the motivation behind the change that was made. I suspect it was made without proper testing (like putting all kinds of special characters into the title field and see what happens).
Any way, if somebody runs into this problem, there was a simple solution to it.
Re: 2.2.14 news title problem - special characters
This was already reported here: http://dev.cmsmadesimple.org/bug/view/12284
It will be fixed in a separate release of News soon, but for now you can use |unescape:'html' in your templates as a workaround.
Please note that core code changes are not permitted in the forum, please use the forge for that.
It will be fixed in a separate release of News soon, but for now you can use |unescape:'html' in your templates as a workaround.
Please note that core code changes are not permitted in the forum, please use the forge for that.
Not getting the answer you need? CMSMS support options
Re: 2.2.14 news title problem - special characters
Does anyone know when the news modules bugs such as this will be fixed for 2.2.14? I have many users complaining and it's not giving CMSMS a good name. I dont want to have to go through all the templates and add code to escape the html. Surely this should be seen as an urgent fix as it has broken working sites?
Re: 2.2.14 news title problem - special characters
We just released a new version of the News module via Module Manager. It will be available in a few hours at your website. Or download the XML at the Forge:
http://dev.cmsmadesimple.org/project/files/8
http://dev.cmsmadesimple.org/project/files/8
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: 2.2.14 news title problem - special characters
Thanks Rolf. Has this fix been rolled into 2.2.14 or will the news module need updating after each upgrade? Regards.
Re: 2.2.14 news title problem - special characters
We can't/wouldn't retroactively change an already released release. The module is released separately, and will also be included in the next cmsms release.
Not getting the answer you need? CMSMS support options
Re: 2.2.14 news title problem - special characters
Oh OK. That means that the current release you are advocating that people download to upgrade or install has a known problem. Surely you need a 'fix' release or at least advise that anyone using 2.2.14 has to also download and upgrade the news module?
Re: 2.2.14 news title problem - special characters
The new version of News will appear in Module Manager automatically. You should however go there yourself and decide to install or not.
Although this bug is annoying - like most of the bugs are - it is not a vulnerability. A fix has been released quickly and is available for all users.
In our opinion this is no reason to release a new version of CMSMS. When we release a new version, of course the News fixes will be included.
Although this bug is annoying - like most of the bugs are - it is not a vulnerability. A fix has been released quickly and is available for all users.
In our opinion this is no reason to release a new version of CMSMS. When we release a new version, of course the News fixes will be included.
Re: 2.2.14 news title problem - special characters
Hi
I had the problem with non standard characters being displayed as hex code. My simple fix was to change the way the title code was rendered in the template.
From this
to this
The first version is the code from the default tempalte. I would just be interested to know if by removing the cms escape will cause any problems or other issues.
I had the problem with non standard characters being displayed as hex code. My simple fix was to change the way the title code was rendered in the template.
From this
Code: Select all
<a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape}</a>
Code: Select all
<a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title}</a>
Re: 2.2.14 news title problem - special characters
Hi
I got the work around to get the page to display OK.
However it now seems that the variable I pass to the page to create the meta data og:title now has the hex code no matter hoiw I configure the template.
This is the code at the top of the template to set the variable
This is what renders in the header
Should read "Cut Energy Costs By 40% With Combined Heat and Power (CHP)"
This is after upgrading to the latest release of news, with CMSM 2.2.14
I got the work around to get the page to display OK.
However it now seems that the variable I pass to the page to create the meta data og:title now has the hex code no matter hoiw I configure the template.
This is the code at the top of the template to set the variable
Code: Select all
{$canonical_url = $entry->canonical scope=global}
{$page_description = $entry->summary|default:$entry->content|strip_tags:false|strip|truncate:300 scope=global}
{$page_title = $entry->title|cms_escape:htmlall scope=global}
{$article_date = $entry->postdate|cms_date_format scope=global}
Code: Select all
<meta property="og:title" content="Cut Energy Costs By 40% With Combined Heat and Power (CHP) "
This is after upgrading to the latest release of news, with CMSM 2.2.14
Re: 2.2.14 news title problem - special characters
Hi
Being a bit of a "Norman".
Added
and the meta data renders OK
Being a bit of a "Norman".
Added
Code: Select all
{$page_title = $entry->title|unescape:"htmlall" scope=global}