Page MenuHomePhabricator

Changing to visual editor when creating a page breaks parser functions
Closed, ResolvedPublic


Ni! Hello, I've found a bug that is causing me troubles with my students. Here's the description:

  1. Start by creating a new page by clicking on "Create wikicode" and add this to its contents:
[[Catégorie:{{#titleparts: {{PAGENAME}} | | 2 }}]]
  1. Click on "Create" to change to the visual editor. The contents (not visible in VE) are now:
[[Catégorie:{{|titleparts: <nowiki>{{PAGENAME}}</nowiki> | | 2 }}]]

This behavior is not seen when changing from wikitext to visual editor in an already existing page.

This affects me because it also breaks the preloading of a page with inputbox with "useve=true". The use case can be seen here in an activity for one of the classes I teach:,_2020)/Activit%C3%A9_A

Hoping someone can take a look at this, thank you in advance,


Event Timeline

Thanks, I've also found that if you go back and forth between wikieditor and visualeditor a second time, that same content then becomes:

<nowiki>[[Catégorie:{{|titleparts: </nowiki><nowiki>{{PAGENAME}}</nowiki><nowiki> | | 2 }}]]</nowiki>

Let me know if I can be of assistance !

Coincidentally, we just fixed this bug (which I merged this bug into) and on the next deployment, this will be resolved.

Solstag reopened this task as Open.EditedMay 29 2020, 12:19 AM

Hi! I've seen the solution for the other bug has hit production. However I'm still facing a small issue here in connection with preloading.

In my case, when the new page with the preloaded content gets opened in the wikitext editor, the text is there and all works fine, moving back and forth works.

Now, if the new page with preloaded content gets opened in visual editor mode, the text is not visible but is there somehow, so that if I save the page the category is indeed correctly applied.

However, if before saving I change to the wikitext editor, the category disappears. It is not in the wikitext and is no longer present if I move back to visual editing.

Can you take a look at what is happening? Seems like only a corner case... Thank you!

(I'm reporting here and changing this bug to open as the other bug had no mention of preloading and is therefore indeed fixed, but of course you folks know better so let me know..)

Esanders subscribed.

Can you please file a new bug for the issue you describe? As the original issue is fixed we'd like to close this one.

Solstag claimed this task.

I've created the new task as requested: T279448. Marking this one as resolved.