Extension talk:Cite

Jump to: navigation, search

About this board

Lingo breaking formatting when citations at end of line

1 (talkcontribs)

Cross posting the Lingo and Cite extension issue

We've found an odd formatting issue that pops up when Lingo is enabled. The following code should generate four headings with indented text below them, some with references before the full stop, and some after:

'''Heading 1'''
:Indented text with reference followed by a line break with clear which should clear previous formatting.<ref>Reference1</ref>

'''Heading 2'''
:Indented text with reference followed by blank line only, reference after punctuation.<ref>Reference 2</ref>

'''Heading 3'''
:Indented text with reference followed by blank line only, reference before punctuation<ref>Reference 3</ref>.

'''Heading 4'''
:And so on. All these display as expected in preview mode, including an extra line between 1 and 2. 

<references />

The expected formatting is shown in this image. However, when Lingo is enabled, the formatting is not correctly cleared at the end of any line where a citation comes after the punctuation - see this image. Inspection of the HTML source shows that various formatting tags are not being closed.- Danny252

Reply to "Lingo breaking formatting when citations at end of line"

References not rendered

Summary by Jdforrester (WMF)

It used to be possible to change the references list rendering from a list to something else, like a table. This is no longer supported, and old config trying to do that may break the display on your wiki. (talkcontribs)

Hey since updating to mediawiki 1.30 the references list on the end of the page is no longer rendered.

It looks like the following:

|- class="references" | 24. || ↑ || id="cite_note-Reischl_2008-24" | Reischl, Gerald, 2008: Die Google Falle. Die unkontrollierte Weltmacht im Internet. Wien: Ueberreuter.
|- class="references" | 25. || ↑ || id="cite_note-Dolata_2011-25" | Dolata, Ulrich, 2011: Google vs. Facebook: Der Kampf um das Internet, in: Blätter für deutsche und internationale Politik 9/2011: 26-29.
|- class="references" | 26. || ↑ || id="cite_note-Dolata_2015-26" | Dolata, Ulrich, 2015: Volatile Monopole. Konzentration, Konkurrenz und Innovationsstrategien der Internetkonzerne. In: Berliner Journal für Soziologie 24 (4): 505-529

Any idea why?

Jdforrester (WMF) (talkcontribs)

Hey there,

It looks like you've customised your Cite install and have been using tables with table rows as the output format for reference lists. I don't think that's meant to work (they're meant to be lists), and it's likely that changes to parsing made the old customisations you were using no longer apply. (talkcontribs)

Thank you,

I just recently came to the troubling mediawiki, where could i find this customisations?

Jdforrester (WMF) (talkcontribs)

The old messages <cite_references_prefix> and <cite_references_suffix> used to be HTML entities you could over-ride; they defaulted to <ol class="references"> and </ol>, but your installation might have tried to replace them with <table> or similar. You can check by going to the pages MediaWiki:cite_references_prefix and MediaWiki:cite_references_suffix on your wiki. They're now hard-coded as an ordered list as part of the responsive content work landed in 2015, and so your wiki's customisations no longer work; you should delete those pages.

The customisation you're using also takes place in the messages <cite_references_link_one> and <cite_references_link_many> where you can tweak (previously, radically change) the output format. The first's default value is:

<li id="\"$1\""><span class="\"mw-cite-backlink\"">[[#$2|↑]]</span> $3</li>

… but it looks like your wikis has over-ridden it to:

|- class="references" | $1 || <span class="\"mw-cite-backlink\"">[[#$2|↑]]</span> || id="$1" | $3

If you delete these messages (i.e. delete the pages MediaWiki:cite_references_link_one and MediaWiki:cite_references_link_many on your wiki), the references should render "correctly", the same way that they do on Wikimedia's servers, but your local customisations will be gone, sorry. (talkcontribs)

Thank you very much,

that was exactly what i needed!

It still looks fine enough so it can stay on the default way.

Rlyehable (talkcontribs)

Is there a means to place the linkback numbers after the text of the reference? Currently it appears as:
1. 1.00 1.01 1.02 1.03 1.04 1.05 Text of reference.
Is there a way to have it look like:
1. Text of reference. 1.00 1.01 1.02 1.03 1.04 1.05
When there are a large number of backlinks, it can be difficult to read.

Reply to "Linkback after ref text"

PHP Fatal error: Uncaught Exception: Cite is not compatible with the current MediaWiki core (version 1.28.2), it requires: >= 1.30.0.

2 (talkcontribs)

Why do you apes do such things?

Jdforrester (WMF) (talkcontribs)
Reply to "PHP Fatal error: Uncaught Exception: Cite is not compatible with the current MediaWiki core (version 1.28.2), it requires: >= 1.30.0."
SANtosito (talkcontribs)


I noticed that after update of Mediawiki to 1.28.2 I got these error

Cite error: Invalid <references> tag; parameter "group" is allowed only. Use < referencs/>, or < references/>

Jdforrester (WMF) (talkcontribs)

Yes, this error was added nearly a decade ago to help editors fix it when they add <references/> with an invalid parameter; you have to remove the wrong parameter from the wikitext for it to go away.

Did you upgrade a very old version of the Cite extension?

Bttfvgo (talkcontribs)

Don't know if it'll help, but I was getting the same error. In my case, the problem was that the Template:Reflist page had been revised. The only way I was able to fix the error was to revert the template to the revision before the updated version replaced it. Let me know how it goes!

Bttfvgo (talkcontribs)

Here's the version that works:

<div class="reflist <!--
 -->{{#if: {{{1|}}}
    | columns {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }}
      | references-column-width 
      | references-column-count references-column-count-{{#if:1|{{{1}}}}} }}
    | {{#if: {{{colwidth|}}}
      | references-column-width }} }}" style="<!--
 -->{{#if: {{{1|}}}
    | {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }}
      | {{column-width|{{#if:1|{{{1}}}}}}}
      | {{column-count|{{#if:1|{{{1}}}}}}} }}
    | {{#if: {{{colwidth|}}}
      | {{column-width|{{{colwidth}}}}} }} }} list-style-type: <!--
 -->{{{liststyle|{{#switch: {{{group|}}}
    | upper-alpha
    | upper-roman
    | lower-alpha
    | lower-greek
    | lower-roman = {{{group}}}
    | #default = decimal}}}}};">

...and here is the only that starting causing the error. The "check for unknown parameters" caused the reflist to fail. At least it did in my case.

<div class="reflist <!--
 -->{{#if: {{{1|}}} {{{colwidth|}}}
    | columns references-column-width
	}}" style="<!--
 -->{{#if: {{{1|}}}
    | {{#iferror: {{#ifexpr: {{{1|1}}} > 1 }}
      | {{column-width|1={{{1}}}}}
      | {{#switch:{{{1|}}}|1=|2={{column-width|1=30em}}|#default={{column-width|1=25em}}}} }}
    | {{#if: {{{colwidth|}}}
      | {{column-width|1={{{colwidth}}}}} }} }} list-style-type: <!--
 -->{{{liststyle|{{#switch: {{{group|}}}
    | upper-alpha
    | upper-roman
    | lower-alpha
    | lower-greek
    | lower-roman = {{{group}}}
    | #default = decimal}}}}};">
{{#tag:references|{{{refs|}}}|group={{{group|}}}|responsive={{#if:{{{1|}}}{{{colwidth|}}}|0|1}}}}</div>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using reflist with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Reflist]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | colwidth | group | liststyle | refs }}<noinclude>

Hope this helps!

SANtosito (talkcontribs)


I solved it by updating Extension:Cite to the newest one, everything works perfect now!

VisualEditor and Cite failing on IE11 with Moderation

Tansaku (talkcontribs)
Edward Chernenko (talkcontribs)

Fixed in Moderation.

Reply to "VisualEditor and Cite failing on IE11 with Moderation"

How to get transcluded references to display in the references tag of the page it's transcluded in?

1 (talkcontribs)

I'm currently working on a wiki which has multiple reference subpages which are then transcluded into one big main page full of references.

Currently each subpage has its own references section. What I'd like to do is exclude that when the subpages transcluded, and then have one big collective references section on the main page.

Problem is... I can't get it to work. I can transclude the subpage's own references tag and have lots of little reference lists, but when I exclude the subpage's own tag from being displayed when transcluded and then put the references tag on the main page instead, no list is generated on the main page.

Reply to "How to get transcluded references to display in the references tag of the page it's transcluded in?"
Speeditor (talkcontribs)

There should probably be a customizable message for when there are no inline references in a MediaWiki-powered article but there is a reference tag at the bottom.

Be..anyone (talkcontribs)

Yes, maybe a tracking category could do the trick. OTOH an unused <references /> apparently has no effect at all, which problem are you trying to solve?

Speeditor (talkcontribs)

It should designate that the reference list is empty so as not to leave empty sections on the page. e.g:

There are currently no references within the article.

I have tried and failed to reproduce this effect using #ifeq, #tag and <references/>. (talkcontribs)

Just wondering if anyone has figured out how to tell if the reference list is empty. I have been trying to do this as well.

Reply to "Empty reference list message"

Conflict with another Extension?

Summary last edited by CharlesSpencer 19:14, 11 October 2016 1 year ago

Old {{reflist}} template was breaking things on a third party wiki.

CharlesSpencer (talkcontribs)

Whatever I do, I get Cite error: <cite_error_refs_without_references> at the bottom of any page with a {{Reflist}} call on it. If I take an existing page with absolutely no references on it at all and add a single <ref>Foo</ref> pair and then a {{Reflist}} call at the bottom, I get the error! I am using the HeaderTabs extension. Could this be the source of the problem? I also use SMW and several Semantic Wiki extensions too. Hope someone can help! Thanks. CharlesSpencer (talk) 22:24, 3 October 2016 (UTC)

Jdforrester (WMF) (talkcontribs)

Are you sure that it's not cite_error_group_refs_without_references?

It sounds like your i18n message cache needs to be refreshed (so that it shows the contents of message, not the key, and that maybe your local copy of the {{reflist}} template is breaking things?

Sorry this isn't helpful.

CharlesSpencer (talkcontribs)

Thanks. I've run rebuildLocalisationCache.php and rebuildmessages.php and I still get Cite error: <cite_error_refs_without_references> (copy/paste from the page, so it's verbatim). Maybe I should go to Wikipedia and re-export Cite and ALL its little friends! CharlesSpencer (talk) 22:05, 4 October 2016 (UTC)

CharlesSpencer (talkcontribs)

When I replace {{reflist}} with </references> I no longer get the error, so I need to investigate the template and/or modules imported from Wikipedia, I think... Thanks for your help. CharlesSpencer (talk) 22:19, 4 October 2016 (UTC)

Jdforrester (WMF) (talkcontribs)

It's surprising to me that the template could make such a breakage, but yeah, it sounds like that's the problem. Happy to help!

CharlesSpencer (talkcontribs)

Sorry to be slow coming back to you.

I am getting four identical errors (I have concatenated the line numbers) as follows:

Notice: Use of undefined constant CITE_DEFAULT_GROUP - assumed 'CITE_DEFAULT_GROUP' in /volume1/web/MediaWiki/extensions/Cite/Cite_body.php on line 183 /920 /555 /1121

Hope that helps.CharlesSpencer (talk) 19:14, 11 October 2016 (UTC)

Reply to "Conflict with another Extension?"
Jeblad (talkcontribs)

Reformatted the examples and added a few changes/clarifications. Hopefully I got all tags right. There are also some bits and pieces of inline code that should have been updated.

If the present version is marked for translation I can make an attempt to translate the page into Norwegian, and perhaps spot some errors.

Jdforrester (WMF) (talkcontribs)