Page MenuHomePhabricator

ArticlePlaceholder tries to load not existing resources
Closed, InvalidPublic

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Okay, this is actually a way bigger problem than it looks. The real problem is "Wikidata extensions can't expose static assets externally in production" because their path is actually prepended by "Wikidata/extensions/" so https://nn.wikipedia.org/w/extensions/ArticlePlaceholder/modules/ext.articleplaceholder.createArticle/ext.articleplaceholder.createArticle.css would give a 404 but https://nn.wikipedia.org/w/extensions/Wikidata/extensions/ArticlePlaceholder/modules/ext.articleplaceholder.createArticle/ext.articleplaceholder.createArticle.css would not.

Unfortunately, I can't think of any simple/robust solution to this problem (it took hours to even find out what's wrong.). Until now, I thought of this solutions:

  • Move out ArticlePlaceholder from the bundle of Wikidata extensions. This won't solve underlying problem and it will bite us for Wikibase or other extensions
  • Change config variables. In short $wgResourceModules['ext.articleplaceholder.createArticle']['remoteExtPath'] would be changed from ArticlePlaceholder/modules to Wikidata/extensions/ArticlePlaceholder/modules but we need to do this for *all* modules we register (not extensions). Also, where is the best place to change it? in Wikidata.php in Wikidata extension? or in Wikibase-production.php config? or in InitilizeSettings.php? (Other article placeholder configs are there, I have no idea why)
  • Change it in extension.json: That's not even an option because it would break third party setups.
  • Move away from extension.json setup to ArticlePlaceholder.php: I don't like it, it feels like moving back to old ways.

@aude @daniel @hoo: What do you think?

ideally, all of our extensions can be moved out of the wikidata build and be handled more normally the way other extensions are, and we put our libraries into mediawiki/vendor

as shorter term solution, maybe we could move the resource definitions out of extension.json

Addshore subscribed.

Marking as invalid as the extension is now deployed as a regular extension and we should no longer have this issue.