Topic on Project:Support desk

Summary by Nihonjoe

It was a quick fix. I had overlooked a needed extension and a line in LocalSettings.php.

Nihonjoe (talkcontribs)

I'm trying to create a "Module:Documentation/styles.css" page (similar to en:Module:Documentation/styles.css) on a new installation of MW 1.37.2 (with Lua 5.1.5), but when I try to save the page I get an error message saying the formatting of the page has unexpected characters. I even tried copying exactly what was in the en:Module:Documentation/styles.css page, but I still get the error. It seems to be treating the CSS as if it's Lua code rather than CSS. Is there an additional extension I need to install to make it treat the CSS as CSS instead of Lua? Or am I missing something else?

Thanks in advance for any assistance.

Bawolff (talkcontribs)

First off, just to confirm, you have extension:TemplateStyles installed?

Try creating the page via Special:changeContentModel which allows creating template style pages in other namespaces.

Probably the reason is you need $wgTemplateStylesNamespaces[NS_MODULE] = true; by default its template only.

Nihonjoe (talkcontribs)

I did not have that extension installed, but it is now. I also implemented $wgTemplateStylesNamespaces to allow it. Thanks!