Page MenuHomePhabricator

MwEmbedSupport doesn't work with non standard layouts
Closed, ResolvedPublic

Description

reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/core$ php maintenance/update.php --force --quick
PHP Fatal error: Uncaught exception 'MWException' with message 'MwEmbedResourceManager::register not given readable path: /var/www/wiki/mediawiki/core/extensions/MwEmbedSupport/MwEmbedModules/MwEmbedSupport' in /var/www/wiki/mediawiki/extensions/MwEmbedSupport/MwEmbedResourceManager.php:29
Stack trace:
#0 /var/www/wiki/mediawiki/extensions/MwEmbedSupport/MwEmbedSupport.php(56): MwEmbedResourceManager::register('extensions/MwEm...')
#1 /var/www/wiki/mediawiki/core/LocalSettings.php(381): require('/var/www/wiki/m...')
#2 /var/www/wiki/mediawiki/core/maintenance/doMaintenance.php(88): require('/var/www/wiki/m...')
#3 /var/www/wiki/mediawiki/core/maintenance/update.php(193): require_once('/var/www/wiki/m...')
#4 {main}

thrown in /var/www/wiki/mediawiki/extensions/MwEmbedSupport/MwEmbedResourceManager.php on line 29

Fatal error: Uncaught exception 'MWException' with message 'MwEmbedResourceManager::register not given readable path: /var/www/wiki/mediawiki/core/extensions/MwEmbedSupport/MwEmbedModules/MwEmbedSupport' in /var/www/wiki/mediawiki/extensions/MwEmbedSupport/MwEmbedResourceManager.php:29
Stack trace:
#0 /var/www/wiki/mediawiki/extensions/MwEmbedSupport/MwEmbedSupport.php(56): MwEmbedResourceManager::register('extensions/MwEm...')
#1 /var/www/wiki/mediawiki/core/LocalSettings.php(381): require('/var/www/wiki/m...')
#2 /var/www/wiki/mediawiki/core/maintenance/doMaintenance.php(88): require('/var/www/wiki/m...')
#3 /var/www/wiki/mediawiki/core/maintenance/update.php(193): require_once('/var/www/wiki/m...')
#4 {main}

thrown in /var/www/wiki/mediawiki/extensions/MwEmbedSupport/MwEmbedResourceManager.php on line 29

// Register the core MwEmbed Support Module:
MwEmbedResourceManager::register( 'extensions/MwEmbedSupport/MwEmbedModules/MwEmbedSupport' );

// Register the MwEmbed 'mediaWiki' Module:
MwEmbedResourceManager::register( 'extensions/MwEmbedSupport/MwEmbedModules/MediaWikiSupport' );

My extensions are in /var/www/wiki/mediawiki/extensionsgit/


Version: master
Severity: normal

Details

Reference
bz45918

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:31 AM
bzimport set Reference to bz45918.
bzimport added a subscriber: Unknown Object (MLST).
Reedy created this task.Mar 9 2013, 12:34 AM
Reedy added a comment.Mar 9 2013, 12:47 AM

(In reply to comment #1)

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

Abandoned, nowhere near sufficient

Reedy added a comment.Mar 9 2013, 3:55 AM

And TMH would also need updating

Just spoke to Jan about this. It's a path configuration on the local setup that shouldn't be a problem in production.

/me also just encountered this issue

Although not a "real" issue, it makes testing a bit more difficult. Could also make it harder for third parties to use the extension.

Related URL: https://gerrit.wikimedia.org/r/69479 (Gerrit Change I8ed60acf438fc895fe7153746833b4e9f4b04fec)

Related URL: https://gerrit.wikimedia.org/r/69480 (Gerrit Change Iadfcc104b88de0b2f6745175a38f39a9a1f58a3a)

Gerrit change 69480 Might be causing bug 50264 : load.php reports an invalid reference on the beta cluster.

I am not sure what is wrong with the code, but it definitely has some issues on beta. Copy pasting some exceptions reported on bug 50264:

2013-06-27 09:18:04 deployment-apache32 simplewiki: [64857835] /wiki/Talk:Main_Page/Archive7 Exception from line 29 of /data/project/apache/common-local/php-master/extensions/MwEmbedSupport/MwEmbedResourceManager.php: MwEmbedResourceManager::register not given readable path: /usr/local/apache/common-local/php-master//data/project/apache/common-local/php-master/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer

2013-06-26 22:39:51 deployment-jobrunner08 aawiki: [ff75b05a] [no req]
Exception from line 32 of
/data/project/apache/common-local/php-master/extensions/MwEmbedSupport/MwEmbedResourceManager.php:
MwEmbedResourceManager::register not given readable path:
extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer

exception 'MWException' with message
'ResourceLoaderFileModule::readScriptFiles: script file not found:
"/usr/local/apache/common-local/php-master/er/extensions/MwEmbedSupport/MwEmbedModules/MediaWikiSupport/MediaWikiSupport.loader.js"'
in
/data/project/apache/common-local/php-master/includes/resourceloader/ResourceLoaderFileModule.php:574

jgerber wrote:

ok looks like dirname(FILE) is not inside $IP have to look at this again to see if there is a way to find the relative path given the symlink jungle in use.

hashar removed a subscriber: hashar.May 13 2015, 2:55 PM
Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 6:39 PM
Restricted Application added subscribers: Matanya, Aklapper. · View Herald TranscriptSep 4 2015, 6:39 PM
TheDJ added a subscriber: TheDJ.Oct 25 2015, 2:48 PM

Does anyone know if this is still a problem ?

Change 343109 had a related patch set uploaded (by Krinkle):
[mediawiki/extensions/MwEmbedSupport] cleanup: Simplify register() logic

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

Change 343109 abandoned by Krinkle:
cleanup: Simplify register() logic

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

Does anyone know if this is still a problem ?

It's a fundamental issue with having MwEmbedSupport in its own extension rather than inside TMH, so as an alternative I've started work on T164037.

brion moved this task from To sort to Player-Old on the TimedMediaHandler board.Apr 23 2018, 11:02 PM