Last modified: 2013-12-30 10:38:37 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 T60439, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58439 - Extra </div> output by CleanChanges if tidy off messes up monobook and creates invalid html
Extra </div> output by CleanChanges if tidy off messes up monobook and create...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
CleanChanges (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
gci2013 https://www.google-melange.co...
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-13 09:04 UTC by Bawolff (Brian Wolff)
Modified: 2013-12-30 10:38 UTC (History)
4 users (show)

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


Attachments

Description Bawolff (Brian Wolff) 2013-12-13 09:04:53 UTC
Makes monobook look ugly. See conversation with nemo in #mediawiki


https://translatewiki.net/w/i.php?title=Special:RecentChanges&limit=1&cleanrc=1&useskin=monobook


Presumably the extra </div> added in endRecentChangesList(). Perhaps that was a work around to a core bug that has since been fixed?
Comment 1 Siebrand Mazeland 2013-12-17 11:40:53 UTC
(In reply to comment #0)
> Presumably the extra </div> added in endRecentChangesList(). Perhaps that
> was a work around to a core bug that has since been fixed?

That div is supposed to close the div that is opened in beginRecentChangesList(), isn't it?
Comment 2 Gerrit Notification Bot 2013-12-26 12:51:55 UTC
Change 103746 had a related patch set uploaded by M4tx:
Fix extra </div> output creating invalid HTML

https://gerrit.wikimedia.org/r/103746
Comment 3 Mateusz Maćkowski 2013-12-26 13:00:57 UTC
After about 2 hours of investigating, I finally, I think, know everything about this bug.

Look at the EnhancedChangesList.php in old MW (dunno which version exactly):

public function endRecentChangesList() {
	return $this->recentChangesBlock() . parent::endRecentChangesList();
}
(FYI: parent::endRecentChangesList() returns '</ul>' or '')

And new one:

public function endRecentChangesList() {
	return $this->recentChangesBlock() . '</div>';
}

What was the problem?

CleanChanges_body.php:

public function endRecentChangesList() {
	return parent::endRecentChangesList() . '</div>';
}

As you probably think already, the function above was really something like:
return $this->recentChangesBlock() . '</div>' . '</div>';

And that caused the problem.
There wasn't such problem in older version of MediaWiki, because ChangesList::endRecentChangesList() returned only '' or '</ul>', so adding '</div>' was necessary. That changed in newer version of MW, which caused an extension to output '</div>' 2 times.

The only matter that I'm thinking about now is that my patch caused the extension be unusable (causing the same problem) in older versions of MediaWiki... Is it a serious problem?

PS. "older version of MediaWiki" means here something between 1.23alpha and current git version. I don't know really; I have a copy of it on my personal server (I think I downloaded it as a zip from official MW website...)
Comment 4 Nemo 2013-12-26 13:07:46 UTC
Right, so it was the very last commit there, https://git.wikimedia.org/blobdiff/mediawiki%2Fcore/48cc8109c80f8e1fd1fc4af565c119911cdb198d/includes%2Fchanges%2FEnhancedChangesList.php . Thanks for the investigation!
Comment 5 Gerrit Notification Bot 2013-12-30 10:28:11 UTC
Change 103746 merged by jenkins-bot:
Remove extra </div> creating invalid HTML

https://gerrit.wikimedia.org/r/103746

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


Navigation
Links