Template talk:CAS
Template:CAS is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. This template does not have a testcases subpage. You can create the testcases subpage here. |
This is the talk page for discussing improvements to the CAS template. |
|
Streamlining the template code
[edit]@DePiep: Can you take a look at this template's source code? There's some syntax in the template which isn't necessary anymore due to my recent edit which changed the prefix in the hyperlink (prior to this edit, the template outputted a link to a nonfunctional wmflabs tool). Specifically, the &title={{{2|}}}
part of the source code is no longer necessary; this syntax appends the input from the 2nd parameter to the end of the hyperlink and was originally used to add the compound name from the 2nd parameter as a heading on the relevant https://tools.wmflabs.org/ page (e.g., see this example where the CAS number is set to "123" and compound name set to "Abc"). I'm not entirely sure what the "{{{1|(error 1)}}}] | {{{1|}}}}} {{{2|}}}
" syntax is doing or intended to do (note: this portion of the code immediately follows the title syntax), so I'm hesitant to edit that part of the template.
The documentation previously stated that an error message would be displayed when an empty CAS number is entered; however I deleted that statement in the documentation because, as of right now, the template doesn't give an error message when an empty CAS number is input into the first parameter when the template is called.
For example:
- When the template is called with a single space in the first parameter (i.e., "
{{CAS| |Compound name}}
"), it renders as:- "name Compound name"
- Similarly, when the template is called with the first parameter completely empty (i.e., "
{{CAS||Compound name}}
"), it also renders as:- "name Compound name"
In both cases, no error message is displayed at the moment. Seppi333 (Insert 2¢) 22:23, 28 December 2016 (UTC)
- I still get the same problem. It also does not render correctly in Chembox identifiers.Lkingscott (talk) 09:39, 27 February 2023 (UTC)
Wrong URL - needs update
[edit]It currently points to
https://www.commonchemistry.org/ChemicalDetail.aspx?ref=
And should be pointing to:
https://commonchemistry.cas.org/detail?cas_rn=
Please fix. :)
-- Arthurfragoso (talk) 19:05, 6 August 2023 (UTC)
Template-protected edit request on 24 August 2023
[edit]This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Change:
http://www.commonchemistry.org/ChemicalDetail.aspx?ref=
To:
https://commonchemistry.cas.org/detail?cas_rn=
Note that the old URL doesn't even use SSL/TLS. (HTTPS)
Thanks! Arthurfragoso (talk) 21:26, 24 August 2023 (UTC)
- Completed. P.I. Ellsworth , ed. put'er there 00:01, 25 August 2023 (UTC)