Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrupted code when editing content of 404 page. #1752

Closed
wollombiwombat opened this issue Aug 22, 2012 · 6 comments
Closed

Corrupted code when editing content of 404 page. #1752

wollombiwombat opened this issue Aug 22, 2012 · 6 comments
Labels
Bug Confirmed existing bug Type: Discussion

Comments

@wollombiwombat
Copy link

Pyro2.2dev and 2.1.3 (I have not tested 2.1.4dev or gone earlier that 2.1.3)

If the content in the 404 page is edited in CKeditor, the link code gets mangled like so:

href="{{ pages:url id=" title="Home">here

Opening and closing [a] tags omitted for clarity.

@jerel
Copy link
Member

jerel commented Aug 22, 2012

What browser are you using? Have you tested with any others?

Also is the WYSIWYG configuration modified or still using the default?

@wollombiwombat
Copy link
Author

Sorry - Should have included browsers:
-Win7 with Ggle Chrome (version: 21.0.1180.83 m) and Firefox 14.0.1
Have not touched the CKeditor settings :)

@philsturgeon
Copy link
Member

Could you pastie in the entire input? Also, what is the history of this install? Upgraded from previous versions? Installed directly?

What are the steps required to make this appear as broken?

@wollombiwombat
Copy link
Author

Thanks Phil. I have seen this in 2.1.2pro locally installed client sites and a 2.1.3pro locally installed dev site but worked around it. However I thought I should flag it when I noticed the same behaviour in 2.2.dev (pro) which I grabbed on 10-AUG and installed on 11-AUG.
http://d.pr/i/qj4E shows the 404 page content in as supplied state.
http://d.pr/i/u6OM shows the 404 page content when changing the editor from HTML to WYSIWYG-Simple.
http://d.pr/i/OiFV shows the 404 page content when changing back to HTML from WYSIWYG-Simple.

So, another way to see this is to simply change from HTML to either WYSIWYG mode, make some change to the wording - without touching the link, save the edit, test the 404 page and see that the link is not working. Return to the 404 Page in the editor and check the HTML. The issue here is that if a site is put into production by someone, and a client is then given the task to add his/her own wording, the link will be broken. Thats how I discovered this issue in the first place. Just though that it should be flagged and looked into as others may fall into this trap.
Hope this helps.

@philsturgeon
Copy link
Member

Thank you for the run through, that was REALLY helpful!

So I have recreated the bug: http://d.pr/i/IFTV

I think this is down the regex being used by CKEditor to switch its HTML around - and technically the code we have there is invalid.

It should be:

<a title="Home" href="{{ pages:url id='1' }}">here</a>

or

<a title="Home" href='{{ pages:url id="1" }}'>here</a>

I guess I'll just make the change to the 1st, to keep the HTML consistent.

@jerel @adamfairholm ?

philsturgeon pushed a commit that referenced this issue Aug 29, 2012
@wollombiwombat
Copy link
Author

Phil - Thanks for the fix. Pleased that I was able to help with the added details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed existing bug Type: Discussion
Projects
None yet
Development

No branches or pull requests

3 participants