Last modified: 2014-09-04 07:32:06 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 T65269, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63269 - enotif_body incorrectly assumes helppage is a page name causing watchlist enotifs to be sent with invalid urls
enotif_body incorrectly assumes helppage is a page name causing watchlist eno...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Email (Other open bugs)
1.22.5
All All
: Highest major (vote)
: 1.22.0 release
Assigned To: Nobody - You can work on this!
: easy, i18n
Depends on:
Blocks: hackathon2014
  Show dependency treegraph
 
Reported: 2014-03-30 02:39 UTC by Bawolff (Brian Wolff)
Modified: 2014-09-04 07:32 UTC (History)
5 users (show)

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


Attachments

Description Bawolff (Brian Wolff) 2014-03-30 02:39:41 UTC
Here's the last bit of an enotif email i got (for watchlist edit):

Feedback and further assistance:
http://www.mediawiki.org/wiki/Https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents

Maybe something is assuming some msg is a page name when it could be a url.
Comment 1 Bawolff (Brian Wolff) 2014-03-31 00:51:07 UTC
Technically caused by I999b97729536dbab4a3a5 but code was broken before (Since 2004 via r6696/20ae0324). 

One should not assume mediawiki:helppage is a local page since it can be a url. Instead it should be processed on the php side in UserMailier.php via something like Skin::makeInternalOrExternalUrl, and then substituted into the message like a normal parameter
Comment 2 Nemo 2014-03-31 07:12:04 UTC
Sigh, if only we could have used interwiki links (bug 54835).


(In reply to Bawolff (Brian Wolff) from comment #1)
> substituted into
> the message like a normal parameter

Like $HELPURL à la enotif body, or a standard numbered parameter?
But that's a detail; I don't remember what we decided about parameter changes in enotif body after Ibb795374 .
Comment 3 Gerrit Notification Bot 2014-04-10 16:17:35 UTC
Change 125219 had a related patch set uploaded by Nemo bis:
Use an actual URL for helppage in enotif_body

https://gerrit.wikimedia.org/r/125219
Comment 4 Nemo 2014-04-10 16:31:44 UTC
I submitted a patch with the obvious solution, which however forces wikis to update (almost) any local version of 'enotif_body' or 'helppage' message.

Note, before fbc65f8972fc08a (2011-08-19, 1.19) we used fullurl, which has the same assumption as canonicalurl; before b7eb28ca (bug 8846) 'helppage' was not used in enotif.

For now I could only think of ugly alternatives:
* regex to fix incorrect URLs after parsing;
* somehow override the default 'helppage' passed to 'enotif_body', making it an interwiki link that canonicalurl can parse;
* find some canonicalurl/fullurl trickery so that the magic word doesn't fiddle with full URLs;
* replace canonicalurl with something smarter (probably pointless, one would have to edit existing messages anyway).
Comment 5 Bawolff (Brian Wolff) 2014-04-10 22:57:53 UTC
(In reply to Nemo from comment #4)
> I submitted a patch with the obvious solution, which however forces wikis to
> update (almost) any local version of 'enotif_body' or 'helppage' message.
> 
> Note, before fbc65f8972fc08a (2011-08-19, 1.19) we used fullurl, which has
> the same assumption as canonicalurl; before b7eb28ca (bug 8846) 'helppage'
> was not used in enotif.
> 
> For now I could only think of ugly alternatives:
> * regex to fix incorrect URLs after parsing;

ewww. If we consider the current patch unacceptable, I think this is best option.

> * somehow override the default 'helppage' passed to 'enotif_body', making it
> an interwiki link that canonicalurl can parse;

Not really an option, since we can't make assumptions about the interwiki table of third party wikis

> * find some canonicalurl/fullurl trickery so that the magic word doesn't
> fiddle with full URLs;

Don't think that's possible. Especially not without extensions.

----

I'm supportive of the patch you submitted. I think mentioning in release notes, and making sure WMF wikis know to change it, is probably enough.

Alternative of course would be to change the message so it doesn't like to the help page. Why would you want to go to a wikitext tutorial from a watchlist notification email?
Comment 6 Bartosz Dziewoński 2014-04-15 21:26:56 UTC
This probably should be included in 1.22 and 1.23.
Comment 7 Gerrit Notification Bot 2014-05-03 16:01:01 UTC
Change 125219 merged by jenkins-bot:
Use an actual URL for helppage in enotif_body

https://gerrit.wikimedia.org/r/125219
Comment 8 Gerrit Notification Bot 2014-05-03 18:26:42 UTC
Change 131267 had a related patch set uploaded by MarkAHershberger:
Use an actual URL for helppage in enotif_body

https://gerrit.wikimedia.org/r/131267
Comment 9 Gerrit Notification Bot 2014-05-03 20:39:13 UTC
Change 131267 merged by jenkins-bot:
Use an actual URL for helppage in enotif_body

https://gerrit.wikimedia.org/r/131267
Comment 10 Bartosz Dziewoński 2014-05-03 20:47:51 UTC
Now merged and backported to 1.23, but *not* 1.22. Should we backport it there as well?
Comment 11 Nemo 2014-05-03 20:50:32 UTC
(In reply to Bartosz Dziewoński from comment #10)
> Now merged and backported to 1.23, but *not* 1.22. Should we backport it
> there as well?

Yep
Comment 12 Mark A. Hershberger 2014-05-08 10:17:05 UTC
It will need someone to manually do the backport.  Cherry-picking doesn't work right now.
Comment 13 Mark A. Hershberger 2014-05-09 16:30:24 UTC
Removing 1.23.0 target since it is already merged.  Leaving the bug open in case someone works on the backport.
Comment 14 Bartosz Dziewoński 2014-05-09 17:14:17 UTC
I am backporting this manually to REL1_22 right now. I'd appreciate help with testing it :)
Comment 15 Gerrit Notification Bot 2014-05-09 17:16:25 UTC
Change 132464 had a related patch set uploaded by Bartosz Dziewoński:
Use an actual URL for helppage in enotif_body

https://gerrit.wikimedia.org/r/132464
Comment 16 Mark A. Hershberger 2014-05-09 17:33:49 UTC
(In reply to Bartosz Dziewoński from comment #14)
> I am backporting this manually to REL1_22 right now. I'd appreciate help
> with testing it :)

I've asked Himeshi here at the Zurich hackathon to look at this.
Comment 17 Gerrit Notification Bot 2014-05-21 16:03:27 UTC
Change 132464 merged by jenkins-bot:
Use an actual URL for helppage in enotif_body

https://gerrit.wikimedia.org/r/132464
Comment 18 carchaias 2014-09-04 07:32:06 UTC
Shouldn't that be fixed in V 1.23.2? It is not as you can see here:

https://aquanautweb.de/testwiki/index.php?title=MediaWiki:Enotif_body

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


Navigation
Links