r72349 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72348‎ | r72349 | r72350 >
Date:04:00, 4 September 2010
Author:catrope
Status:resolved (Comments)
Tags:
Comment:
Merging resourceloader branch into trunk. Full documentation is at http://www.mediawiki.org/wiki/ResourceLoader and a general overview has been posted on wikitech-li <http://lists.wikimedia.org/pipermail/wikitech-l/2010-September/049253.html&gt;. One important change is that all JS is now loaded at the bottom, so any scripts assuming things from wikibits or whatever are present will fail.
Modified paths:
  • /trunk/phase3/includes/AutoLoader.php (modified) (history)
  • /trunk/phase3/includes/CSSJanus.php (added) (history)
  • /trunk/phase3/includes/CSSMin.php (added) (history)
  • /trunk/phase3/includes/ChangesList.php (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/includes/HTMLForm.php (modified) (history)
  • /trunk/phase3/includes/HistoryPage.php (modified) (history)
  • /trunk/phase3/includes/ImagePage.php (modified) (history)
  • /trunk/phase3/includes/JSMin.php (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/includes/LocalisationCache.php (modified) (history)
  • /trunk/phase3/includes/MessageBlobStore.php (added) (history)
  • /trunk/phase3/includes/MessageCache.php (modified) (history)
  • /trunk/phase3/includes/OutputPage.php (modified) (history)
  • /trunk/phase3/includes/ProtectionForm.php (modified) (history)
  • /trunk/phase3/includes/RawPage.php (modified) (history)
  • /trunk/phase3/includes/ResourceLoader.php (added) (history)
  • /trunk/phase3/includes/ResourceLoaderContext.php (added) (history)
  • /trunk/phase3/includes/ResourceLoaderModule.php (added) (history)
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)
  • /trunk/phase3/includes/WebStart.php (modified) (history)
  • /trunk/phase3/includes/diff/DifferenceInterface.php (modified) (history)
  • /trunk/phase3/includes/installer/MysqlUpdater.php (modified) (history)
  • /trunk/phase3/includes/installer/SqliteUpdater.php (modified) (history)
  • /trunk/phase3/includes/parser/ParserOutput.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialBlockip.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialPreferences.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialSearch.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUpload.php (modified) (history)
  • /trunk/phase3/load.php (added) (history)
  • /trunk/phase3/maintenance/archives/patch-module_deps.sql (added) (history)
  • /trunk/phase3/maintenance/archives/patch-msg_resource.sql (added) (history)
  • /trunk/phase3/maintenance/tables.sql (modified) (history)
  • /trunk/phase3/maintenance/tests/ResourceLoaderFileModuleTest.php (added) (history)
  • /trunk/phase3/maintenance/tests/ResourceLoaderTest.php (added) (history)
  • /trunk/phase3/resources (added) (history)
  • /trunk/phase3/resources/Resources.php (modified) (history)
  • /trunk/phase3/resources/jquery.effects (added) (history)
  • /trunk/phase3/resources/jquery.ui (added) (history)
  • /trunk/phase3/resources/jquery/jquery.async.js (added) (history)
  • /trunk/phase3/resources/jquery/jquery.autoEllipsis.js (added) (history)
  • /trunk/phase3/resources/jquery/jquery.browser.js (added) (history)
  • /trunk/phase3/resources/jquery/jquery.collapsibleTabs.js (added) (history)
  • /trunk/phase3/resources/jquery/jquery.color.js (added) (history)
  • /trunk/phase3/resources/jquery/jquery.cookie.js (added) (history)
  • /trunk/phase3/resources/jquery/jquery.delayedBind.js (added) (history)
  • /trunk/phase3/resources/jquery/jquery.expandableField.js (added) (history)
  • /trunk/phase3/resources/jquery/jquery.highlightText.js (added) (history)
  • /trunk/phase3/resources/jquery/jquery.js (added) (history)
  • /trunk/phase3/resources/jquery/jquery.suggestions.css (added) (history)
  • /trunk/phase3/resources/jquery/jquery.suggestions.js (added) (history)
  • /trunk/phase3/resources/jquery/jquery.textSelection.js (added) (history)
  • /trunk/phase3/resources/mediawiki (added) (history)
  • /trunk/phase3/resources/mediawiki.util (added) (history)
  • /trunk/phase3/resources/mediawiki.views (added) (history)
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)
  • /trunk/phase3/resources/startup.js (added) (history)
  • /trunk/phase3/skins/Vector.php (modified) (history)
  • /trunk/phase3/skins/common/IEFixes.js (modified) (history)
  • /trunk/phase3/skins/common/ajax.js (modified) (history)
  • /trunk/phase3/skins/common/ajaxwatch.js (modified) (history)
  • /trunk/phase3/skins/common/block.js (modified) (history)
  • /trunk/phase3/skins/common/changepassword.js (modified) (history)
  • /trunk/phase3/skins/common/edit.js (modified) (history)
  • /trunk/phase3/skins/common/enhancedchanges.js (modified) (history)
  • /trunk/phase3/skins/common/history.js (modified) (history)
  • /trunk/phase3/skins/common/htmlform.js (modified) (history)
  • /trunk/phase3/skins/common/jquery-1.3.2.js (deleted) (history)
  • /trunk/phase3/skins/common/jquery-1.3.2.min.js (deleted) (history)
  • /trunk/phase3/skins/common/jquery-1.4.2.js (deleted) (history)
  • /trunk/phase3/skins/common/jquery-1.4.2.min.js (deleted) (history)
  • /trunk/phase3/skins/common/jquery.min.js (deleted) (history)
  • /trunk/phase3/skins/common/metadata.js (modified) (history)
  • /trunk/phase3/skins/common/mwsuggest.js (modified) (history)
  • /trunk/phase3/skins/common/password.js (modified) (history)
  • /trunk/phase3/skins/common/prefs.js (modified) (history)
  • /trunk/phase3/skins/common/preview.js (modified) (history)
  • /trunk/phase3/skins/common/protect.js (modified) (history)
  • /trunk/phase3/skins/common/rightclickedit.js (modified) (history)
  • /trunk/phase3/skins/common/search.js (modified) (history)
  • /trunk/phase3/skins/common/upload.js (modified) (history)
  • /trunk/phase3/skins/common/wikibits.js (modified) (history)
  • /trunk/phase3/skins/vector/main-ltr.css (modified) (history)
  • /trunk/phase3/skins/vector/main-rtl.css (modified) (history)

Follow-up revisions

RevisionCommit summaryAuthorDate
r72350Followup to r72349, PG tables + updateroverlordq04:10, 4 September 2010
r72351Followup to r72349, PG table def + updater for module_depsoverlordq04:14, 4 September 2010
r72355Fixed server path being built wrongly, appending load.php. This was masked by...tparscal06:25, 4 September 2010
r72357Followup to r72349: fix database error caused by update.php indirectly (via L...tparscal07:54, 4 September 2010
r72372Stylize files added in r72349siebrand12:53, 4 September 2010
r72373Follow-up r72349....platonides13:27, 4 September 2010
r72391load.php5 support for r72349maxsem19:54, 4 September 2010
r72397Fix parsertests after r72349.platonides21:44, 4 September 2010
r72564Follow-up r72349. The new makeResourceLoaderLink() doesn't need $wgScriptPath....platonides22:55, 7 September 2010
r72808Fix warning from r72349, $script is no longer used.nikerabbit14:26, 11 September 2010
r73296getHeadLinks() requires a skin parameter (added in r72349 for makeResourceLoa...robin17:18, 18 September 2010
r75253Per r72349 CR, bring gen=js behavior back, at least for now. It'd be nasty to...catrope15:42, 23 October 2010
r77908(bug 26130) Revert changes to WebStart.php in r72349, which turn out to have ...catrope20:57, 6 December 2010
r79641Removing Makefile from /skins/common (only used for minifiying jquery, which ...krinkle12:21, 5 January 2011

Comments

#Comment by Raymond (talk | contribs)   06:02, 4 September 2010

After svn up of my local testwiki I am unable to run maintenance/update.php:

D:\F_Programmierung\xampp\htdocs\wiki_neu\maintenance>php update.php
A database error has occurred
Query: DELETE FROM `msg_resource`
Function: MessageBlobStore::clear
Error: 1146 Table 'wikidb_neu.msg_resource' doesn't exist (localhost)
#Comment by Raymond (talk | contribs)   08:05, 4 September 2010

Fixed with r72357 by Trevor. Thanks.

#Comment by Raymond (talk | contribs)   08:08, 4 September 2010

Running a local wiki with $wgDefaultSkin = 'vector'; shows pages w/o any CSS.

$wgDefaultSkin = 'monobook'; looks good.

#Comment by Trevor Parscal (WMF) (talk | contribs)   08:14, 4 September 2010

It could be that there are errors or warnings in the CSS being output by load.php . Could you check the CSS output or the logs or something to figure out what errors/warnings you may be getting?

#Comment by Raymond (talk | contribs)   08:44, 4 September 2010

From Firefox error console (translated from German):

Warning: Unclosed string '"?2009-09-08T19:28:20Z) center ....' found. Error at execution for the value of 'background'. Declaration ignored. Source file: http://localhost/wiki_neu/load.php?modules=mediawiki.legacy.shared%7Cmediawiki.legacy.commonPrint%7Cvector&lang=de&debug=&skin=vector&only=styles Zeile: 2


Warning: Exunpexted EOF during search for } . Quelldatei: http://localhost/wiki_neu/load.php?modules=mediawiki.legacy.shared%7Cmediawiki.legacy.commonPrint%7Cvector&lang=de&debug=&skin=vector&only=styles Zeile: 2

#Comment by Trevor Parscal (WMF) (talk | contribs)   08:46, 4 September 2010

Could you pastebin the content at that URL somewhere?

#Comment by Raymond (talk | contribs)   08:49, 4 September 2010
#Comment by Trevor Parscal (WMF) (talk | contribs)   08:57, 4 September 2010

The culprit seems to be this:

background-image:url(data:;base64,iVBORw0K

Normally that would say something like data:image/png;base64, but it looks like PHP was unable to determine the MIME type of the file (are you running this on Windows by any chance?) and just used an empty string for the MIME type. That's a bug, thanks for reporting it.

#Comment by Raymond (talk | contribs)   17:48, 4 September 2010

(are you running this on Windows by any chance?)

Yes. Windows 7, Firefox 3.6.9

#Comment by Platonides (talk | contribs)   13:16, 4 September 2010
  1. ChangesList.php beginRecentChangesList() now returns an unused $script variable.
  2. CSSJanus / CSSMin should go into lib
  3. Non page-specific pieces of mediaWiki.config should go into load.php (skin, stylepath, wgUrlProtocols, wgArticlePath, wgScriptPath, wgScriptExtension, wgScript, wgVariantArticlePath, wgActionPaths, wgServer, wgUserName, wgUserGroups, wgUserLanguage, wgContentLanguage, wgBreakFrames, wgVersion, wgEnableAPI, wgEnableWriteAPI, wgSeparatorTransformTable, wgDigitTransformTable, wgMainPageTitle, wgFormattedNamespaces,wgSiteName)
  4. Unused $wgContLang added to MessageCache::figureMessage
  5. Wouldn't the removal of gen=js to RawPage.php mean that people getting an old page with gen=js scripts in it is exposed -given a poor browser not caring about the mime- to javascript-like code stored in - ? We should detect it to not return the page.
  6. ajaxwatch.js window.wgAjaxWatch could be removed.
  7. Wouldn't be preferable to have /* @embed */ comments in the same line as the background-image?
  8. MessageBlobStore::insertMessageBlob selects the message blob from the database after it has generated it. Moreover, using an unitialised variable $dbr so that would be a fatal.
#Comment by Trevor Parscal (WMF) (talk | contribs)   16:23, 4 September 2010

Gerenally good points, but #7 - no, that's not really the convention, but it also would still work just fine so it's kind of a moot point. The detection doesn't care about lines at all.

#Comment by Platonides (talk | contribs)   13:25, 4 September 2010

9. WebInstallerOutput needs to be put up to date (eg. it will no longer be able to load jQuery).

#Comment by Bryan (talk | contribs)   19:36, 4 September 2010

There is not load.php5. Also RELEASE-NOTES need updating.

#Comment by MaxSem (talk | contribs)   19:55, 4 September 2010

.php5 issue resolved in r72391.

#Comment by 😂 (talk | contribs)   19:43, 7 September 2010

Adding scaptrap until everything gets sorted. Has broken FlaggedRevs. Probably other WMF-used extensions as well. :)

#Comment by Platonides (talk | contribs)   23:07, 7 September 2010

I hope nobody tries to live merge the resource loader.

#Comment by Aaron Schulz (talk | contribs)   05:31, 8 September 2010

Vector CSS is broken on my testwiki (mediawiki.legacy.shared), giving "Found unclosed string "?2009-08-06...<whole file>" and "Unexpected end of file while searching for closing } of declaration block."

#Comment by Aaron Schulz (talk | contribs)   05:31, 8 September 2010

Vector CSS is broken on my testwiki (mediawiki.legacy.shared), giving "Found unclosed string "?2009-08-06...<whole file>" and "Unexpected end of file while searching for closing } of declaration block."

#Comment by Aaron Schulz (talk | contribs)   05:32, 8 September 2010
  • sigh*...double post. It white-screened the first time, didn't think it went through.
#Comment by Aaron Schulz (talk | contribs)   23:32, 8 September 2010

Looking at the CSS I have "...a.feedlink{background:url(skins/common/images/feed-icon.png"?2009-08-06T03:03:20Z) center left...", which is where the problem seems to be.

#Comment by Trevor Parscal (WMF) (talk | contribs)   23:31, 24 September 2010

Is this still an issue? I may need more information to reproduce.

#Comment by Aaron Schulz (talk | contribs)   23:49, 24 September 2010

I think it's gone.

#Comment by Catrope (talk | contribs)   16:10, 23 October 2010

All issues mentioned here have been fixed, resetting to new.

#Comment by 😂 (talk | contribs)   01:44, 7 January 2011

Marking resolved. All the issues with the initial merge have been pretty much ironed out by now. Issues with commits to RL should go with those commits, outright bugs in BZ at this point.

#Comment by Nikerabbit (talk | contribs)   10:03, 19 March 2011

The added direction:ltr in vector/main-ltr.css overrides direction set in PHP r60786.

#Comment by Nikerabbit (talk | contribs)   07:58, 16 April 2011

I don't see this one being resolved yet.

#Comment by 😂 (talk | contribs)   13:40, 16 April 2011

Then open bugs, we don't need to leave this merge marked as fixme .

#Comment by Nikerabbit (talk | contribs)   13:54, 16 April 2011

Bug 28572 has been added to the database.

Status & tagging log