As the title states, I just discovered that there is no [(modx_charset)] in MODx anymore.
Is this intentional? or just a mistake.
Thanks.
-
☆ A M B ☆
- 24,524 Posts
What revision? I’ve got 5299, and it has it...
Ok, just grabbed the latest from svn, and indeed it’s not there in the setup.sql file.
However, the parser still wants to use it; line 467
header('Content-Type: ' . $type . '; charset=' . $modx_charset);
-
MODX Staff
- 730 Posts
An issue affecting this setting is in progress..
http://svn.modxcms.com/jira/browse/MODX-916
Thoughts or suggestions in jira are most welcome.
-
MODX Staff
- 12,272 Posts
Assume you have a multi-language site with different character sets for different languages. What happens when the wrong value is returned since the character set value in the database is only for the default Manager language. I think the appropriate solution is to write a custom snippet to dynamically substitute those or a plugin that sets a placeholder.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
☆ A M B ☆
- 24,524 Posts
I commented something similar in jira. Maybe still have the default, since the vast majority of sites will only want the one charset, have the ability to override for the manager on a per-user basis (as many other default site configurations do), and use TVs and plugins to set overrides on a per-document or per-section (@INHERIT) basis.
-
MODX Staff
- 12,272 Posts
I’m probably just tired, but I’m struggling trying to come up with an instance where using [(modx_charset)] vs it’s value in the front end would make sense? Typical front end users are not going to be logged into the manager, so the "default" value is all that would ever be seen, and to date that’s been hard coded to UTF-8 based on the installation script.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
☆ A M B ☆
- 24,524 Posts
The usefulness of using it is in making sure that the headers sent match the meta data in the document HTML head. I don’t know if it really makes any difference, but it does cause a validation warning if they don’t match.
-
MODX Staff
- 12,272 Posts
But my question is more about [(modx_charset)] vs. a plain static UTF-8, which is what is inserted in the MODx database anyway. Or if you build your templates, just setting it properly to begin with since most likely you’ll know to do that if you’re deviating from common UTF-8 stuff anyway.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
Just FYI, we used this in the demo content, and probably most of the templates are distributed, with [(modx_charset)] in the head tag. I see your point in putting the UTF-8 or whatever used manually, but releasing Evo with this not in there, would make site validation break whoever used this tag. (I used this everywhere!) ..
I discovered this when I was testing ditto calls on the demo content that, the RSS template Ditto use has this tag in it, thus failing the RSS feed.