Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Template talk:Chembox

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
(Redirected from Template talk:Chembox Identifiers)
Latest comment: 3 days ago by DMacks in topic Bug: not all local images are tracked

Template-protected edit request on 14 March 2026

[edit]

We are students from Radboud University taking the course "Toxicology (NWI-MOL054)", we have a project to choose one substance and write about it on Wikipedia. We kindly ask for access to edit the chemical infobox so the assignment can be completed. Mariamaina (talk) 17:03, 14 March 2026 (UTC)Reply

 Not done: requests for decreases to the page protection level should be directed to the protecting administrator, or to Wikipedia:Requests for page protection if the protecting administrator is not active or has declined the request. Zackmann (Talk to me/What I been doing) 18:17, 14 March 2026 (UTC)Reply
Well actually, this isn't even the right approach to the goal. This template is just a tool that actual substance articles use to format the infobox. It isn't an article itself and does not contain information about any specific substance itself. The details that it displays are written in the article page. DMacks (talk) 18:30, 14 March 2026 (UTC)Reply

Formatting issue with article names containing apostrophes

[edit]

For e.g. Tröger's base, template currently displays title like this:

Tröger
'
s base

Thanks for any help with this, and happy editing -- Middle 8 Neurodivergence • (s)talk 19:44, 14 June 2026 (UTC)Reply

@Middle 8: Are you using mobile/tablet? On my end, I don't see this issue unless I switch to mobile view. I recall a similar problem with punctuation in infoboxes on mobile which someone reported elsewhere. In that case, the issue was related to MOS:PSEUDOLISTs, and was easily fixed by using {{ubl}} instead of <br>. Your finding suggests the problem is more extensive. I'm fairly sure this is a deeper technical problem and isn't necessarily anything to do with {{Chembox}} specifically.
See Wikipedia:Village pump (technical)/Archive 230 § Punctuation on separate lines for the previous case. I've posted a comment on phab:T428472 (bug report) noting Tröger's base. – Scyrme (talk/solidarity) 21:19, 14 June 2026 (UTC)Reply
Thank you kindly Scyrme for your follow-up on this, and yes, I encountered the problem in mobile view; I should've mentioned that. In desktop view on my smartphone (Android), the issue does not appear, FWIW. Best regards & happy editing -- Middle 8 Neurodivergence • (s)talk 22:08, 14 June 2026 (UTC)Reply

Bug: not all local images are tracked

[edit]

When an article has a Chembox with an image (|ImageFile=, etc.) that is locally uploaded (enwiki) rather than commons, the article is placed in Category:Chemical pages containing a local image. However, there are pages missing from that cat.

Article Local image Article is in cat
Benzene - no (CORRECT)
Olympicene File:Olympicene AFM.jpg yes (CORRECT)
Curium(III) chloride File:Curium(III) chloride.jpg no (BUG)

A trigger appears to be an image whose name contains certain characters that get URL encoded by {{filepath}}, a parser function that generates the URL of the image itself. That URL is then mis-parsed by the {{#titleparts}} magic word in chembox's {{ParmPart}} helper function. The following change seems to fix it:

−
{{#ifeq:/{{{2|}}} |{{#titleparts:/{{{2|}}} |1|{{#expr:1+{{{1|1}}}}}}} | |{{#titleparts:/{{{2|}}} |1|{{#expr:1+{{{1|1}}}}}}} }}<noinclude>{{documentation}}</noinclude>
+
{{#ifeq:/{{{2|}}} |{{#titleparts:/{{Urldecode|{{{2|}}}}} |1|{{#expr:1+{{{1|1}}}}}}} | |{{#titleparts:/{{Urldecode|{{{2|}}}}} |1|{{#expr:1+{{{1|1}}}}}}} }}<noinclude>{{documentation}}</noinclude>

It's hard to come up with a decent test harness. Anyone wanna comment on the diagnosis or proposed solution before I unleash it? DMacks (talk) 03:22, 30 September 2026 (UTC)Reply