⚓ T399450 rebuildImages.php: Return value error
Page Menu
Phabricator
Create Task
Maniphest
T399450
rebuildImages.php: Return value error
Closed, Resolved
Public
BUG REPORT
Actions
Edit Task
Edit Related Tasks...
Create Subtask
Edit Parent Tasks
Edit Subtasks
Merge Duplicates In
Close As Duplicate
Edit Related Objects...
Edit Commits
Edit Mocks
Mute Notifications
Protect as security issue
Assigned To
Umherirrender
Authored By
Kizule
Jul 14 2025, 10:37 AM
2025-07-14 10:37:48 (UTC+0)
Tags
MediaWiki-Maintenance-system
(Backlog)
Regression
MW-1.44-release
(Blocker)
MediaWiki-File-management
(Backlog)
Commons
(Incoming)
MW-1.45-notes (1.45.0-wmf.11; 2025-07-22)
MW-1.44-notes
Referenced Files
None
Subscribers
A_smart_kitten
Aklapper
Kizule
Umherirrender
Wikinaut
Description
Steps to replicate the issue
(include links if applicable):
Install Mediawiki 1.44.0
Import some images
Run
php maintenance/rebuildImages.php
What happens?
This error:
[kizule@contabo temp.kizule.xyz]$ php maintenance/rebuildImages.php
*******************************************************************************
NOTE: Do not run maintenance scripts directly, use maintenance/run.php instead!
Running scripts directly has been deprecated in MediaWiki 1.40.
It may not work for some (or any) scripts in the future.
*******************************************************************************
Processing image...
[9f8bce93dc40ee20fdd63293] [no req] TypeError: ImageBuilder::imageCallback(): Return value must be of type bool, null returned
Backtrace:
from /home/kizule/public_html/temp.kizule.xyz/maintenance/rebuildImages.php(190)
#0 /home/kizule/public_html/temp.kizule.xyz/maintenance/rebuildImages.php(170): ImageBuilder->imageCallback(stdClass)
#1 /home/kizule/public_html/temp.kizule.xyz/maintenance/rebuildImages.php(182): ImageBuilder->buildTable(string, MediaWiki\FileRepo\File\FileSelectQueryBuilder, array)
#2 /home/kizule/public_html/temp.kizule.xyz/maintenance/rebuildImages.php(116): ImageBuilder->buildImage()
#3 /home/kizule/public_html/temp.kizule.xyz/maintenance/rebuildImages.php(96): ImageBuilder->build()
#4 /home/kizule/public_html/temp.kizule.xyz/maintenance/includes/MaintenanceRunner.php(694): ImageBuilder->execute()
#5 /home/kizule/public_html/temp.kizule.xyz/maintenance/doMaintenance.php(100): MediaWiki\Maintenance\MaintenanceRunner->run()
#6 /home/kizule/public_html/temp.kizule.xyz/maintenance/rebuildImages.php(276): require_once(string)
#7 {main}
[kizule@contabo temp.kizule.xyz]$
What should have happened instead?
No error, so this or similar output:
[kizule@contabo temp.kizule.xyz]$ php maintenance/rebuildImages.php
*******************************************************************************
NOTE: Do not run maintenance scripts directly, use maintenance/run.php instead!
Running scripts directly has been deprecated in MediaWiki 1.40.
It may not work for some (or any) scripts in the future.
*******************************************************************************
Processing image...
Finished image... 0 of 30 rows updated
Processing oldimage...
Finished oldimage... 0 of 0 rows updated
[kizule@contabo temp.kizule.xyz]$
Software version
(on
Special:Version
page; skip for WMF-hosted wikis like Wikipedia):
MediaWiki: 1.44.0
PHP: 8.2.26
Other information
(browser name/version, screenshots, etc.):
Details
Related Changes in Gerrit:
Subject
Repo
Branch
Lines +/-
rebuildImages.php: Update imageCallback return type
mediawiki/core
master
+1
-1
file: Init LocalFile::$upgraded with false
mediawiki/core
REL1_44
+1
-1
file: Init LocalFile::$upgraded with false
mediawiki/core
master
+1
-1
Customize query in gerrit
Event Timeline
Kizule
created this task.
Jul 14 2025, 10:37 AM
2025-07-14 10:37:48 (UTC+0)
Restricted Application
added a subscriber:
Aklapper
View Herald Transcript
Jul 14 2025, 10:37 AM
2025-07-14 10:37:49 (UTC+0)
gerritbot
added a comment.
Jul 14 2025, 10:39 AM
2025-07-14 10:39:15 (UTC+0)
Comment Actions
Change #1169076 had a related patch set uploaded (by Zoranzoki21; author: Zoranzoki21):
[mediawiki/core@master] rebuildImages.php: Update imageCallback return type
gerritbot
added a project:
Patch-For-Review
Jul 14 2025, 10:39 AM
2025-07-14 10:39:16 (UTC+0)
Kizule
added a comment.
Jul 14 2025, 10:39 AM
2025-07-14 10:39:57 (UTC+0)
Comment Actions
In
T399450#10999746
@gerritbot
wrote:
Change #1169076 had a related patch set uploaded (by Zoranzoki21; author: Zoranzoki21):
[mediawiki/core@master] rebuildImages.php: Update imageCallback return type
This fixes the error.
A_smart_kitten
added subscribers:
Umherirrender
A_smart_kitten
Jul 14 2025, 11:43 AM
2025-07-14 11:43:22 (UTC+0)
Comment Actions
Possibly a regression from
? /cc
@Umherirrender
Umherirrender
added a comment.
Jul 14 2025, 6:50 PM
2025-07-14 18:50:23 (UTC+0)
Comment Actions
In
T399450#10999969
@A_smart_kitten
wrote:
Possibly a regression from
? /cc
@Umherirrender
The return type is correct when looking at the documented return type of
LocalFIle::getUpgraded
, but that function returns null instead of false. Init
LocalFile::$upgraded
with false can do the same job.
Umherirrender
edited projects, added
Regression
; removed
PHP 8.2 support
Jul 14 2025, 6:50 PM
2025-07-14 18:50:52 (UTC+0)
A_smart_kitten
added projects:
MW-1.44-release
MediaWiki-File-management
Jul 14 2025, 7:00 PM
2025-07-14 19:00:25 (UTC+0)
Maintenance_bot
added a project:
Commons
Jul 14 2025, 7:31 PM
2025-07-14 19:31:32 (UTC+0)
gerritbot
added a comment.
Jul 17 2025, 7:15 PM
2025-07-17 19:15:40 (UTC+0)
Comment Actions
Change #1170409 had a related patch set uploaded (by Umherirrender; author: Umherirrender):
[mediawiki/core@master] file: Init LocalFile::$upgraded with false
Kizule
added a comment.
Jul 17 2025, 7:18 PM
2025-07-17 19:18:57 (UTC+0)
Comment Actions
In
T399450#11001915
@Umherirrender
wrote:
In
T399450#10999969
@A_smart_kitten
wrote:
Possibly a regression from
? /cc
@Umherirrender
The return type is correct when looking at the documented return type of
LocalFIle::getUpgraded
, but that function returns null instead of false. Init
LocalFile::$upgraded
with false can do the same job.
Thanks! Should I abandon my patch then?
gerritbot
added a comment.
Jul 18 2025, 10:04 AM
2025-07-18 10:04:13 (UTC+0)
Comment Actions
Change #1170409
merged
by jenkins-bot:
[mediawiki/core@master] file: Init LocalFile::$upgraded with false
ReleaseTaggerBot
added a project:
MW-1.45-notes (1.45.0-wmf.11; 2025-07-22)
Jul 18 2025, 11:00 AM
2025-07-18 11:00:17 (UTC+0)
gerritbot
added a comment.
Jul 18 2025, 5:29 PM
2025-07-18 17:29:21 (UTC+0)
Comment Actions
Change #1170589 had a related patch set uploaded (by Umherirrender; author: Umherirrender):
[mediawiki/core@REL1_44] file: Init LocalFile::$upgraded with false
Umherirrender
closed this task as
Resolved
Jul 18 2025, 5:33 PM
2025-07-18 17:33:24 (UTC+0)
Umherirrender
claimed this task.
Comment Actions
In
T399450#11014972
@Kizule
wrote:
In
T399450#11001915
@Umherirrender
wrote:
In
T399450#10999969
@A_smart_kitten
wrote:
Possibly a regression from
? /cc
@Umherirrender
The return type is correct when looking at the documented return type of
LocalFIle::getUpgraded
, but that function returns null instead of false. Init
LocalFile::$upgraded
with false can do the same job.
Thanks! Should I abandon my patch then?
The patch set is no longer needed, as the other should fix the issue. It should be abandoned.
gerritbot
added a comment.
Jul 18 2025, 5:50 PM
2025-07-18 17:50:19 (UTC+0)
Comment Actions
Change #1170589
merged
by jenkins-bot:
[mediawiki/core@REL1_44] file: Init LocalFile::$upgraded with false
ReleaseTaggerBot
added a project:
MW-1.44-notes
Jul 18 2025, 6:01 PM
2025-07-18 18:01:03 (UTC+0)
gerritbot
added a comment.
Jul 19 2025, 3:31 AM
2025-07-19 03:31:25 (UTC+0)
Comment Actions
Change #1169076
abandoned
by Zoranzoki21:
[mediawiki/core@master] rebuildImages.php: Update imageCallback return type
Reason:
Per Umherirrender's comment in the task
Maintenance_bot
removed a project:
Patch-For-Review
Jul 19 2025, 4:31 AM
2025-07-19 04:31:04 (UTC+0)
Wikinaut
subscribed.
Oct 2 2025, 10:38 AM
2025-10-02 10:38:21 (UTC+0)
Comment Actions
See also
Same problem happened to me. How to fix it quickly?
Wikinaut
added a comment.
Edited
Oct 2 2025, 3:54 PM
2025-10-02 15:54:47 (UTC+0)
Comment Actions
in
the second "?", see comment by Umherirrender, appears to be needed as well.
This is without the second "?", i.e patch of
only:
php maintenance/run.php rebuildImages --wiki sailwiki
Processing image...
2025-10-02 15:40:22: 49.26% done on image; ETA 2025-10-02 15:40:22 [100/203] 1525.27/sec <0.00% updated>
Finished image... 0 of 148 rows updated
Processing oldimage...
[e44b487fd6cd0d500f815795] [no req] TypeError: ImageBuilder::oldimageCallback(): Return value must be of type bool, null returned
Backtrace:
from /srv/wikis/mediawiki-common/maintenance/rebuildImages.php(208)
#0 /srv/wikis/mediawiki-common/maintenance/rebuildImages.php(170): ImageBuilder->oldimageCallback()
#1 /srv/wikis/mediawiki-common/maintenance/rebuildImages.php(194): ImageBuilder->buildTable()
#2 /srv/wikis/mediawiki-common/maintenance/rebuildImages.php(117): ImageBuilder->buildOldImage()
#3 /srv/wikis/mediawiki-common/maintenance/rebuildImages.php(96): ImageBuilder->build()
#4 /srv/wikis/mediawiki-common/maintenance/includes/MaintenanceRunner.php(694): ImageBuilder->execute()
#5 /srv/wikis/mediawiki-common/maintenance/run.php(51): MediaWiki\Maintenance\MaintenanceRunner->run()
#6 {main}
Unfortunately, rebuildImages.php does not solve my problem, so it apears to be disfunct in total.
Here is the output (code with the second "?" as suggested):
php maintenance/run.php rebuildImages --wiki sailwiki
Processing image...
2025-10-02 15:40:54: 49.26% done on image; ETA 2025-10-02 15:40:54 [100/203] 4620.86/sec <0.00% updated>
Finished image... 0 of 148 rows updated
Processing oldimage...
Empty oi_archive_name for oi_name=Galatia-Trip.jpg
Empty oi_archive_name for oi_name=050927200330.jpg
Empty oi_archive_name for oi_name=050927200331.jpg
Empty oi_archive_name for oi_name=PanoramaAThen.JPG
Empty oi_archive_name for oi_name=PanoramAthen.JPG
Empty oi_archive_name for oi_name=Wasserflaschenbilder.jpg
Empty oi_archive_name for oi_name=051008091004.jpg
Empty oi_archive_name for oi_name=051007162048.jpg
Empty oi_archive_name for oi_name=20060722090045_Törnfoto.jpg
Finished oldimage... 0 of 61 rows updated
But there are a lot of missing linked images. What's the reason? Any idea? I am willing to help to find the reason and to fix, but where to start?
Log In to Comment
Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct.
Wikimedia Foundation
Code of Conduct
Disclaimer
CC-BY-SA
GPL
Credits