Page MenuHomePhabricator

Unable to delete file on Commons (Fatal exception of type "Wikimedia\Rdbms\DBQueryError")
Closed, DuplicatePublicPRODUCTION ERROR

Description

Unable to delete this file: https://commons.wikimedia.org/wiki/File:Mike_Shinoda.jpg

A database query error has occurred. This may indicate a bug in the software. [WcBKWApAIDYAAG9NFj4AAAAE] 2017-09-18 22:36:10: Fatal exception of type "Wikimedia\Rdbms\DBQueryError"

2017-09-18 22:36:10 [WcBKWApAIDYAAG9NFj4AAAAE] mw1184 commonswiki 1.30.0-wmf.18 exception ERROR: [WcBKWApAIDYAAG9NFj4AAAAE] /w/index.php?title=File:Mike_Shinoda.jpg&action=delete   Wikimedia\Rdbms\DBQueryError from line 1149 of /srv/mediawiki/php-1.30.0-wmf.18/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 
Query: SELECT  'deleted' AS `fa_storage_group`, (CASE WHEN img_sha1 = '' THEN '' ELSE CONCAT(img_sha1,'.jpg') END)  AS `fa_storage_key`,'1085353' AS `fa_deleted_user`,'20170918223610' AS `fa_deleted_timestamp`,0 AS `fa_deleted`,img_name AS `fa_name`,NULL AS `fa_archive_name`,img_size AS `fa_size`,img_width AS `fa_width`,img_height AS `fa_height`,img_metadata AS `fa_metadata`,img_bits AS `fa_bits`,img_media_type AS `fa_media_type`,img_major_mime AS `fa_major_mime`,img_minor_mime AS `fa_minor_mime`,img_user AS `fa_user`,img_user_text AS `fa_user_text`,img_timestamp AS `fa_timestamp`,img_sha1 AS `fa_sha1`,'[[COM:L|Copyright violation]]: http://www.gettyimages.fr/%C3%A9v%C3%A9nement/linkin-parks-mike-shinoda-echosmith-press-conference-for-rock-in-rio-music-for-relief-partnership-announcement-544778779#musician-mike-shinoda-of-linkin-park-appears-at-a-pre... AS `fa_deleted_reason`,img_description AS `fa_description`  FROM `image`    WHERE img_name = 'Mike_Shinoda.jpg'   FOR UPDATE
Function: LocalFileDeleteBatch::doDBInserts
Error: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '.jpg'   FOR UPDATE' at line 1 (10.64.48.23)
 {"exception_id":"WcBKWApAIDYAAG9NFj4AAAAE","exception_url":"/w/index.php?title=File:Mike_Shinoda.jpg&action=delete","caught_by":"mwe_handler"} 
[Exception Wikimedia\Rdbms\DBQueryError] (/srv/mediawiki/php-1.30.0-wmf.18/includes/libs/rdbms/database/Database.php:1149) A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 
Query: SELECT  'deleted' AS `fa_storage_group`, (CASE WHEN img_sha1 = '' THEN '' ELSE CONCAT(img_sha1,'.jpg') END)  AS `fa_storage_key`,'1085353' AS `fa_deleted_user`,'20170918223610' AS `fa_deleted_timestamp`,0 AS `fa_deleted`,img_name AS `fa_name`,NULL AS `fa_archive_name`,img_size AS `fa_size`,img_width AS `fa_width`,img_height AS `fa_height`,img_metadata AS `fa_metadata`,img_bits AS `fa_bits`,img_media_type AS `fa_media_type`,img_major_mime AS `fa_major_mime`,img_minor_mime AS `fa_minor_mime`,img_user AS `fa_user`,img_user_text AS `fa_user_text`,img_timestamp AS `fa_timestamp`,img_sha1 AS `fa_sha1`,'[[COM:L|Copyright violation]]: http://www.gettyimages.fr/%C3%A9v%C3%A9nement/linkin-parks-mike-shinoda-echosmith-press-conference-for-rock-in-rio-music-for-relief-partnership-announcement-544778779#musician-mike-shinoda-of-linkin-park-appears-at-a-pre... AS `fa_deleted_reason`,img_description AS `fa_description`  FROM `image`    WHERE img_name = 'Mike_Shinoda.jpg'   FOR UPDATE
Function: LocalFileDeleteBatch::doDBInserts
Error: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '.jpg'   FOR UPDATE' at line 1 (10.64.48.23)

  #0 /srv/mediawiki/php-1.30.0-wmf.18/includes/libs/rdbms/database/Database.php(979): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
  #1 /srv/mediawiki/php-1.30.0-wmf.18/includes/libs/rdbms/database/Database.php(1343): Wikimedia\Rdbms\Database->query(string, string)
  #2 /srv/mediawiki/php-1.30.0-wmf.18/includes/libs/rdbms/database/Database.php(2402): Wikimedia\Rdbms\Database->select(array, string, array, string, array, array)
  #3 /srv/mediawiki/php-1.30.0-wmf.18/includes/filerepo/file/LocalFile.php(2388): Wikimedia\Rdbms\Database->insertSelect(string, array, array, array, string, array, array, array)
  #4 /srv/mediawiki/php-1.30.0-wmf.18/includes/filerepo/file/LocalFile.php(2514): LocalFileDeleteBatch->doDBInserts()
  #5 /srv/mediawiki/php-1.30.0-wmf.18/includes/filerepo/file/LocalFile.php(1812): LocalFileDeleteBatch->execute()
  #6 /srv/mediawiki/php-1.30.0-wmf.18/includes/FileDeleteForm.php(201): LocalFile->delete(string, boolean, User)
  #7 /srv/mediawiki/php-1.30.0-wmf.18/includes/FileDeleteForm.php(119): FileDeleteForm::doDelete(Title, LocalFile, string, string, boolean, User)
  #8 /srv/mediawiki/php-1.30.0-wmf.18/includes/page/ImagePage.php(985): FileDeleteForm->execute()
  #9 /srv/mediawiki/php-1.30.0-wmf.18/includes/actions/DeleteAction.php(46): ImagePage->delete()
  #10 /srv/mediawiki/php-1.30.0-wmf.18/includes/MediaWiki.php(499): DeleteAction->show()
  #11 /srv/mediawiki/php-1.30.0-wmf.18/includes/MediaWiki.php(293): MediaWiki->performAction(ImagePage, Title)
  #12 /srv/mediawiki/php-1.30.0-wmf.18/includes/MediaWiki.php(848): MediaWiki->performRequest()
  #13 /srv/mediawiki/php-1.30.0-wmf.18/includes/MediaWiki.php(523): MediaWiki->main()
  #14 /srv/mediawiki/php-1.30.0-wmf.18/index.php(43): MediaWiki->run()
  #15 /srv/mediawiki/w/index.php(3): include(string)
  #16 {main}

Event Timeline

Reedy closed this task as a duplicate of Restricted Task

Please notify me if that task is ever gets solved or what the underlying cause is, unless I'm cc'ed in, thanks :)

You were CC'd in... T176101

Oh, it has got even higher restrictions than normal restricted tasks

Users with the "Can View" capability:
Members of the project "Security" can take this action.
The owner of a task can always view and edit it.

Not CC'ed people even.

Because the wrong security policy was applied. Fixed

Because the wrong security policy was applied. Fixed

Thanks!

Bawolff set Security to Software security bug.Sep 19 2017, 12:30 AM
Bawolff added a project: acl*security.
Bawolff changed the visibility from "Public (No Login Required)" to "Custom Policy".
Bawolff subscribed.
Bawolff changed the visibility from "Custom Policy" to "Public (No Login Required)".Sep 19 2017, 5:04 PM
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:09 PM