Page MenuHomePhabricator

Gallery adaptation fails with updated MW Dom Spec
Closed, ResolvedPublicBUG REPORT

Description

Parsoid no longer provides the raw extension body text in body.extsrc and raw gallerycaption in data-mw='{"attrs":{"caption":""}}'. (Reference).

This change causes JS errors in MWGallery adaptation logic.

Error from logstash:

MT processing error for: gu > en. TypeError: Cannot read properties of undefined (reading 'split')
    at MWGallery.adapt (/srv/service/lib/translationunits/MWGallery.js:16:51)
    at Doc.adapt (/srv/service/lib/lineardoc/Doc.js:755:47)
    at Adapter.adapt (/srv/service/lib/Adapter.js:25:27)
    at /srv/service/lib/routes/v2.js:207:6
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Event Timeline

ngkountas changed the task status from Open to In Progress.Nov 24 2023, 2:11 PM
ngkountas assigned this task to santhosh.
ngkountas triaged this task as Medium priority.

Change 974943 had a related patch set uploaded (by Nik Gkountas; author: Santhosh):

[mediawiki/services/cxserver@master] MWGallery: Support the new HTML format as per MW Dom Spec 2.7.0

https://gerrit.wikimedia.org/r/974943

Change 974943 merged by jenkins-bot:

[mediawiki/services/cxserver@master] MWGallery: Support the new HTML format as per MW Dom Spec 2.7.0

https://gerrit.wikimedia.org/r/974943

Change 977320 had a related patch set uploaded (by KartikMistry; author: KartikMistry):

[operations/deployment-charts@master] Update cxserver to 2023-11-24-152117-production

https://gerrit.wikimedia.org/r/977320

Change 977320 merged by jenkins-bot:

[operations/deployment-charts@master] Update cxserver to 2023-11-24-152117-production

https://gerrit.wikimedia.org/r/977320

Mentioned in SAL (#wikimedia-operations) [2023-11-27T12:18:27Z] <kart_> Updated cxserver to 2023-11-24-152117-production (T351932)

Deployed in production and seems working fine.

image.png (359×3 px, 377 KB)