To recreate: 1. Make a new HTML customization, news item, or page with the text editor ( CodeMirror ). 2. Save the content ( not Save and continue ) 3. Notice the console error: Uncaught TypeError: firstTab[0] is undefined This only seems to happen for me when using CodeMirror. Using the WYSIWYG editor does not produce the console error.
Created attachment 143154 [details] [review] Bug 32104: Prevent console error on additonal-contents.pl To test: 1. Make a new HTML customization, news item, or page with the text editor ( CodeMirror ). 2. Save the content ( not Save and continue ) 3. Notice the console error: 4. Apply patch 5. Try 1 & 2 again. 6. No error.
Created attachment 143164 [details] [review] Bug 32104: Prevent console error on additonal-contents.pl To test: 1. Make a new HTML customization, news item, or page with the text editor ( CodeMirror ). 2. Save the content ( not Save and continue ) 3. Notice the console error: 4. Apply patch 5. Try 1 & 2 again. 6. No error. Signed-off-by: David Nind <david@davidnind.com>
I didn't see the console error on master - could you please verify if maybe bug 31609 fixed this?
(In reply to Katrin Fischer from comment #3) > I didn't see the console error on master - could you please verify if maybe > bug 31609 fixed this? It did not, the console error remains.
I couldn't make it happen when I tried earlier, maybe another set of eyes would help.
It looks like I can only make the error happen when using Firefox.
(In reply to Lucas Gass from comment #6) > It looks like I can only make the error happen when using Firefox. Hm I did use Firefox :(
Same for me, I don't get the error (using Firefox).
(In reply to Jonathan Druart from comment #8) > Same for me, I don't get the error (using Firefox). Interesting! Not quite sure what is going on here.
Created attachment 144021 [details] [review] Bug 32104: Prevent console error on additonal-contents.pl To test: 1. Make a new HTML customization, news item, or page with the text editor ( CodeMirror ). 2. Save the content ( not Save and continue ) 3. Notice the console error: 4. Apply patch 5. Try 1 & 2 again. 6. No error. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed to master for 22.11. Nice work everyone, thanks!
(In reply to Tomás Cohen Arazi from comment #11) > Pushed to master for 22.11. Did you get the warning?