Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Problem with "Chrome" - Entity 'eacute' not defined


Go to End


8 Posts   8081 Views

Avatar
JuLo

Community Member, 37 Posts

15 December 2009 at 7:03pm

Hi,

My website uses two languages.
It works perfectly on IE and Firefox, but when using Chrome, I cannot use any é (eacute).
Chrome says: "error on line 149 at column 43: Entity 'eacute' not defined"

The rest of the page is displayed properly, but all "special characters" are skipped.

A bit of reseach showed me that this issue happens with all Webkit browsers (Chrome and Safari), and some other CMS have found a fix/hack.

Anyone has found such a fix for Silvestripe?
Or at least send me in the right direction?

Note that if I copy/paste the source of the Silverstripe generated page and save it as HTML, it is opened fine by Chrome.

Thanks,

Julo

Avatar
dalesaurus

Community Member, 283 Posts

16 December 2009 at 4:11am

That is a nasty issue that I don't think has been "solved" in SS even though it seems to be a webkit bug. You would have to do some low-level hacking to replace all chars before sending to the browser. Any idea what the actual issue with webkit is?

Avatar
JuLo

Community Member, 37 Posts

16 December 2009 at 12:29pm

Edited: 16/12/2009 12:30pm

Thanks for the reply.

No, I don't know what the actual problem is.
As far as I can tell, it seems that Webkit is expecting pure HTML and Silverstripe returns HTML special characters, which do not agree with Webkit.

The place where I found the most info was here (explained more clearly):
http://www.mooforum.net/solutions12/request-html-for-webkit-safari-chrome-t239.html

It was a problem with Mootools (a JavaScript framework, whatever that means) and someone solved the problem by doing some hacking of Mootools itself, as explained in the above link.
I was hoping that someone had already done the same for Silverstripe.

It is very strange that if I copy the source from the Chrome viewer, save it in an HTML file, then open that file in Chrome it works fine.
And I can't believe that other people have done multilingual websites without reporting this.

Any help will be greatly appreciated, as my client is primarily using Chrome.

Thanks,

Avatar
JuLo

Community Member, 37 Posts

16 December 2009 at 12:32pm

Edited: 16/12/2009 1:44pm

I am a retard.
The problem was with my HTML Document type declaration.

I changed from "XHTML 1.1" to "HTML 4.01 Transitional" and it worked.

Pfeew. And thinking I was ready to hack the core for that. Not such a nasty problem after all... ;-)

Sorry for the hassle.

JuLo

Edit: NOT SOLVED

Avatar
dalesaurus

Community Member, 283 Posts

16 December 2009 at 12:42pm

Good to hear, I've seen several variants on this issue as the newer systems start with the XHTML doc type by default and lots of legacy code doesn't respect the standard. Especially with regards to ampersands and the like. Modern browsers are quick to point out the parsing error but don't offer much else.

Avatar
JuLo

Community Member, 37 Posts

16 December 2009 at 12:55pm

Yeah, but that still means that if Silverstripe wants to use strict XHTML 1.1 instead of Transitional, it should stop using the old &eacute or &ampersand etc. and replace it with the é, & etc.

Should we post that somewhere to make the developers aware of this?

Avatar
JuLo

Community Member, 37 Posts

16 December 2009 at 1:45pm

I was tripping.

Changing the DOC TYPE did not help at all.
I think I must have gotten excited and opend the document in Firefox again by accident.

So I still need help and suggestions please!!!

JuLo

Avatar
JuLo

Community Member, 37 Posts

16 December 2009 at 3:39pm

I played with many Unicode and ISO types and it suddenly started working.

I'll be honest, I don't know what I had wrong before, the current doctype that works is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//{$CurLang}" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$CurLang}" >

Which is what I thought I had before, but I think I will leave this one alone, since it is now working.
Another mystery of the joys of web developing.

JuLo