1
votes

I have to say I am unclear on the real reason for the error, but my only observation is that this .css file is being treated as a Lua file for whatever reason, which is why we see the error below.

enter image description here

Module:Citation/CS1/styles.css

http://www.gwart.co.uk/Module:Citation/CS1/styles.css

Other related errors: http://www.gwart.co.uk/Les_Edwards

How can I either fix this issue or alternatively, if needed, make this be a file rather than a module

1

1 Answers

3
votes

Probably the page is being parsed as Lua because the content model is "Scribunto". If the TemplateStyles extension is installed, an admin can apparently change the content model of the page from "Scribunto" to "sanitized-css" and the page will be parsed correctly.

Another approach if you are not an admin is to create a .css subpage in the Template namespace and then move it to the Module namespace. Creating it in the Template namespace automatically gives it the "sanitized-css" content model, and it keeps its content model when it is moved to the Module namespace.

There is a Phabricator ticket requesting that Module subpages ending in .css automatically have the "sanitized-css" content model, but I do not know what progress has been made on implementing that.