Even though extension.json for Cite clearly lists CiteCSSFileModule class in the ResourceModules array, the class is not loaded because extension.json does not reference it in the right place.
|mediawiki/extensions/Cite||master||+5 -10||CiteCSSFileModule is not loaded in the right place|
@Bawolff this is confusing me. Can you please help?
Clearly, the ext.cite.style resource modules were not being loaded at all.
When I move the reference to the CiteCSSFileModule class from ext.css.style to ext.css.styles the custom classes are loaded. When I move leave it where it is, despite the change in Cite.php it is still not loaded. Shouldn't the change I made to Cite.php be enough for that resource module to be loaded?
Can you please provide exact steps how to reproduce the issue you are experiencing? Start with the browser you are using, if you are logged in, and where. Which page are you looking at, what are you trying to do on that page, what do you expect to happen, and what happens instead. Ideally provide a screenshot of the issue (you can literally just copy-paste screenshots here in a Phabricator comment).
What I see in the proposed patch does not look right for various reasons. What the patch does is always loading a specific .css file that was previously only requested as a dependency when interacting with the VisualEditor. The way the CiteCSSFileModule class is references was not the problem, as the patch still references it the same way, just in an other MediaWiki-ResourceLoader module. There might indeed be a problem, we just can't say without fully understanding it.
I guess I was misunderstanding the purpose of that file. My understanding was that this CSS was supposed to be loaded everytime the interface language is 'fa'. If not, then the problem is essentially something else: that we are loading some CSS for VE which is not loaded for non-VE views (e.g. in the View mode of a page).
Let me go back and work on bringing the relevant parts to "ext.cite.styles.css" then.