Topic on Extension talk:PageImages

Manually trigger LinksUpdate on all Aritcles

5
Mojoaxel (talkcontribs)

The Extension works fine and I'm very happy with it. The question now is how to trigger the Plugin on all Articles. At the moment only images are shown after I changes an Article.

Is there a way to trigger LinksUpdate on all Articles manually?

Varlin (talkcontribs)

+1. It would be a basic feature...

46.164.5.51 (talkcontribs)

Hey, it is possible to do it manually. I am currently having MediaWiki 1.31.

To manually trigger this for all articles you have to start the initImageData.php in extensions/PageImages/maintenance/ folder. I do not have shell/ssh support on my provider, so I had to use MaintenanceShell extension and change the $wgMaintenanceShellPath to the mentioned path.

It looks like there is also some problem (at least on my server) with the script and I couldnt get it work properly. After some debugging I saw that I had to change LinksUpdateHookHandler.php (in PageImages/includes/) the following:

$rev = $linksUpdate->getRevision();

with:

$rev = Revision::newFromTitle($linksUpdate->getTitle());

And I managed to get all images on preview (using the Popups/PagePreviews extension)

Hope it helps someone

Pastakhov (talkcontribs)

thanks

80.152.229.133 (talkcontribs)

Just running initImageData.php over shell did the job. THANK YOU!

Reply to "Manually trigger LinksUpdate on all Aritcles"