Jump to content

Topic on Help talk:TemplateStyles

Can something cause a delay in revisions being reflected?

2
173.73.45.170 (talkcontribs)

I recently tweaked a stylesheet that's referenced on two different pages:

https://harvestella.wikitide.org/wiki/Template:Infobox/Dungeon (specific template built on Lua infobox)

and

https://harvestella.wikitide.org/wiki/Template:Infobox/doc (to apply styling to examples in the documentation page for the Infobox meta-template)

The first page already reflects the updates, as seen in the final HTML for that page, which includes both <link> and <style> tags referring to Revision 6349 (the most recent one I just made).

<style data-mw-deduplicate="TemplateStyles:'''6349'''">.mw-parser-output img{max-width:100%;height:auto}.mw-parser-output .infobox-subbox{padding:0;border:none;margin:-3px;width:auto;min-width:100%;font-size:100%;clear:none;float:none;background-color:transparent;text-align:center}.mw-parser-output .infobox-3cols-child{margin:auto}.mw-parser-output .infobox .navbar{font-size:100%}body.skin-minerva .mw-parser-output .infobox-header,body.skin-minerva .mw-parser-output .infobox-subheader,body.skin-minerva .mw-parser-output .infobox-above,body.skin-minerva .mw-parser-output .infobox-title,body.skin-minerva .mw-parser-output .infobox-image,body.skin-minerva .mw-parser-output .infobox-full-data,body.skin-minerva .mw-parser-output .infobox-below{text-align:center}</style>
 
 <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:'''r6349'''">

But the latter page, while still having a <link> tag referring to Revision 6349, is still generating a <style> tag for Revision 6103 (which doesn't even match a revision version number on my wiki? It jumps from 6101 to 6126):

<link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:'''r6349'''">
   
<style data-mw-deduplicate="TemplateStyles:'''r6103'''">.mw-parser-output .infobox-subbox{padding:0;border:none;margin:-3px;width:auto;min-width:100%;font-size:100%;clear:none;float:none;background-color:transparent}.mw-parser-output .infobox-3cols-child{margin:auto}.mw-parser-output .infobox .navbar{font-size:100%}body.skin-minerva .mw-parser-output .infobox-header,body.skin-minerva .mw-parser-output .infobox-subheader,body.skin-minerva .mw-parser-output .infobox-above,body.skin-minerva .mw-parser-output .infobox-title,body.skin-minerva .mw-parser-output .infobox-image,body.skin-minerva .mw-parser-output .infobox-full-data,body.skin-minerva .mw-parser-output .infobox-below{text-align:center}</style>

I've used the "Purge" option to refresh both of the above pages (Infobox/Dungeon and Infobox/doc) as well as the main Infobox page.

What could be going on here, that it would work on one page and not the other, and that the page where it isn't working definitely appears to see that a new revision exists, but is just not using it? Could it be somehow connected to the fact that it's a documentation subpage, some bit of code is causing it to be overruled where it wouldn't be on a main template page?

173.73.45.170 (talkcontribs)

Solved my own problem, so sharing here in case anyone else runs into it in the future:

My problem was that I had originally created Template:Infobox/styles.css when using a pre-Lua version of Infoboxes. The Lua Module:Infobox references Module:Infobox/styles.css in the module code, so it was trumping the inclusion of <templatestyles src="Template:Infobox/styles.css"> on the base Infobox template and only being honored on templates built on the base template, and only when those templates called the stylesheet from the Template namespace individually.

I migrated the styles from the stylesheet in the Template namespace to the one in the Module namespace, and created a redirect pointing the old one to the new one avoid future confusion along these lines.

Reply to "Can something cause a delay in revisions being reflected?"