Jump to content

Template talk:CAS

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

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:

  1. When the template is called with a single space in the first parameter (i.e., "{{CAS| |Compound name}}"), it renders as:
    "name Compound name"
  2. 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 ) 22:23, 28 December 2016 (UTC)[reply]

I still get the same problem. It also does not render correctly in Chembox identifiers.Lkingscott (talk) 09:39, 27 February 2023 (UTC)[reply]

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)[reply]

Template-protected edit request on 24 August 2023

[edit]

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)[reply]

 Completed. P.I. Ellsworth , ed. put'er there 00:01, 25 August 2023 (UTC)[reply]