Jump to content

Topic on Extension talk:Sync

Summary by Toto987

composer require "nischayn22/mediawiki-api:dev-master"

Toto987 (talkcontribs)

Hi Nischayn22,

thank you for your extension. However i face a installtion problem.

I don't understand where the composer.local.json's "require" section is located and where exactly I have to paste your code.

In the moment I installed all the way till the end except for the *.json. In this configuration I get following error.

Error from line 16 of /var/www/mediawiki/extensions/Sync/Sync.hooks.php: Class 'Nischayn22\MediaWikiApi' not found

Thank You for your support

Nischayn22 (talkcontribs)

Hi, in your main directory run: composer require "nischayn22/mediawiki-api"

Hopefully that should work.

Toto987 (talkcontribs)

Hi,

thank you for this suggestion, however it is still same. After I hit publish changes I still get the following error.

[f143961b9df50bcb247da6af] /mediawiki/index.php?title=page&action=submit Error from line 16 of /var/www/mediawiki/extensions/Sync/Sync.hooks.php: Class 'Nischayn22\MediaWikiApi' not found

Backtrace:

#0 /var/www/mediawiki/includes/Hooks.php(177): SyncHooks::onPageContentSaveComplete(WikiPage, User, string, string, integer, NULL, NULL, integer, Revision, Status, boolean, integer)

#1 /var/www/mediawiki/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)

#2 /var/www/mediawiki/includes/page/WikiPage.php(1853): Hooks::run(string, array)

#3 [internal function]: WikiPage->{closure}(Wikimedia\Rdbms\DatabaseMysqli, string)

#4 /var/www/mediawiki/includes/libs/rdbms/database/Database.php(3664): call_user_func_array(Closure, array)

#5 /var/www/mediawiki/includes/deferred/AtomicSectionUpdate.php(35): Wikimedia\Rdbms\Database->doAtomicSection(string, Closure)

#6 /var/www/mediawiki/includes/deferred/DeferredUpdates.php(259): AtomicSectionUpdate->doUpdate()

#7 /var/www/mediawiki/includes/deferred/DeferredUpdates.php(210): DeferredUpdates::runUpdate(AtomicSectionUpdate, Wikimedia\Rdbms\LBFactorySimple, string, integer)

#8 /var/www/mediawiki/includes/deferred/DeferredUpdates.php(127): DeferredUpdates::execute(array, string, integer)

#9 /var/www/mediawiki/includes/MediaWiki.php(606): DeferredUpdates::doUpdates(string, integer)

#10 /var/www/mediawiki/includes/MediaWiki.php(575): MediaWiki::preOutputCommit(RequestContext, Closure)

#11 /var/www/mediawiki/includes/MediaWiki.php(877): MediaWiki->doPreOutputCommit(Closure)

#12 /var/www/mediawiki/includes/MediaWiki.php(524): MediaWiki->main()

#13 /var/www/mediawiki/index.php(42): MediaWiki->run()

#14 {main}

Nischayn22 (talkcontribs)

Are you sure you installed it in the main directory?

Toto987 (talkcontribs)

In the meantime the update.php script had an issue with the composer.json file.

It made me change the version of "nischayn22/mediawiki-api": "^1.0" to "1.0".

After this it reported no error.

The error above is still there.

Nischayn22 (talkcontribs)

Was able to solve the problem, you need to run this command instead:

composer require "nischayn22/mediawiki-api:dev-master"

Toto987 (talkcontribs)

Thank You, now it works. Although it works not with VisualEditor.

Thanks a lot.