meza icon indicating copy to clipboard operation
meza copied to clipboard

External images don't load in VE without fix / Properly deal with "image list" functionality

Open jamesmontalvo3 opened this issue 9 years ago • 10 comments

Currently the FOD Wikis have a template called "image list" (and "big image list"), which creates a gallery from both local wiki images and from imagery online. This functionality should either:

Also, external images (like those from Imagery Online) don't load in VE without a fix to Parsoid.

jamesmontalvo3 avatar Aug 12 '15 19:08 jamesmontalvo3

External images do not show in Visual Editor. I've requested assistance on wikitech-l: https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084871.html

jamesmontalvo3 avatar Feb 23 '16 19:02 jamesmontalvo3

External images not showing declared a Parsoid bug. See here. Until it's fixed, we can modify /etc/parsoid/lib/config/WikitextConstants.js to whitelist img tags. Add this near the bottom of the file:

WikitextConstants.Sanitizer.TagWhiteList.add( "IMG" );

jamesmontalvo3 avatar Feb 23 '16 22:02 jamesmontalvo3

Now tracking in Phabricator: https://phabricator.wikimedia.org/T127884

jamesmontalvo3 avatar Feb 23 '16 22:02 jamesmontalvo3

On older Parsoid versions, e.g. the one we use with MW 1.25, the file mentioned above is actually located at /etc/parsoid/lib/mediawiki.wikitext.constants.js.

jamesmontalvo3 avatar Feb 24 '16 03:02 jamesmontalvo3

Since this has been identified as a bug in Parsoid, and we have a workaround, I don't think this is a pressing issue anymore. It probably shouldn't be closed yet, so we can make sure it gets dealt with the in the best way possible in the future, but it can be moved out of v0.9. Un-milestoning it.

jamesmontalvo3 avatar Feb 24 '16 03:02 jamesmontalvo3

This issue was hard to find, due to being similar to #329 (Images don't display in VE).

jamesmontalvo3 avatar May 05 '16 21:05 jamesmontalvo3

I had trouble finding this again! Should be called "External images don't load in VE without fix"

Fix is something like:

sudo sed -i -e 's/JSUtils.deepFreeze(WikitextConstants);/WikitextConstants.Sanitizer.TagWhiteList.add( "IMG" );\nJSUtils.deepFreeze(WikitextConstants);/' /etc/parsoid/lib/mediawiki.wikitext.constants.js

jamesmontalvo3 avatar Dec 16 '16 19:12 jamesmontalvo3

Required MW core patch in T127884

jamesmontalvo3 avatar May 05 '17 22:05 jamesmontalvo3

Once again we'll settle for a temporary fix here. Moving this task out of the critical path for 1.0.0-alpha1

jamesmontalvo3 avatar May 06 '17 06:05 jamesmontalvo3

bump. Note to self: submit patch for this so that it gets moved through gerrit.

freephile avatar Apr 24 '20 04:04 freephile