plainblack.com
Username Password
search
Bookmark and Share
View All Tickets
WebGUI 7.7.32 Breaks Code Editor Under Firefox  (#11409)
Issue

I upgraded to WebGUI 7.7.32 (RHEL 5) and ran into a strange bug. If you use firefox (Linux or Windows) and edit a style template, and reload the edit page (or the second style that is edited), the Code Editor messes up the formatting and puts $1 in strange places.

To make this extra confusing and nasty, if you downgrade WebGUI to 7.7.31, and restart apache, the problem does not go away unless one clears the cache, etc. from Firefox.

The 7.7.32 code editor works fine under IE 8.

 

 

Solution Summary
Comments
preaction
0
2/15/2010 0:25 am
This should be already fixed in 7.7.33. I've attached the relevant file, if you move it to www/extras/yui-webgui/build/code-editor/code-editor.js it should fix the problem.

Downgrading WebGUI is not supported and may break your website.
TheSeparator
0
2/16/2010 5:20 pm
Installed this file, works fine in Firefox and Chrome. Unfortunately in IE8 the entire template is displayed on _one_ line....
rogier
0
2/22/2010 4:38 am
With the new javascript the problem of a "$1" on every empty line is fixed, but I still have problems.

Delete and backspace do not work properly at the end of a line. The backspace will work like a delete button, removing the newline after the cursor instead of the last letter of the line. The delete just moves the cursor to the next line.

In IE8, Safari and Chrome it refuses to create a newline.

In IE8, templates are displayed on 1 line, like TheSeparator said. This is still the case after after the new JS was added to the extras folder, for templates that haven't been edited before.

Maybe it's a good idea to keep the old editor (with the toggle) in stable releases, until the bugs in this new one are fixed?
perlDreamer
0
2/22/2010 5:35 pm
I can't duplicate the delete/backspace problem on IE8/XP or on FF.  It's the only problem where you didn't report which browser is causing you this problem.  Which one is it (and on which OS are you using it)?
ekennedy
0
2/23/2010 1:14 am
I've installed the fix provided by preaction to resolve the $1 problem but still have some weird behavior related to newlines (and leading spaces/tabs) in Chrome and to a lesser degree in Firefox.  In Chrome, I would open a new line and add information and then hit Apply or Save and the information would not be retained.  If it helps I am working under Linux.
rogier
0
2/23/2010 3:31 am
I had the delete/backspace problem in FF 3.5.8 on XP; upgrading to 3.6 doesn't help. FF seems to be the only browser with this specific problem.

Since posting my last comment I also had problems with the text cursor jumping around: when you start typing at the end of a line, the text appears at the start of the next line. It's not consistent, I think it depends on whether there is text on the next line?

Also: pasting text causes the cursor to jump to a random point, lower in the textarea.

Like ekennedy said, all this stuff seems to be related to the handling of newlines.
TheSeparator
0
2/23/2010 2:58 pm
I can confirm Rogier's report about the delete/backspace problem in FF on XP. It feels unconfortable editing templates, since a bug is easily introduced in an other location without realizing it.

How can I disable the CodeEditor if required ?
preaction
0
2/23/2010 5:35 pm
This should be fixed in both 7.7.33 and 7.8.13.

I also conceded to the naysayers and installed a toggle.
rogier
0
3/10/2010 9:58 am
Could you tell me the commit hash for that fix, so we can backport it?
perlDreamer
0
3/10/2010 10:50 am
It's more than a single commit, and I believe that the code changes for 7.7 and 7.8 are different, since they use different versions of YUI.

git log www/extras/yui-webgui/build/code-editor/code-editor.js

7.8.13:
491f587c7de041ab4878846b8be273884729a79b 8d4a63b774ca4cc0220e283a15fd5d559fb4f0e6 c9694d3e63b57e856ddf9738e54a6ad55e57180d 704518007f70a20194a73df9ce67f10ecbce8a6f b86785faec723343be710e1c79409358ac9165d6

7.7.33:
e159babdb2fd1f7358837e07c5c2746a215fb3f5
1cdd42fe95e5cec542a760372ee2172c1e0d92c3
001b364ec9c8bc7b62a5f2885caa660d1357515f
4df445b4510393504ae48be7b552d1f914218128
e0f87dbe119f8659482cfa00d1bc7a249eb25ea9
rogier
0
3/10/2010 11:19 am
Thnaks, I needed the ones for 7.7.33. But these are only the changes in code-editor.js right? I ask because I think the js constructor in the HTML of the edit screen was changed too, to add the toggle.

We figured out that that would be a change in /Form/Codearea.pm, so I think we should be fine if we patch that one too.
perlDreamer
0
3/10/2010 12:43 pm
It would probably be safest to copy both files, the JS and the form plugin rather than patching.  Otherwise I'd go through the whole history of those files very carefully.
Details
Ticket Status Resolved  
Rating0.0 
Submitted ByEvilBill 
Date Submitted2010-02-14 
Assigned To unassigned  
Date Assigned2019-05-22 
Assigned By 
Severity Critical (mostly not working)  
What's the bug in? WebGUI Stable  
WebGUI / WRE Version WebGUI 7.7.32  
URLuse/bugs/tracker/11409
Keywords
Related Files
Ticket History
3/16/2010
12:00 AM
Resolved perlDreamer
3/10/2010
3:58 PM
Pending rogier
2/23/2010
11:35 PM
Resolved DBell
2/23/2010
7:14 AM
Pending ekennedy
2/22/2010
11:35 PM
Feedback Requested perlDreamer
2/15/2010
5:49 AM
Ticket created EvilBill
© 2019 Plain Black Corporation | All Rights Reserved