Last modified: 2014-09-09 22:55:34 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 T70599, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68599 - (mm-ch) MassMessage: Bugs related to contenthandler branch (tracking)
(mm-ch)
MassMessage: Bugs related to contenthandler branch (tracking)
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
MassMessage (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://mm-ch.wmflabs.org/wiki/Main_Page
: tracking
Depends on: 68600 68601 68602 68603
Blocks: tracking 61255
  Show dependency treegraph
 
Reported: 2014-07-26 03:17 UTC by Kunal Mehta (Legoktm)
Modified: 2014-09-09 22:55 UTC (History)
3 users (show)

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


Attachments

Description Kunal Mehta (Legoktm) 2014-07-26 03:17:20 UTC
Tracking bug for bug 61255, and things in the "contenthandler" branch.
Comment 1 MZMcBride 2014-08-04 23:57:13 UTC
Just dumping notes here 'cause I'm lazy and don't want to lose them.

---
* Fix creation edit summary
* Categorise all delivery lists (addTrackingCategory?)
* Kill add pages header
* Link back to list
* Fix instructions on special page and don't show technical details for single wiki
* Add copyright disclaimer (see Special:MassMessage)
* Mention protected status on the special page
* Block interwiki titles (Title::isExternal) and special pages
* Escape wikitext in invalid targets error (wfEscapeWikitext)
---

Additional thoughts I had:

* edit notices? blergh
* icons instead of words such as "(remove)" might be cleaner; dunno
* still think the "Add pages" header should be killed; would like to discuss further
* it's a bit weird to see "Pages in this list" as an h2 without a section-edit link
** if the "Add pages" header is kept, it should maybe have a section-edit type link that reads "[bulk edit]" or similar
* make "(remove)" less dangerous
** probably depends on https://gerrit.wikimedia.org/r/92315
Comment 2 wctaiwan 2014-08-08 10:14:00 UTC
I'm largely done fixing the things in MZMcBride's comment. Some comments about the ones that I have not implemented as described:

* Add pages form / header: Form moved to before the page list per IRC discussion (prevents people having to scroll down to get to it on long lists)

* Icons instead of words such as "(remove)": I've generally avoided adding custom design elements in order to ensure compatibility with skins other than Vector; if others also feel that an icon here would be better, this can probably be done.

* Section edit links: Personally I don't think they make sense in this context...
Comment 3 Sam Reed (reedy) 2014-09-06 00:06:01 UTC
https://github.com/wikimedia/mediawiki-extensions-MassMessage/compare/contenthandler

So looking at MassMessagehooks.php

$out->addModuleStyles( 'ext.MassMessage.content' );
$out->addModules( 'ext.MassMessage.content.js' );

A module ending in .js just feels icky. That's alright though, as the 2 should be merged, and then we can just have:

$out->addModules( 'ext.MassMessage.content' );


Api Modules:
getPossibleErrors is no more.


Other:
There are usages of "else if" in php code. Don't do that. Use "elseif"
Comment 4 Kunal Mehta (Legoktm) 2014-09-06 00:11:50 UTC
(In reply to Sam Reed (reedy) from comment #3)
> https://github.com/wikimedia/mediawiki-extensions-MassMessage/compare/
> contenthandler
> 
> So looking at MassMessagehooks.php
> 
> $out->addModuleStyles( 'ext.MassMessage.content' );
> $out->addModules( 'ext.MassMessage.content.js' );
> 
> A module ending in .js just feels icky. That's alright though, as the 2
> should be merged, and then we can just have:
> 
> $out->addModules( 'ext.MassMessage.content' );

We have to do that so the CSS styles are still served to users with JS disabled. Modules loaded via addModules require JS. Also there would be a FOUC iirc.
Comment 5 Sam Reed (reedy) 2014-09-06 00:15:51 UTC
SpecialCreateMassMessageList and SpecialEditMassMessageList doesn't return something on all code paths in their onSubmit()

MassMessageHooks.php - Line 192
$revId = ( $next ) ? $next : $revId;

$revId on the right hand side is undefined


ApiEditMassMessageList::getEditSummary() - $title and $count used at the bottom may have not been defined (I note there's quite a few code paths through that block...)


MassMessageListContentHandler::unserializeContent() should have @throws MWContentSerializationException
Comment 6 Kunal Mehta (Legoktm) 2014-09-06 00:24:41 UTC
(In reply to Sam Reed (reedy) from comment #3)
> Api Modules:
> getPossibleErrors is no more.

Id74b59113cf0211e83c25364a94c597cb579b8f0 

> Other:
> There are usages of "else if" in php code. Don't do that. Use "elseif"

I0f637f466b7c41053c9ba0a8d9399292c843104b

(In reply to Sam Reed (reedy) from comment #5)

> MassMessageListContentHandler::unserializeContent() should have @throws
> MWContentSerializationException

I62c73abd5f9e3fd4c2e9358e484101b962cdc6c0
Comment 7 Kunal Mehta (Legoktm) 2014-09-06 00:36:06 UTC
(In reply to Sam Reed (reedy) from comment #5)
> SpecialCreateMassMessageList and SpecialEditMassMessageList doesn't return
> something on all code paths in their onSubmit()

I3a06dd743ff8b18aaba73649cbd53d4db02018ce

> ApiEditMassMessageList::getEditSummary() - $title and $count used at the
> bottom may have not been defined (I note there's quite a few code paths
> through that block...)

AFAIS everything is defined properly, but explicitly done in I3393a7a5531c272cf879bad0da11426714a0e633.
Comment 8 Kunal Mehta (Legoktm) 2014-09-06 00:41:44 UTC
(In reply to Sam Reed (reedy) from comment #5)
> MassMessageHooks.php - Line 192
> $revId = ( $next ) ? $next : $revId;
> 
> $revId on the right hand side is undefined

I think this should be $oldid, but I'm not totally sure...wctaiwan?
Comment 9 wctaiwan 2014-09-06 02:46:24 UTC
(In reply to Kunal Mehta (Legoktm) from comment #8)
> (In reply to Sam Reed (reedy) from comment #5)
> > MassMessageHooks.php - Line 192
> > $revId = ( $next ) ? $next : $revId;
> > 
> > $revId on the right hand side is undefined
> 
> I think this should be $oldid, but I'm not totally sure...wctaiwan?

$oldid is correct; sorry. Changed in I75cb898dcd20db8052688152d55a8f3d63e9e241
Comment 10 wctaiwan 2014-09-06 16:59:01 UTC
I7e01e63717b99fe6937fa8598fdaffe8fdfe4527 closes a couple more loopholes for invalid titles, with thanks to MZMcBride for raising them.
Comment 11 Kunal Mehta (Legoktm) 2014-09-09 22:55:34 UTC
Marking as fixed as mm-ch is now in master.

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


Navigation
Links