Manual talk:RebuildImages.php

About this board

rebuildImages or importImages?

3
Pmarfell (talkcontribs)

I have a new wiki created with pages populated by Special:export/import from an older wiki on the same server/domain, this includes the File: pages. The new wiki $wgUploadPath and $wgUploadDirectory parameters in LocalSettings.php point to the same location as the images for the old wiki but images are not displayed. I was thinking importImages.php might have been the way to go but if I am reading things right running "php /maintenance/rebuildImages.php --missing" from the new wiki install directory will populate the images table where there is a match from the File: page to an image. When I get rid of the old wiki I will be leaving the images location untouched so the new wiki can continue using it.

Pmarfell (talkcontribs)

I have now got the host to run rebuildImages.php on the wiki where the UploadPath contains the images that I want in the wiki that match the File: pages already imported - run with options --missing --dry-run and get 870 lines similar to

mwstore://local-backend/local-public/0/00/EastShelterArch.jpg

This number matches the number of File: pages I imported but what does it mean? The text mwstore does not occur anywhere in rebuildImages.php so I don't know what has caused it to be output. What is /local-backend/local-public/? I can see in the file system that in /wikiimages there is a file /0/00/EastShelterArch.jpg. I can also see that I imported a File: page called File:EastShelterArch.jpg

I will now ask my host to run the script without the --dry-run option.

Pmarfell (talkcontribs)

Running php ./maintenance/rebuildImages.php --missing did what was needed. It created entries in the images table where there was no existing entry to match the imported File: page and the existing image file on the file system. Which in my case was all of them. Images now display in the wiki.

Reply to "rebuildImages or importImages?"

Throttling RebuildImages?

1
2600:8801:DB00:E16:516D:9AF8:7D56:70CC (talkcontribs)

Is there a way to limit what files RebiuldImages works on? I'm interested in using this as a way to process images from the PDFHandler extension in batches rather than in real-time, and I have tens of thousands of PDF files.

Reply to "Throttling RebuildImages?"
Revansx (talkcontribs)

Warning: Missing img_description_text and img_description_data fields in row with MIGRATION_OLD [Called from CommentStore::getCommentInternal in /opt/htdocs/mediawiki/includes/CommentStore.php at line 229] in /opt/htdocs/mediawiki/includes/debug/MWDebug.php on line 309

Reply to "Help with Warnings"

Script results in Exception

1
Octfx (talkcontribs)

After migrating comments using Manual:MigrateComments.php using this script results in the following error/exception: $row does not contain fields needed for comment img_description

Is there anything that can fix this?

MediaWiki: 1.30
PHP: 7.1.2
OS: Debian

Reply to "Script results in Exception"
There are no older topics
Return to "RebuildImages.php" page.