Page MenuHomePhabricator

ContentTranslation dependencies are not clearly defined in the extension making it unintuitive to setup for development
Open, MediumPublic


When testing out ContentTranslation I was able to use it without BetaFeatures installed, but it wasn't displaying. As a result I wasted a good hour trying to work out the problem.

After exploring this some more, I noticed that $wgContentTranslationAsBetaFeature was set to true by default, but if BetaFeatures wasn't installed the feature was not loaded.

It didn't feel like BetaFeatures should be a required extension to use the ContentTranslation extension so I uploaded which makes the code ignore $wgContentTranslationAsBetaFeature when BetaFeatures is not available.

However this revealed another hidden dependency- GlobalPreferences. This is not listed in extension.json but I get fatals without it.

To clarify

Event Timeline

Change 698617 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/ContentTranslation@master] Ignore wgContentTranslationAsBetaFeature value when BetaFeatures disabled

Change 698617 abandoned by Jdlrobson:

[mediawiki/extensions/ContentTranslation@master] Ignore wgContentTranslationAsBetaFeature value when BetaFeatures disabled


Moving discussion to Phabricator to get clarity on this situation.

You are correct, the depedendencies need to be updated properly. And it is true that setting up CX for development is quite complicated. has a working configuration including cxserver, eventlogging, VE configuration. (Since I use docker for MW development, I keep that updated often)

For CI, we intentionally made many dependencies soft dependencies since our CI was taking too much time and became fragile with so many extensions. So CI dependencies not necessarily define the actual dependencies to get all features of ContentTranslation for a functional dev environment.

About the BetaFeatures extension check fix you did, it make sense to me. It was never noticed since our CX development setup will have BetaFeatures as we have so many beta feature related checks and UX. For a developer who occassionally submit patches to CX, this will not be obvious.

If it's helpful I can look at making GlobalPreferences a soft dependency too... I'm guessing that doesn't need to be hard for development purposes and some somewhat work?

Nikerabbit removed a project: Language-Team.