Page MenuHomePhabricator

CiteCSSFileModule is not loaded in the right place
Closed, InvalidPublic

Description

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.

Event Timeline

Whatever the case was back then, it is no more the case and it is properly loaded.

Huji claimed this task.

Actually, the problem is still there, and I found out why. Posting a patch shortly.

Huji renamed this task from CiteCSSFileModule is never loaded to CiteCSSFileModule is not loaded in the right place.Jun 7 2018, 11:18 PM
Huji updated the task description. (Show Details)

Change 438124 had a related patch set uploaded (by Huji; owner: Huji):
[mediawiki/extensions/Cite@master] CiteCSSFileModule is not loaded in the right place

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

@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.

Can you please, please, please explain the problem and provide a screenshot before hacking on some code that might or might not be related to the issue?

Will do, in a separate task specifically about that particular issue. :)

Change 438124 abandoned by Huji:
CiteCSSFileModule is not loaded in the right place

Reason:
Per Task

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