Page MenuHomePhabricator

Preload parameter doesn't work in Module namespace
Closed, DuplicatePublicBUG REPORT

Description

The preload parameter works on pages with a wikitext content model, but not on modules and JSON, JavaScript and CSS pages.

@Justinrleung mentioned that preload=Module:zh/data/dial-syn doesn't work in the Module namespace. For instance, https://en.wiktionary.org/?action=edit&title=really_onexistent_page&preload=Module:zh/data/dial-syn has the text of Module:zh/data/dial-syn loaded into the edit box, but https://en.wiktionary.org/?action=edit&title=Module:nonexistent&preload=Module:zh/data/dial-syn doesn't. Same failure when I plugged in the titles User:Erutuon/nonexistent.js, User:Erutuon/nonexistent.css, User:Erutuon/nonexistent.json, MediaWiki:Nonexistent.js, MediaWiki:Nonexistent.css, Template:nonexistent/style.css, Module:nonexistent/style.css.

I thought it might be related to the code editor, so I tried disabling the editing toolbar in preferences, but that didn't make the text show up.

Can this at the very least be fixed to work on module pages? English Wiktionary editors who work with Chinese would like to have Template:zh-dial generate preloaded links when a Chinese term does not have a dialectal synonyms module, like https://en.wiktionary.org/?title=Module:zh/data/dial-syn/Chinese_term_here&action=edit&preload=Module:zh/data/dial-syn. Maybe there are security concerns about allowing the preload parameter to work on user JavaScript and CSS and JSON pages, but I'm not sure what the risk would be with module pages.

Event Timeline

@Ammarpad : I don't think this is a duplicate of T270542 because this is about preload= not putting text in the edit box, not about preloadparams[]= leaving $1 unchanged.

See the resolution of the other task. It also applies here.