Topic on Extension talk:EmbedVideo

seems to be fixed: Deprecated: Premature access to service container

7
RobFantini (talkcontribs)

thanks to the suggestions below we have EmbedVideo working on MW version 1.3.1

Deprecated: Premature access to service container [Called from EmbedVideoHooks::onExtension in /var/www/mediawiki-1.36.1/extensions/EmbedVideo/EmbedVideo.hooks.php at line 77] in /var/www/mediawiki-1.36.1/includes/debug/MWDebug.php on line 376

seems to be fixed [ we need to bang it more ] :

git clone https://github.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo.git

mv mediawiki-extensions-EmbedVideo/ EmbedVideo

cd EmbedVideo

git submodule update --init

Аргскригициониец (talkcontribs)

Alas, it's not fixed, have the same problem on MediaWiki 1.37.

Pspviwki (talkcontribs)

Just tested on 1.37.1 did git clone https://github.com/StarCitizenWiki/mediawiki-extensions-EmbedVideo.git

The result:

[Sat Jan 08 22:03:11.725945 2022] [php7:info] [pid ] [client ] PHP Deprecated: Premature access to service container [Called from EmbedVideoHooks::onExtension in ...mediawiki/extensions/EmbedVideo/EmbedVideo.hooks.php at line 77] in ...mediawiki/includes/debug/MWDebug.php on line 375, referer: wiki/Special:SpecialPages

The git still seems to contain version from 2020-10-15 13.18. Let me know if you need more info.

Pspviwki (talkcontribs)

My mistake, tested the wrong archive, the latest one from the git from 2022-01-08 does not produce the PHP Deprecated message under 1.37.1. Sorry and thanks.

RobFantini (talkcontribs)

yea it also works here on 1.37.1 .


also i did not do these 2 lines last install , they are probably not necessary. by chance did you install with out these? if so I'll edit top post.


cd EmbedVideo

git submodule update --init

Pspviwki (talkcontribs)

No need to update the top post. Luck just had it I upgraded from 1.29-2 to 1.37.1 two days ago and downloaded extension version just before the fix. When I tested the fix I uploaded again the old version to production by mistake. People usually put the right files to the right places on second attempt.

RobFantini (talkcontribs)

I ran in to this error when upgrading from 1.37 to 1.39

the issue was solved by:

mv mediawiki/extensions/EmbedVideo/EmbedVideo.hooks.php mediawiki/extensions/EmbedVideo/EmbedVideo.hooks.php.ori

made a new mediawiki/extensions/EmbedVideo/EmbedVideo.hooks.php using https://gitlab.com/jmnote/EmbedVideo/-/blob/master/EmbedVideo.hooks.php

Reply to "seems to be fixed: Deprecated: Premature access to service container"