Last modified: 2013-11-09 10:29:17 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 T55872, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 53872 - Translate extension conflicts with Header-Footer extension (creates duplicate footers)
Translate extension conflicts with Header-Footer extension (creates duplicate...
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
Translate (Other open bugs)
REL1_21-branch
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
https://www.mediawiki.org/wiki/Extens...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-06 22:45 UTC by Ioannis Protonotarios
Modified: 2013-11-09 10:29 UTC (History)
8 users (show)

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


Attachments

Description Ioannis Protonotarios 2013-09-06 22:45:11 UTC
Extension:Header Footer provides per-namespace and per-page header and footer inclusion. This is how Extension:Header Footer works.

Now, let's say we have page "Test" translated to russian as page "Test/ru".

A. In my wiki I have enabled a namespace footer for all pages of the Main namespace. The footer shows fine in page "Test". But in page "Test/ru" there 2 instances of the footer, one below the page and one above.

The top footer has a line below it. That indicates that is included in Translates header somehow.

B. If I use magic word to suppress footer in original page "test" (and retranslate it), then the new "test/ru" has only one footer, the one on top!

A + B conclude that:

1. the bottom footer is the "Test"'s footer that Translate copied it somehow (where it shouln't have because it's not part of the page's content wikitext), and
2. the top footer is the legitimate namespace footer automatically created for every page but it is in the wrong place!

Indeed, If I completely remove Extension:Translate from LocalSettings.php, then the footer appears where it should be, i.e. at the bottom.

See screenshots for better understanding: https://www.mediawiki.org/wiki/File:Translate_vs_Header-Footer.png
Comment 1 Andre Klapper 2013-09-09 14:21:21 UTC
Thanks for reporting this!
This is about MediaWiki 1.21.x?

Wondering if this should rather end up in https://github.com/jamesmontalvo3/MediaWiki-HeaderFooter/issues and which codebase to "fix". :-/
Comment 2 Niklas Laxström 2013-09-09 17:42:01 UTC
FYI: Translate extension is using ArticleViewHeader hook and RequestContext::getMain()->getOutput()->addHtml() to inject the header. What does HeaderFooter use?
Comment 3 Ioannis Protonotarios 2013-09-10 10:22:43 UTC
(In reply to comment #1)
> This is about MediaWiki 1.21.x?
Both 1.21.1 and 1.21.2 now.

> Wondering if this should rather end up in
> https://github.com/jamesmontalvo3/MediaWiki-HeaderFooter/issues and which
> codebase to "fix". :-/

Yes, I will report it there as well

(In reply to comment #2)
> FYI: Translate extension is using ArticleViewHeader hook and
> RequestContext::getMain()->getOutput()->addHtml() to inject the header. What
> does HeaderFooter use?

I am not sure I fully undestand the code but it seems as a really simple extension. In HeaderFooter.php ( https://github.com/jamesmontalvo3/MediaWiki-HeaderFooter/blob/master/HeaderFooter.php ) I see an OutputPageParserOutput hook which is documented as "Called after parse, before the HTML is added to the output". Does this mean that the header or footer wikitext is injected in the page content as if it was part of the page's original wikitext? If such is the case then I think Translate cannot do anything about it and must be solved by the Header-Footer side. Am I right?

But still, I cannot figure out why the translated page has the footer on top!

HeaderFooter.body.php might also help ( https://github.com/jamesmontalvo3/MediaWiki-HeaderFooter/blob/master/HeaderFooter.body.php ), (it's small, just 75 lines).
Comment 4 Ioannis Protonotarios 2013-09-10 11:38:48 UTC
Reported to https://github.com/jamesmontalvo3/MediaWiki-HeaderFooter/issues/2
Comment 5 Andre Klapper 2013-11-09 10:29:17 UTC
Pretty sure this is stuff to fix in the Header-Footer extension instead, instead of Translate. Plus not much we can do without knowing details of what HeaderFooter does (no feedback in Gtihub ticket either).

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


Navigation
Links