Page MenuHomePhabricator

Inserting special characters does not work when "Enable enhanced editing toolbar" enabled but "Show edit toolbar" not enabled ("insertTags undefined" error)
Closed, DuplicatePublic

Description

charakterstrings to klick on for beeing written in the editing box do not work. Cursor just jumps away. Not the ones over and under editing box, neither my own buttons created in my common.js. My name signatur works when I klick on it and bold etc next to it. It's in the german wiktionary. With my accout it works like always in wikipedia.de and wiktionary.se. There are other users expierencing the same. Problem started some days ago.

Event Timeline

Susann_Schweden raised the priority of this task from to Normal.
Susann_Schweden updated the task description. (Show Details)
Susann_Schweden added a subscriber: Susann_Schweden.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 8 2015, 7:59 PM
Aklapper changed the task status from Open to Stalled.Feb 9 2015, 12:54 AM

Hi @Susann_Schweden,
unfortunately this report is not very useful because it does not describe the problem well. If you have time and can still reproduce the problem, please add a more useful and complete description to this report by providing a list of complete steps to reproduce that someone else could follow, preferably without any room left for interpretation. :)

hi, thanks for answering.I use firefox 35.0.1 and windows  8.1go to https://de.wiktionary.org/w/index.php?title=Wiktionary:Schwedisch&action=editbe sure to use my accountabove the editing box you should select 'Textbausteine'
klick on {{IPA}} or any otheror klick on one of my buttons directly over the editing-box tex 'Subst-Tabelle'or klick on one of the strings under the editing box efter Einfügen:  tex [[]]neither will result in that a text is written inside the editing box where the cursor is waiting.All three used to produce the indicated text in the editing box. But not any longer.

Den måndag, 9 februari 2015 1:54 skrev Aklapper <no-reply@phabricator.wikimedia.org>:

Aklapper changed the task status from "Open" to "Stalled".
Aklapper added a comment.

Hi @Susann_Schweden,
unfortunately this report is not very useful because it does not describe the problem well. If you have time and can still reproduce the problem, please add a more useful and complete description to this report https://www.mediawiki.org/wiki/How_to_report_a_bug by providing a list of complete steps to reproduce that someone else could follow, preferably without any room left for interpretation. :)

TASK DETAIL
  https://phabricator.wikimedia.org/T88941

REPLY HANDLER ACTIONS
  Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Aklapper
Cc: Aklapper, Susann_Schweden

  1. use my account2. go to https://de.wiktionary.org/w/index.php?title=Wiktionary:Schwedisch&action=edit3. try to insert character [[]] by selecting the insert/ Einfügen sign under the editing box4. it does not work
Den måndag, 9 februari 2015 16:03 skrev Susann_Schweden <no-reply@phabricator.wikimedia.org>:

Susann_Schweden added a comment.

hi, thanks for answering.I use firefox 35.0.1 and windows  8.1go to https://de.wiktionary.org/w/index.php?title=Wiktionary:Schwedisch&action=editbe sure to use my accountabove the editing box you should select 'Textbausteine'
klick on {{IPA}} or any otheror klick on one of my buttons directly over the editing-box tex 'Subst-Tabelle'or klick on one of the strings under the editing box efter Einfügen:  tex [[]]neither will result in that a text is written inside the editing box where the cursor is waiting.All three used to produce the indicated text in the editing box. But not any longer.

  Den måndag, 9 februari 2015 1:54 skrev Aklapper <no-reply@phabricator.wikimedia.org>:
   

Aklapper changed the task status from "Open" to "Stalled".
Aklapper added a comment.

Hi @Susann_Schweden,
unfortunately this report is not very useful because it does not describe the problem well. If you have time and can still reproduce the problem, please add a more useful and complete description to this report https://www.mediawiki.org/wiki/How_to_report_a_bug by providing a list of complete steps to reproduce that someone else could follow, preferably without any room left for interpretation. :)

TASK DETAIL
  https://phabricator.wikimedia.org/T88941

REPLY HANDLER ACTIONS
  Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Aklapper
Cc: Aklapper, Susann_Schweden

TASK DETAIL
  https://phabricator.wikimedia.org/T88941

REPLY HANDLER ACTIONS
  Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Susann_Schweden
Cc: Aklapper, Susann_Schweden

The last two comments here are pretty hard to read. Ordered list of steps would be welcome. :)

Also, when answering via email it would be great if you could remove any unneeded quotes and avoid full quoting a previous email.

What I tried in Firefox 35:

  1. Go to https://de.wiktionary.org/w/index.php?title=Wiktionary:Schwedisch&action=edit
  2. Click {{IPA}}
  3. See "{{IPA}}" is inserted in the editing box and the mouse cursor is there
  4. Scroll down to "Einfügen"
  5. Click "Ä"
  6. Ä is inserted in the editing box and the mouse cursor is there.
  7. In both cases the browser window does not automatically scroll to show in the viewport where this was inserted.

Still not sure what the bug is described in this task.

When '''I''' do it, right now, a second ago, it does not work! It is NOT inserted in the editing box. The cursor just dissappears from it´s place and nothing else happens. (When I do the same action as an IP-adress, the signs appear on the screen in the editing box just as you describe it!) Sorry, but it is that way. Can´t you imitate to be me, my wiki account? It must have something to do with my account.

Den tisdag, 10 februari 2015 14:16 skrev Aklapper <no-reply@phabricator.wikimedia.org>:

Aklapper added a project: MediaWiki-Page-editing.
Aklapper added a comment.

The last two comments here are pretty hard to read. Ordered list of steps would be welcome. :)

Also, when answering via email it would be great if you could remove any unneeded quotes and avoid full quoting https://en.wikipedia.org/wiki/Posting_style a previous email.

What I tried in Firefox 35:

  1. Go to https://de.wiktionary.org/w/index.php?title=Wiktionary:Schwedisch&action=edit
  2. Click {{IPA}}
  3. See "{{IPA}}" is inserted in the editing box and the mouse cursor is there
  4. Scroll down to "Einfügen"
  5. Click "Ä"
  6. Ä is inserted in the editing box and the mouse cursor is there.
  7. In both cases the browser window does not automatically scroll to show in the viewport where this was inserted.

Still not sure what the bug is described in this task.

TASK DETAIL
  https://phabricator.wikimedia.org/T88941

REPLY HANDLER ACTIONS
  Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Aklapper
Cc: Aklapper, Susann_Schweden, Jdforrester-WMF

when I move the cursor over the Ä because I want to select it for insert, it says: javascript:void() in the lefthand down corner of my screen

Den tisdag, 10 februari 2015 15:12 skrev Susann_Schweden <no-reply@phabricator.wikimedia.org>:

Susann_Schweden added a comment.

When '''I''' do it, right now, a second ago, it does not work! It is NOT inserted in the editing box. The cursor just dissappears from it´s place and nothing else happens. (When I do the same action as an IP-adress, the signs appear on the screen in the editing box just as you describe it!) Sorry, but it is that way. Can´t you imitate to be me, my wiki account? It must have something to do with my account.

  Den tisdag, 10 februari 2015 14:16 skrev Aklapper <no-reply@phabricator.wikimedia.org>:
   

Aklapper added a project: MediaWiki-Page-editing.
Aklapper added a comment.

The last two comments here are pretty hard to read. Ordered list of steps would be welcome. :)

Also, when answering via email it would be great if you could remove any unneeded quotes and avoid full quoting https://en.wikipedia.org/wiki/Posting_style a previous email.

What I tried in Firefox 35:

  1. Go to https://de.wiktionary.org/w/index.php?title=Wiktionary:Schwedisch&action=edit
  2. Click {{IPA}}
  3. See "{{IPA}}" is inserted in the editing box and the mouse cursor is there
  4. Scroll down to "Einfügen"
  5. Click "Ä"
  6. Ä is inserted in the editing box and the mouse cursor is there.
  7. In both cases the browser window does not automatically scroll to show in the viewport where this was inserted.

Still not sure what the bug is described in this task.

TASK DETAIL
  https://phabricator.wikimedia.org/T88941

REPLY HANDLER ACTIONS
  Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Aklapper
Cc: Aklapper, Susann_Schweden, Jdforrester-WMF

TASK DETAIL
  https://phabricator.wikimedia.org/T88941

REPLY HANDLER ACTIONS
  Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Susann_Schweden
Cc: Aklapper, Susann_Schweden, Jdforrester-WMF

Please do NOT full-quote my entire previous comment when replying to emails. It makes this task very hard to read. Please do remove unneeded quotes from emails.

If you think that there is a problem with JavaScript (might be some gadget interfering here, hence switching off gadgets might be another idea), you can debug that problem by using the browser's console (or whatever it is called in your browser) and reloading the page that you see the problem on.
If there is a problem or an error with some JavaScript file it should be printed in that console.
For more information please see:

In case you plan to paste the console output here, please review the content first (and only paste JS issues here). Thanks.

sorry, I did not notice that I sent all of it again :( It is the very first time I am engaged in this kind of kommunication. To javascript: I have javascript.enabled true ( in about:config) . I started firefox in safe mode and it did not affect my problem. When I edit in swedish wiktionary, it works. That makes me think it is my commons.js which starts the trouble and just here in my homewiki. But it was ok before roundabout last week.

"Use of "wgAction" is deprecated. Use mw.config instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
<anonymous> load.php:1

"Use of "wgNamespaceNumber" is deprecated. Use mw.config instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
showSeeAlso() load.php:7
jQuery.Callbacks/fire() load.php:45
jQuery.Callbacks/self.add() load.php:45
jQuery.fn.ready() load.php:49
<anonymous> load.php:7

"Use of "wgTitle" is deprecated. Use mw.config instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
<anonymous> load.php:9

"Use of "wgCanonicalSpecialPageName" is deprecated. Use mw.config instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
<anonymous> load.php:9

"Use of "addOnloadHook" is deprecated. Use jQuery instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
<anonymous> load.php:10

"Use of "wgPageName" is deprecated. Use mw.config instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
<anonymous> load.php:11

"Use of "wgAction" is deprecated. Use mw.config instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
<anonymous> load.php:11

"Use of "addOnloadHook" is deprecated. Use jQuery instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
<anonymous> index.php:8

"Use of "appendCSS" is deprecated. Use mediawiki.util instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
<anonymous> index.php:48

"Use of "wgAction" is deprecated. Use mw.config instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
<anonymous> index.php:2352
jQuery.Callbacks/fire() load.php:45
jQuery.Callbacks/self.add() load.php:45
jQuery.fn.ready() load.php:49
<anonymous> index.php:2348

"Use of "mwCustomEditButtons" is deprecated. Use mw.toolbar instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
addEditButton() index.php:5
<anonymous> index.php:17

"Use of "mwCustomEditButtons" is deprecated. Use mw.toolbar instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
addEditButton() index.php:5
<anonymous> index.php:17

"Use of "mwCustomEditButtons" is deprecated. Use mw.toolbar instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
addEditButton() index.php:5
<anonymous> index.php:20

"Use of "mwCustomEditButtons" is deprecated. Use mw.toolbar instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
addEditButton() index.php:5
<anonymous> index.php:20

"Use of "mwCustomEditButtons" is deprecated. Use mw.toolbar instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
addEditButton() index.php:5
<anonymous> index.php:23

"Use of "mwCustomEditButtons" is deprecated. Use mw.toolbar instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
addEditButton() index.php:5
<anonymous> index.php:23

"Use of "mwCustomEditButtons" is deprecated. Use mw.toolbar instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
addEditButton() index.php:5
<anonymous> index.php:27

"Use of "mwCustomEditButtons" is deprecated. Use mw.toolbar instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
addEditButton() index.php:5
<anonymous> index.php:27

"Use of "mwCustomEditButtons" is deprecated. Use mw.toolbar instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
addEditButton() index.php:5
<anonymous> index.php:30

"Use of "mwCustomEditButtons" is deprecated. Use mw.toolbar instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
addEditButton() index.php:5
<anonymous> index.php:30

"Use of "mwCustomEditButtons" is deprecated. Use mw.toolbar instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
addEditButton() index.php:5
<anonymous> index.php:33

"Use of "mwCustomEditButtons" is deprecated. Use mw.toolbar instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
addEditButton() index.php:5
<anonymous> index.php:33

"Use of "mwCustomEditButtons" is deprecated. Use mw.toolbar instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
addEditButton() index.php:5
<anonymous> index.php:36

"Use of "mwCustomEditButtons" is deprecated. Use mw.toolbar instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
addEditButton() index.php:5
<anonymous> index.php:36

"Use of "addOnloadHook" is deprecated. Use jQuery instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
<anonymous> index.php:115

"Use of "addOnloadHook" is deprecated. Use jQuery instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
<anonymous> index.php:136

"Use of "is_opera" is deprecated. Use feature detection or module jquery.client instead." load.php:154
console.trace(): load.php:154
mw.log</log.warn() load.php:154
mw.log</log.deprecate</<.get() load.php:154
chooseCharSubset() index.php:45
addCharSubsetMenu() index.php:106
<anonymous> load.php:27
jQuery.event.dispatch() load.php:65
jQuery.event.add/elemData.handle() load.php:60

"Loading de-transliteration" load.php:96
"de-transliteration loaded" load.php:96
ReferenceError: insertTags is not defined index.php:1
SyntaxError: expected expression, got ')' javascript:void():1

this is what ff says

https://de.wiktionary.org/wiki/Spezial:Einstellungen#mw-prefsection-editing now I marked the box ' Bearbeiten-Werkzeugleiste anzeigen' and now insert char works again.

If you select under "Einstellungen" / "Bearbeiten" only "Erweiterte Bearbeiten-Werkzeugleiste aktivieren" and not "Bearbeiten-Werkzeugleiste anzeigen" then the global function insertTags() is undefined as can be seen in the console log and <charinsert> will not work. Nevertheless because <charinsert> is also useful when not in editmode - for example to help filling an <inputbox> - insertTags() should allways be loaded, say by moving it to mw.util. After that <charinput> should be changed to use mw.util.insertTags() and not a global function.

Aklapper closed this task as Invalid.Feb 11 2015, 2:40 PM
Aklapper claimed this task.

So this looks like the problem:

"Loading de-transliteration" load.php:96
"de-transliteration loaded" load.php:96
ReferenceError: insertTags is not defined index.php:1
SyntaxError: expected expression, got ')' javascript:void():1

That code needs to be fixed on the wiki, as explained earlierby Formatierer.

There is nothing to fix in the MediaWiki codebase itself, hence I am closing this task as invalid (only the task itself, not the described problem which seems very valid indeed but out of scope for a ticket in Phabricator) as on-wiki code problems are not tracked in Phabricator...

No this is not specific to german wiktionary. You can reproduce the same behavior on the englisch wiktionary.

  1. Select 'Preferences'
  2. In tab 'Editing':

2a: disable 'Show the edit toolbar (requires JavaScript)'
2b. enable 'Enable enhanced editing toolbar'

  1. go to a random page i.e. 'random'
  2. Edit a section
  3. scroll down to the box at the bottom, which lets you enter special characters': Á á Ć ć É é ...'
  4. click on 'Á'
  5. the character isn't inserted into the editfield
  6. Look into Browserconsole: ReferenceError: insertTags is not defined

now try the same but in step 2a: enable 'Show the edit toolbar (requires JavaScript)' et voila insertTags() works.

Aklapper renamed this task from insert strings to Inserting special characters does not work when "Enable enhanced editing toolbar" enabled but "Show edit toolbar" not enabled ("insertTags undefined" error).Feb 11 2015, 9:19 PM
Aklapper reopened this task as Open.
Aklapper edited projects, added CharInsert; removed MediaWiki-Page-editing.
Aklapper set Security to None.

Thanks for clarifying. I am going to merge this ticket into T88922 which covers the underlying problem.