Closed
Bug 1171413
Opened 9 years ago
Closed 9 years ago
Content disappears while editing or translating articles with <code> tags. Example: l10n editor only shows 89 lines in https://support.mozilla.org/en-US/kb/upgrade-graphics-drivers-use-hardware-acceleration/edit
Categories
(support.mozilla.org :: Knowledge Base Software, task)
support.mozilla.org
Knowledge Base Software
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: pollti, Assigned: osmose)
References
()
Details
(Whiteboard: p=3 r=?)
Attachments
(3 files)
STR:
#Visit https://support.mozilla.org/de/kb/wie-aktualisiere-ich-meine-grafiktreiber/edit (Fx or IE)
#Scroll down the l10n part (right editor).
Actual result:
-The editor only shows lines 1-89 and turns into white then.
I can reproduce for other locales, too.
Must be something related to migrating to ACE?
Also, when you click "Toggle syntax highlighting", all looks good in that mode.
I'll post about it in the forums, together with the 'temporary workaround' I mentioned above.
Reporter | ||
Comment 2•9 years ago
|
||
Thank you very much, vesper :)
Reporter | ||
Updated•9 years ago
|
Summary: l10n editor only shows 89 lines in https://support.mozilla.org/de/kb/wie-aktualisiere-ich-meine-grafiktreiber/edit → l10n editor only shows 89 lines in https://support.mozilla.org/en-US/kb/upgrade-graphics-drivers-use-hardware-acceleration/edit
Comment 3•9 years ago
|
||
To clarify, we didn't migrate to ACE, we migrated *away* from ACE, to CodeMirror. This gives us a lot better support for non-latin scripts and RTL languages. Also, this is definitely related.
These are the errors we are getting. One of these two errors seems to happen on every scroll event after the text disappears:
TypeError: pend is undefined wiki.editor-min.37582d11f490.js:7:31888
TypeError: pend.text is undefined wiki.editor-min.37582d11f490.js:7:31888
Seems like it will be pretty easy to track down in an unminified build.
Whiteboard: p=?
+1 to Mike's clarification.
-1 to my absentmindedness when trying to sound smart.
Thanks for spotting what's what so fast.
Looking forward to the fix!
It looks like the issue is triggered by something in the "= After upgrading your graphics driver =" section - I'm wondering if the two code sections in there could be responsible - this is one of them:
<code>Components.classes["@mozilla.org/extensions/blocklist;1"].getService(Components.interfaces.nsITimerCallback).notify(null);</code>
Could the formatting here break the text editor? The code tag is in place, but maybe it's not enough for CodeMirror?
Comment 6•9 years ago
|
||
I'm not sure how to estimate this, since I haven't worked with CodeMirror yet.
Rehan, can you estimate this?
Flags: needinfo?(rdalal)
Comment 7•9 years ago
|
||
I'm going to say (as of now) this is a 3pt'er because the initial issue is no longer an issue. I would need to try and reproduce what was happening before I'd be able to fix it.
In the meanwhile, if this issue pops up anywhere else we should make sure to copy the content to the bug so that we can continue to reproduce the issue.
This is likely related to the syntax highlighting plugin.
Flags: needinfo?(rdalal)
Reporter | ||
Comment 8•9 years ago
|
||
https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles/edit seems to be affected. I don't see any content.
Comment 9•9 years ago
|
||
Related discussion thread:
https://support.mozilla.org/en-US/forums/contributors/711329
[Bug 1171413] Content missing while translating or editing certain articles (was: Suddenly, content disappears while translating)
Comment 10•9 years ago
|
||
This is the current content of that article, for future reference.
Comment 11•9 years ago
|
||
I managed to fix the problem by removing <code> and </code> from affected articles:
https://support.mozilla.org/sl/kb/uporaba-upravitelja-profilov/edit/100640
https://support.mozilla.org/sl/kb/kako-namestiti-firefox-na-linux/edit/100638
Comment 12•9 years ago
|
||
As requested by Mike for the occurring issue on https://support.mozilla.org/nl/kb/meerdere-profielen-gebruiken .
Comment 14•9 years ago
|
||
Here is one more localised article where this bug seems to happen: https://support.mozilla.org/fi/kb/useampien-profiilien-kaytto-thunderbirdissa/edit the article is currently untouched. Last accepted revision is made by me and then there were no problems.
Comment 15•9 years ago
|
||
It seems that CodeMirror doesn't know how to highlight <code> tags in articles and stops working because of that. I think that clarifying <code> to the highlighter would fix the problem - all affected articles contain <code> tags and the content is shown when you remove them.
(Please ignore my babbling if I don't understand the situation correctly.)
Reporter | ||
Comment 17•9 years ago
|
||
Several new Thimble articles seem to be affected as well (e.g. https://support.mozilla.org/en-US/kb/how-do-i-add-code-comments-thimble-project/edit).
Comment 19•9 years ago
|
||
Michal, would you mind ranking this on your backlog?
Rehan, Mike, does comment #15 change the estimate?
Whiteboard: p=3 → p=3 r=?
Updated•9 years ago
|
Flags: needinfo?(mdziewonski)
Comment 20•9 years ago
|
||
I don't know enough about this to change the estimate. I think it should stay at 3 points.
Comment 22•9 years ago
|
||
Another example:
https://support.mozilla.org/en-US/kb/create-secure-passwords-keep-your-identity-safe/edit
This was just reported in bug 1222678
Summary: l10n editor only shows 89 lines in https://support.mozilla.org/en-US/kb/upgrade-graphics-drivers-use-hardware-acceleration/edit → Content disappears while editing or translating articles with <code> tags. Example: l10n editor only shows 89 lines in https://support.mozilla.org/en-US/kb/upgrade-graphics-drivers-use-hardware-acceleration/edit
Assignee | ||
Comment 25•9 years ago
|
||
This seems to affect <code> tags as well as <pre> and <nowiki> tags, as they all use the same pattern in the CodeMirror config. The current config seems to be attempting to color everything after a <code>/<pre>/<nowiki> that's missing an ending tag as a comment, and all the fixes to the disappearing content that I have come up with only either don't color anything unless the closing tag exists, or color only to the end of the line that the opening tag occurs on.
I'm going to try and find a fix that highlights to the end of the file if necessary, but if I can't find anything I'll just put up a fix that highlights once a closing and opening tag both exist.
Assignee: nobody → mkelly
Comment 27•9 years ago
|
||
Landed:
https://github.com/mozilla/kitsune/commit/264eda8fa52dce0e508d00bc5a37881910727278
Pushed to prod by me, right now.
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment 28•9 years ago
|
||
Rehan, thank you. It's working for me. FYI, I filed a dupe bug 1234664 and it works for me for both the articles I tagged.
Comment 29•9 years ago
|
||
Rehan, like I said, it is working as in I can view the content. But now "Submit" button is not working for me.
Comment 30•9 years ago
|
||
The submit problem is probably bug 1234789, and seems to be fixed now.
You need to log in
before you can comment on or make changes to this bug.
Description
•