Opened 6 years ago

Closed 6 years ago

#8573 closed Bug (invalid)

The editor is not rendered in the page if the html file has no extension.

Reported by: Alexandre Martins Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

Steps to reproduce :

1 - Get the latest nightly build (or version 3.6.2)

2 - Change the name of the attached file by removing its extension.

Browser name and OS :

Code highlighting:

alex@dionisos:wm_web_client$ uname -a
Linux dionisos 3.0-6.slh.3-aptosid-amd64 #1 SMP PREEMPT Thu Oct 6 00:31:17 UTC 2011 x86_64 GNU/Linux

Google Chrome 15.0.874.121 Iceweasel (Debian's Firefox with no branding) 8.0

Screenshot :

No need. It's only a blank page in both browsers.

Extra information :

The "Developer Tools" "Console" in Google Chrome shows the following messages when the file without extension gets opened.

Uncaught TypeError: Cannot read property 'cssFloat' of null ckeditor.js:9

a.tools.cssStyleToDomStyle ckeditor.js:9

e ckeditor.js:9

(anonymous function) ckeditor.js:10

(anonymous function) ckeditor.js:149

Attachments (2)

ckeditor_example.html (460 bytes) - added by Alexandre Martins 6 years ago.
ckeditor_example (480 bytes) - added by Jakub Ś 6 years ago.

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by Alexandre Martins

Attachment: ckeditor_example.html added

comment:1 Changed 6 years ago by Alexandre Martins

I foound this out when trying to use URL rewriting for URLs like this one:

/model/idofthemodel/edit

This is relevant because the error that appears when I tried this URL is a bit different. But I couldn't create a good test case to send yet (to many libraries and LiftWeb in the mix). I hope the solution to this simpler bug solves my other one dough.

comment:2 Changed 6 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

The exact error that is shown by a browser is
document.write is not a function
If the most basic JS function is not recognized this means that browser doesn't see this document HTML or XHTML there is nothing CKEditor can do here (Even the basic scripts won't work - checkout my sample).

Your example works provided that you remove <?xml version="1.0" encoding="UTF-8"?>

According to http://www.w3.org/TR/xhtml1/

An XML declaration is not required in all XML documents; however XHTML document authors are strongly encouraged to use XML declarations in all their documents. Such a declaration is required when the character encoding of the document is other than the default UTF-8 or UTF-16 and no encoding was determined by a higher-level protocol.


To workaround the problem you should remove the xml declaration and UTF-8 encoding (which I assume you are using)

Changed 6 years ago by Jakub Ś

Attachment: ckeditor_example added
Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy