Last modified: 2014-11-17 10:34:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T7984, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 5984 - Edit preview doesn't let you preview cite.php footnotes.
Edit preview doesn't let you preview cite.php footnotes.
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Cite (Other open bugs)
unspecified
All All
: Low enhancement with 30 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 5492 24681 28849 (view as bug list)
Depends on: 6812
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-16 15:22 UTC by PS
Modified: 2014-11-17 10:34 UTC (History)
24 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description PS 2006-05-16 15:22:31 UTC
At present, if a section or article being edited does not contain the <
references /> tag, then footnotes will not show up in page preview. This 
means you have to commit the edit, then examine the new saved page and re-
edit instead.

Enhancement request -- if the page being rendered for preview contains cite.
php footnotes, AND there is no <references /> tag in the previewed text that 
will cause footnotes to be displayed, then the preview code adds a 
horizontal line followed by <references /> after the existing text, so that 
users can see their proposed footnotes too.
Comment 1 Titoxd 2006-05-18 22:12:44 UTC
Would adding <references/> to [[MediaWiki:Edittools]] accomplish the same thing?
Comment 2 PS 2006-05-18 23:36:38 UTC
If the text to be rendered in preview is the whole 
article, or certain sections, it might contain the 
</references> tag already, in which case you don't 
want to render it twice. So you have to check and 
only add it if it won't be rendered as-is.

Example pathological cases to check for:

<nowiki><references /></nowiki>
<references /> tag included in a template
<ref> ... </ref> or <ref /> in a template

etc.

So you have to check in coding it, whether the 
text as-is includes any renderable cite.php refs, 
and whether in preview, the text will include a 
rendered <references /> section if so.
Comment 3 PS 2006-05-18 23:49:59 UTC
Afterthought...

I don't mean you have to "trial render". Rather I 
mean, you have to have a way to flag during 
rendering, whether a <ref> was rendered and 
whether a <references /> was rendered. Possibly an 
elegant solution might be that the call to the 
render engine has a parameter "
AutoAddReferencesSection", set to TRUE for preview 
and FALSE elsewhere, that adds a terminal <
references> section if it is needed, before 
returning the rendered text.

But as Im not a coder, that may be a very naive 
approach. I don't know how helpful that is.
Comment 5 MZMcBride 2008-10-20 07:56:16 UTC
*** Bug 5492 has been marked as a duplicate of this bug. ***
Comment 6 René Kijewski 2009-08-03 16:34:19 UTC
I don't think using JavaScript is a proper solution.
Maybe it would be possible to give a preview in the “Templates used in this section”-section?
Comment 7 Svip 2009-08-03 16:40:28 UTC
JavaScript certainly do not seem like a solution to this.

Though, personally, I do not consider this a problem.  While editing, you might just add the <references/> tag at the bottom of the section, then preview it, see if those cites are all right, and move on.

You may obviously run into problems when you are reusing cites from earlier (or later) in the article, which are not declared in this section and thus <references/> will not know what to do, except tell you that it does not exist.

This sounds like a revisit of the entire article for this purpose to fulfil itself, which sort of renders the whole feat of using section editing fruitless.  I would call this a simple issue you that should just work around.  There seems to be no perfect solution.  Also, isn't this an issue with the Cite extension rather than with MediaWiki itself?
Comment 8 Chad H. 2010-08-06 12:17:09 UTC
*** Bug 24681 has been marked as a duplicate of this bug. ***
Comment 9 Jeff G. 2010-08-07 18:45:19 UTC
(In reply to comment #7)
> Also, isn't this an issue with the Cite extension rather than with MediaWiki itself?

The "Component" is currently set to "Cite".
Comment 10 Jeff G. 2010-08-13 03:37:51 UTC
There are two more javascript solutions mentioned at http://en.wikipedia.org/wiki/MediaWiki_talk:Edittools#References as follows (with absolute URLs):
The userscript at user:js/ajaxPreview http://en.wikipedia.org/wiki/User:Js/ajaxPreview provides a <references /> preview when editing sections. Possibly the code there, or someone at its talkpage, could help here? HTH. -- Quiddity (talk) 21:16, 9 August 2010 (UTC)
If you really care about references, user:Anomie/ajaxpreview.js http://en.wikipedia.org/wiki/User:Anomie/ajaxpreview.js does much more, it even checks for named references from other sections. Of course, JavaScript solutions have nothing to do with Edittols. — AlexSm 22:03, 9 August 2010 (UTC)
Comment 11 Garrett Fitzgerald 2011-01-07 14:15:38 UTC
Seems to me a fairly simple way to solve this would be to include a "Preview Full Article" link, either for all previews or just section-edit previews.
Comment 12 Aryeh Gregor (not reading bugmail, please e-mail directly) 2011-01-07 17:03:24 UTC
Adding extra links is a bad solution to practically any problem.  It would be better to just output the references automatically in section edits if there otherwise aren't any.
Comment 13 Jeff G. 2011-02-12 18:36:45 UTC
(In reply to comment #12)
> It would be
> better to just output the references automatically in section edits if there
> otherwise aren't any.

Yes, it would.  Better still would be to:
# not limit that automatic output to section edits, but instead automatically *output* a references section (if there are ref tags but no references section) for the whole page or section (while displaying an existing page or section, to cover up the problem with existing pages) - we already have detection logic for this in the parser;
# and automatically *add* a references section (if there are ref tags but no references section) for the whole page to the wikitext (while editing, to fix the problem with existing pages).

An ambitious bot, set of bots, or database correction could automatically *add* a references section (if there are ref tags but no references section) for the whole page to the wikitext for every page in every project of every organization that uses this extension to fix the problem with existing pages, given approval by the developers of those projects.
Comment 14 Svick 2011-02-12 21:21:16 UTC
(In reply to comment #13)
> # and automatically *add* a references section (if there are ref tags but no
> references section) for the whole page to the wikitext (while editing, to fix
> the problem with existing pages).

How exactly would that be done? What name would that section have? Where would that section go? What about references with group parameter?

On enwiki, {{references}} is usually used instead of <references />, the section name is either “Notes” or “References” and the section goes before the External links section.

I don't think logic should be implemented in MediaWiki, especially since consensus about those things can change and other wikis have other customs. And according to the text at [[Category:Pages with missing references list]], AWB already fixes this and at least enwiki has a bot that fixes those errors.
Comment 15 Brion Vibber 2011-05-06 21:16:19 UTC
*** Bug 28849 has been marked as a duplicate of this bug. ***
Comment 16 Fred Gandt 2011-12-22 03:31:19 UTC
Comment in general support for this functionality. For reference (no pun intended), a discussion/proposal on en:WP is here --> [[Wikipedia:Village_pump_(proposals)#Reflist_should_be_shown_when_previewing_a_section_edit]] (first comment for me on Bugzilla and no preview, please excuse if messy).
Comment 17 Steve 2012-12-15 22:16:32 UTC
When editing a section the footnote text never appears, at least not if the {{references}} or <references /> is not within that section. Suggest this bug be restated as

"Enhancement request -- If the page OR SECTION being rendered for preview contains cite or php footnotes, then the preview code should add a 
horizontal line followed by <references /> after the existing text, so that 
users can see their proposed footnotes and examine potential errors without having to commit the edit."
Comment 18 Theopolisme 2013-04-13 01:16:42 UTC
This was brought up again at [[Wikipedia:Village_pump_(proposals)#Auto_reflist_when_previewing_whilst_section_editing]], FWIW.
Comment 19 Samuel Bronson 2014-02-15 18:11:31 UTC
(In reply to Steve from comment #17)
> When editing a section the footnote text never appears, at least not if the
> {{references}} or <references /> is not within that section. Suggest this
> bug be restated as
> 
> "Enhancement request -- If the page OR SECTION being rendered for preview
> contains cite or php footnotes, then the preview code should add a 
> horizontal line followed by <references /> after the existing text, so that 
> users can see their proposed footnotes and examine potential errors without
> having to commit the edit."

I think it would probably sound better if you drop the "page" part.

Also, I don't think you can modify the Description in Bugzilla, only the Summary, so you'd need something much snappier, like "Section edit preview doesn't show cite.php footnotes". (<https://bugzilla.wikimedia.org/docs/en/html/bug_page.html> doesn't even mention the *existence* of the Description.)
Comment 20 Samuel Bronson 2014-02-15 19:18:33 UTC
Also, note that I find this quite annoying, too, and I'd be perfectly content if only the refs actually present in the section are actually included.  If it's not in the section I'm editing, I can't possibly screw the reference itself up; the worst that could happen is that I do <ref name=... /> with the wrong name.
Comment 21 Technical 13 2014-03-01 21:02:53 UTC
Can't a collapsed by default section at the bottom of an edit page be added that shows all of the references for the section being edited?  https://en.wikipedia.org/wiki/Wikipedia:Village_pump_%28idea_lab%29#Section_editing_reflinks_idea is why I'm bumping this thread.  I would think that if whole page references are really wanted, that could also be accomplished as well, and I can think of a detailed output method that I think would work great (although I could see others as disagreeing with me).
Comment 22 Gerrit Notification Bot 2014-04-27 01:48:40 UTC
Change 129932 had a related patch set uploaded by Gerrit Patch Uploader:
Add reference list to section preview if missing

https://gerrit.wikimedia.org/r/129932
Comment 23 Gerrit Notification Bot 2014-07-03 19:33:45 UTC
Change 129932 abandoned by Legoktm:
Add reference list to section preview if missing

https://gerrit.wikimedia.org/r/129932
Comment 24 Makyen 2014-07-08 14:42:44 UTC
The abandonment of https://gerrit.wikimedia.org/r/129932 without explanation implies that the fix for https://bugzilla.wikimedia.org/show_bug.cgi?id=66860 solves this issue.  Based on testing, the fix for that bug does not show references in section previews.

I can understand that [https://gerrit.wikimedia.org/r/129932 129932] might be incompatible with [https://gerrit.wikimedia.org/r/#/c/141583/ 141583]. However, if that is the reason for abandonment, then please say so. It is also unclear to me that abandonment would be the appropriate course of action if the issue was incompatibility with [https://gerrit.wikimedia.org/r/#/c/141583/ 141583]. In my opinion, the more appropriate course of action would have been to indicate the incompatibility and make additional updates to [https://gerrit.wikimedia.org/r/129932 129932].

Because of the lack of explanation, I am just guessing here as to the reason for the request to abandon those changes. However, at least to me the request implies that [https://gerrit.wikimedia.org/r/129932 129932] is being abandoned because [https://gerrit.wikimedia.org/r/#/c/141583/ 141583] fixes this issue when it does not.
Comment 25 Gadget850 2014-09-25 17:51:14 UTC
Since the patch is abandoned, I am changing the status to NEW.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links