enterprisemediawiki / meza

Setup an enterprise MediaWiki server with simple commands
MIT License
41 stars 27 forks source link

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

Open jamesmontalvo3 opened 9 years ago

jamesmontalvo3 commented 9 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

jamesmontalvo3 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

jamesmontalvo3 commented 7 years ago

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 commented 7 years ago

Required MW core patch in T127884

jamesmontalvo3 commented 7 years ago

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

freephile commented 4 years ago

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