Topic on Extension talk:VisualEditor

HTML meta tags corrupting wiki pages when saved with VisualEditor

22
GnomeSkull (talkcontribs)

I recently upgraded PHP from 5.6.32 to 5.6.33 on Windows Server. This seems to have broken the VisualEditor or Parsoid. For SOME wiki pages only, when I save them with the VisualEditor, the content is cut off, and there is text such as the following:

<meta charset="utf-8" /> <meta property="mw:articleNamespace" content="0" /> [ ] <meta property="dc:modified" content="2018-01-12T18:05:44.000Z" /> <meta property="mw:revisionSHA1" content="27d6cb96b2749fa12625bff4fe0181947d5d61e4" /> <meta property="mw:html:version" content="1.2.1" /> <meta property="mw:data-parsoid:version" content="0.0.2" />

Basically I am losing chunks of my pages. But this does not happen on all pages. There doesn't seem to be anything special about these pages.

This occurred on mediawiki 1.29.2, but I have now upgraded mediawiki to 1.30.0 and the VisualEditor extension as well. The same problem is happening to the same pages.

Any help with this problem would be appreciated. I have turned off the VisualEditor for now.

Thanks.

Whatamidoing (WMF) (talkcontribs)

Do you by any chance have the 2017 wikitext editor installed and enabled?

GnomeSkull (talkcontribs)

According to my Special:Version page I have extension WikiEditor 0.5.1. Is that what you mean or what else should I look for?

GnomeSkull (talkcontribs)

Extra info: I have upgraded node.js to v8.9.4. NPM is version 5.6.0. After upgrading those, I reinstalled parsoid from git, doing a fresh install, creating a new config.yaml. So everything is current now. The same problem with the meta tags is still happening as shown above.

Camxct (talkcontribs)

I am also experiencing this issue. Clean and up-to-date 1.30 install on a dedicated Windows 2016 Server Machine. Components installed are: node.js x64 8.94, Git x64 2.15.1.2, PHP 7.1, MySQL 5.7.

When saving a page, the bottom (whatever it may be) will be replaced by HTML meta tags the same way as GnomeSkull described. I've tried with the WikiEditor extension both enabled and disabled (no change).

This is what shows on the page revision (What it was is on the right-side, what it was changed to is on the left-side - this is from the undo page):

* [[Exchange:Create a New Distribution Group|Ex <meta charset="utf-8" /> <meta property="mw</s>:pageNamespace" content="0" /> <meta property="mw</s>:pageId" content="1" />  <meta property="dc:modified" content="2018-01-16T20:35:06.000Z" /> <meta property="mw:revisionSHA1" content="048709d3822257e25fa0a57f9796f0e70b2f015d" /> <meta property="isMainPage" content="true" /> ]] + * [[Exchange:Create a New Distribution Group|Exchange: Create a New Distribution Group]]
+ * [[Office365</ins>: <ins>OneDrive</ins>]]

I suspect that the link title syntax is what may be causing the substitution 'somehow'. I moved the page to a new name (instead of using wrong titles with redirects), added a "buffer" chunk of text on the bottom of the page, and begun moving things around again. Seems stable but I know I'm speaking way too soon!

Camxct (talkcontribs)

GnomeSkull, are you using any Wikipedia templates? I have a couple and it looks like some were attempting to call CSS styles from Wikipedia's MediaWiki:Common.css. Once I copied Wikipedia's MediaWiki:Common.css to mine, this issue went away.

GnomeSkull (talkcontribs)

Hi Camxct - thanks for the reply. I don't think I am using any such templates but how can I tell for sure? Some extra details would be helpful. Thanks again.

Camxct (talkcontribs)
Kapil.bolli (talkcontribs)

Hi Team,

I am also experiencing the same issue of meta property being added at the end of the page, if the page content is long.

I am running a clean Mediawiki 1.30 on Windows Server 2012 with PHP7.2, node.js 8.94.

I have copied source of MediaWiki:Common.css to muy installation, but it did not help

Thanks

GnomeSkull (talkcontribs)

Hi Camxct, thanks for the extra info. I copied the contents of Common.css to my own, but it made no difference.

Whatamidoing (WMF) (talkcontribs)

GnomeSkull, there are screenshots of the common editing environments at Editor.

What do the "Exchange:" and "Office365:" namespaces do, and are you having problems only if links like those are present?

Camxct (talkcontribs)

They are not real namespaces, just regular pages. Perhaps that's something I completely overlooked and the copying of MediaWiki:Common.css was a coincidence! Welllllllp.......

Whatamidoing (WMF) (talkcontribs)

I wonder if VisualEditor is failing to cope with "fake" namespaces. Does the problem always appear with such links?

GnomeSkull (talkcontribs)

Hi Guys, I am using the regular "Extension:WikiEditor" and then trying to use "VisualEditor"... not the "2017 wikitext editor". I don't have the problem appearing with "fake" namespaces. But what would you consider a fake namespace? Anything with a colon (:)? This doesn't seem to be my case. I even went through the trouble of stripping all the colons (:) from a problem page by editing the source (even URLs) and then editing with VisualEditor to test. The problem still occurred. For me it seems to be random. It does seem to happen on longer pages.

Camxct (talkcontribs)

Same result, I corrected the "fake" namespace issue and the parsing error with VisualEditor persists. Other WYSIWYG editors such as TinyMCE do not have this problem. I'm speculating that the issue may lay with Parsoid and/or the node.js installation(s).

GnomeSkull (talkcontribs)

I upgraded Parsoid and Node after I started having problems and it didn't help. I also upgraded PHP from 5.6.32 to 5.6.33 just prior to this problem appearing. Could this be a factor? I am thinking not as I see others are using PHP 7.1 and 7.2 and also having the same problem.

Camxct (talkcontribs)

Do you use your database in Binary or UTF-8 mode? I'm using UTF-8 currently so I wonder if that plus the length of the page has something to do with it.

GnomeSkull (talkcontribs)

In MySQL, the mediawiki database collation shows as 'utf8_general_ci'. If I look at the tables themselves, the majority show with collation as 'binary'. There are a 4 (comment, image_comment_temp, ip_changes, revision_comment_temp) showing as 'utf8_general_ci' though. And searchindex table is 'latin1_swedish_ci'. Don't know if any of that matters.

204.40.130.136 (talkcontribs)

This issue can be fixed by upgrading your PHP to 7.1.13 as it is a bug with the curl library. Curl library comes with PHP for Windows which requires you to update PHP instead of just the library.

More information: https://phabricator.wikimedia.org/T183356

GnomeSkull (talkcontribs)

Ah, so it was the upgrade to PHP 5.6.33 that broke it after all. Presumably it will be fixed in a version 5.6.34. I will have to live without the Visual Editor until then. Unfortunately I am still supporting some legacy apps on the same server and can not upgrade to version 7 yet. Thank you for the info!

Camxct (talkcontribs)

For me it was a combination of the "fake namespaces" by using "index.php?page=FakeNamespace:Article_Title" formatting AND my PHP version to 7.2. I actually wound up rebuilding the installation completely using 1.31wmf.20 instead of 1.30, used a forward slash instead of a colon, and now everything works flawlessly! :)

GnomeSkull (talkcontribs)

I just upgraded PHP to version 5.6.34 and everything seems to be working fine now!

Reply to "HTML meta tags corrupting wiki pages when saved with VisualEditor"