Template talk:Chembox

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Leyo (talk | contribs) at 21:08, 13 January 2024 (→‎Move identifier section to the bottom: re). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

False positives?

When I updated the GHS for Neophyl chloride using the details from PubChem a number of predefined combinations weren't recognised and are categorised as P-phrase errors. The unrecognised combinations are described in this list.

Are they false positives? Or have I neglected something at Neophyl chloride? (If these are false positives, there are likely many others in the tracking category; the predefined combinations recognised by the template/module might need to be systematically updated.) – Scyrme (talk) 23:39, 30 May 2023 (UTC)[reply]

It is not just your edits, I have been adding such entries too. They are not false. We are missing them from the Wikipedia listing. Graeme Bartlett (talk) 02:03, 31 May 2023 (UTC)[reply]
A false positive means they are falsely being recognised as errors; if the P-phrases are correct and Wikipedia needs to be updated, then they are false positives. – Scyrme (talk) 16:35, 31 May 2023 (UTC)[reply]
To me, "not false" means "the GHS is correct" rather than "not a false-positive detection of mistake". This conversion is a nest of double- and triple-negatives:) I have occasionally looked at updating the template checks, and generally gave up because it's such a spaghetti and so many duplicative parts. DMacks (talk) 16:44, 31 May 2023 (UTC)[reply]
Regardless, I've attempted an update to Module:GHS phrases/data and the wrongly categorised pages appear to be clearing out. – Scyrme (talk) 17:36, 31 May 2023 (UTC)[reply]
Alright, looks like it's done clearing. Category:GHS errors has gone from over 100 down to just 11. (Not counting the subcategory, Category:GHS warnings. That's unchanged.)
The remaining entries appear to pertain to |1=-, which is mentioned in the category description ("Currently (December 2021), articles are listed that... please ignore this"). – Scyrme (talk) 18:21, 31 May 2023 (UTC)[reply]

Category:GHS errors is now cleared, except for those articles using a hyphen. This includes the subcateogory, which is now empty. Thanks to whoever sorted out the last remaining ones in Category:GHS warnings before I got around to it. – Scyrme (talk) 00:22, 16 June 2023 (UTC)[reply]

Looks like LaundryPizza03 went ahead and removed the hyphens on 18 June. – Scyrme (talk) 10:26, 18 July 2023 (UTC)[reply]

Template-protected edit request on 15 August 2023

Add legal_BR and legal_BR_comment to Template:Chembox Pharmacology

It's already present in Template:Infobox drug/legal status and Template:Chembox Legal_status

-- Arthurfragoso (talk) 17:42, 15 August 2023 (UTC)[reply]

Drugs that I want to set the status: (so its easier to find them later, otherwise I might forget)

-- Arthurfragoso (talk) 06:32, 16 August 2023 (UTC)[reply]

 Done Using Legal_BR and Legal_BR_comment for consistency with other parameters. SWinxy (talk) 21:09, 16 August 2023 (UTC)[reply]
Thanks, but it partially works.
When I click in preview, It works and shows up in the chembox, but it also shows up a red message saying: Error in template * unknown parameter name (Template:Chembox Pharmacology): "Legal_BR; Legal_BR_comment" (See parameter list). This message only shows in Preview, it will not show after Publish changes.
I tested in the sandbox, and there are two more places in the code that needs to include the parameters: just at the top in the #if: and a bit bellow between "templatepar" and "END HEADERBAR" -- Arthurfragoso (talk) 06:18, 18 August 2023 (UTC)[reply]
 Done * Pppery * it has begun... 23:07, 26 August 2023 (UTC)[reply]

Renaming sections

Any comments about renaming "section numbers" in articles which are using the chembox. One example where section6 is renamed to section4 [1] . I think its a bad idea because when adding new sections they would probably be out of order (i.e. the order specified in the documentation). (@M97uzivatel:) - Christian75 (talk) 11:59, 4 November 2023 (UTC)[reply]

I agree it's important to keep the sections in the same order in the display result. Given sections with no content are not displayed (I hope!), there is no problem with a number being skipped and no value to an edit that merely changes the numbers to keep them strictly sequential. DMacks (talk) 17:35, 4 November 2023 (UTC)[reply]
The |section# v# sets the order of calling, and telling what is in that section gives the order of display. In this case it does not change anything, but if someone wants to add a fourth section this one may need to be moved down. It is a bit useless to change the numbers, often certain sections are always placed as last (hazards, explosive data, e.g.) so leaving them in a high number makes it easier and avoids duplicate use and confusion. I think we even have a standard order for sections, though with options to re-order for some compounds (we have explosive data normally quite far to the bottom, but for TNT it makes sense to have it higher up).
Cleaning up empty parameters/sections should also be done with common sense, you wouldn’t want to remove the ones for data that is possibly/likely going to be added (it’s fine for obscure parameters) as it gives quite some work for n00bs like me to find the correct parameter name and place. Dirk Beetstra T C 04:16, 7 November 2023 (UTC)[reply]
Well since I left a note on M97uzivatel's talk page, M97uzivatel is no longer removing empty stuff or renumbering sections. Several accidents happened while doing this, eg duplicate section numbers and excessive deletion. Personally I may remove parameters that would never be used. And when I start a Chembox now, I only put in parameters that I have values for. For those that use copies or templates templates, they may end up with unused stuff. But it is just busy work to remove this if there is nothing else to change. Graeme Bartlett (talk) 04:43, 7 November 2023 (UTC)[reply]

Move identifier section to the bottom

The identifiers section ahead of the properties section is not ergonomic for readers because more readers will want to find out about the chemical properties than of the identifiers. Because this is the least descriptive part of the infobox, I suggest moving it to the bottom. CactiStaccingCrane (talk) 18:24, 13 January 2024 (UTC)[reply]

That's what you think. The CAS RN for example is likely of high interest to readers. --Leyo 21:08, 13 January 2024 (UTC)[reply]