Category:Harv and Sfn template errors: Difference between revisions

m
Removed redundant {{empty category}} which is transcluded by {{tracking category}} (Task 14)
m (robot: Creating new article from Special:WantedPages)
 
m (Removed redundant {{empty category}} which is transcluded by {{tracking category}} (Task 14))
 
Line 1: Line 1:
{{Tracking category}}
{{Tracking category}}
{{empty category}}
{{skip to TOC}}
This category holds articles that use any of the short-cite templates ({{tlx|harv}} and {{tlx|sfn}} template families, and {{tlx|harvc}}) where one or more of those short-cite templates do not properly link to a full citation, the target, or where multiple full cites can be the target of a single short-cite template.
This category holds articles that use any of the short-cite templates ({{tlx|harv}} and {{tlx|sfn}} template families, and {{tlx|harvc}}) where one or more of those short-cite templates do not properly link to a full citation, the target, or where multiple full cites can be the target of a single short-cite template.


Line 7: Line 5:


==Displaying error messages==
==Displaying error messages==
Currently, two [[WP:User script|user scripts]] reliably detect errors
Currently, two [[BP:User script|user scripts]] reliably detect errors
*[[User:Svick/HarvErrors.js]] – Errors only
*[[User:Svick/HarvErrors.js]] – Errors only
*[[User:Trappist the monk/HarvErrors.js]] – Errors + Warnings about potential errors ''when short footnote templates are used''. This has ''substantially'' fewer pointless warnings than [[User:Ucucha/HarvErrors.js|Ucucha's old script]].
*[[User:Trappist the monk/HarvErrors.js]] – Errors + Warnings about potential errors ''when short footnote templates are used''. This has ''substantially'' fewer pointless warnings than [[User:Ucucha/HarvErrors.js|Ucucha's old script]].
Line 18: Line 16:
::{{code|lang=js|importScript('User:Svick/HarvErrors.js'); // Backlink: [[User:Svick/HarvErrors.js]]}}
::{{code|lang=js|importScript('User:Svick/HarvErrors.js'); // Backlink: [[User:Svick/HarvErrors.js]]}}
::{{code|lang=js|importScript('User:Trappist the monk/HarvErrors.js'); // Backlink: [[User:Trappist the monk/HarvErrors.js]]}}
::{{code|lang=js|importScript('User:Trappist the monk/HarvErrors.js'); // Backlink: [[User:Trappist the monk/HarvErrors.js]]}}
:in your [[Special:MyPage/common.js|skin]] page, like [https://en.wikipedia.org/w/index.php?title=User:Headbomb/monobook.js&diff=947843597&oldid=947843535 this]. Alternatively, you can go to [[Special:MyPage/skin.js]] to make the script apply only to your current [[WP:SKIN|skin]].
:in your [[Special:MyPage/common.js|skin]] page, like [https://en.wikipedia.org/w/index.php?title=User:Headbomb/monobook.js&diff=947843597&oldid=947843535 this]. Alternatively, you can go to [[Special:MyPage/skin.js]] to make the script apply only to your current [[BP:SKIN|skin]].
;Method 3 – .css code for error messages emitted by the short-cite templates {{anchor|Method3}}
;Method 3 – .css code for error messages emitted by the short-cite templates {{anchor|Method3}}
:Error messages are emitted by the various short-cite templates via [[Module:Footnotes]] and [[Module:Harvc]].  Because of [[#Current limitations and false-positive errors|technical limitations]], the modules can emit [[false positive|false-positive]] error messages along with valid error messages.  For this reason, no-target error messages are hidden by default. To show these hidden error messages, include the following text in your [[Special:MyPage/common.css|common.css]] page or your specific [[Special:MyPage/skin.css|skin.css]] page:  
:Error messages are emitted by the various short-cite templates via [[Module:Footnotes]] and [[Module:Harvc]].  Because of [[#Current limitations and false-positive errors|technical limitations]], the modules can emit [[false positive|false-positive]] error messages along with valid error messages.  For this reason, no-target error messages are hidden by default. To show these hidden error messages, include the following text in your [[Special:MyPage/common.css|common.css]] page or your specific [[Special:MyPage/skin.css|skin.css]] page:  
::{{code|lang=css|.harv-error {display: inline !important;} /* display Module:Footnotes errors */}}
::{{code|lang=css|.harv-error {display: inline !important;}         /* display Module:Footnotes errors */}}
:Error message display may be enabled in the future.
:Error message display may be enabled in the future.


Line 50: Line 48:
*placing {{tl|anchor}} adjacent to the plain-text citation; set the {{tlc|anchor}} parameter value to the value expected by the short-cite template
*placing {{tl|anchor}} adjacent to the plain-text citation; set the {{tlc|anchor}} parameter value to the value expected by the short-cite template
*set the short-cite parameter {{para|ref|none}} to suppress anchor ID link creation
*set the short-cite parameter {{para|ref|none}} to suppress anchor ID link creation
Ways of resolving false positive {{error-small|no target}} errors include:
*adding the CITEREF to:
** [[Module:Footnotes/whitelist]] – use this when many articles use the same long-form citation
** a {{tlx|sfn whitelist}} template in the article


Ways of resolving {{error-small|multiple targets}} errors include:
Ways of resolving {{error-small|multiple targets}} errors include: