[wp-trac] [WordPress Trac] #53455: WP:5.6 is Generating Zero-Sized files of previously deleted Media

WordPress Trac noreply at wordpress.org
Sat Jun 19 10:37:14 UTC 2021


#53455: WP:5.6 is Generating Zero-Sized files of previously deleted Media
--------------------------------+-----------------------------
 Reporter:  HisKingdomProphecy  |      Owner:  (none)
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Media               |    Version:  5.6
 Severity:  normal              |   Keywords:  needs-patch
  Focuses:  administration      |
--------------------------------+-----------------------------
 Hi Folks,

 I should like to report a bug which came in the WP:5.6 on December 8,
 2020.  I became aware of earlier this month.

 Since December 2020, WP has been generating hundreds of zero-sized files
 (0Kb) for media assets which have long since been removed from our posts
 and which no longer exist in the database, or which were the subjects of
 remote off-site linked assets.

 Almost at random, it seems that WP is generating zero-sized files and
 placing them in the current year/month of wp-content/uploads/.

 The number of files I have found and deleted to date are:
 06 2021  55 Zero-size up to June 11
 05 2021  196 Zero-size
 04 2021  41 Zero-size
 03 2021  82 Zero-size
 02 2021  135 Zero-size
 01 2021  182 Zero-size
 12 2021  109 Zero-size
 On June 11, I deleted all these above files, but new ones have been
 created as follows:
 12th: 7,  13th: 2, 14th: 4, 15th: 2, 16th: 1, 17th: 0, 18th: 3, 19th: 2.
 Giving a total of 75 for 2021/06 to today.

 The file types are mostly .jpg but also a few .mp3 and .pdf

 I have been searching the database for source references for these deleted
 media files, and almost all can be found in the wp_postmeta table.

 Some do not appear in the wp_postmeta table and I cannot find them in the
 database.  I have no idea where they file name is hiding.

 Based on the file names, I can recognise that some of these media files
 were loaded into posts which were then published, but then later the media
 was changed out and deleted from the post and from the database.
 Some of the media files were loaded into WP draft posts and then deleted
 immediately.
 Some of these media files were removed from posts 8-9 or more years ago,
 though most are more recent.

 From my searching and from the names of the zero-sized media files
 generated ‘apparently randomly’ by WP, I believe they are related to old
 `<img class wp-image-218493…`  links which were deletd from the posts when
 the media was deleted and new asset urls inserted.

 However, these `wp-image.medea-links` still remain in the wp_postmeta
 table.

 Since these files have zero-size, they don’t make a difference to the
 performance of the site, but in the wp-content/uploads/2021/05 directory
 196 out of 313 items were zero-size files of media asset names which no
 longer exist on the site.

 I would be pleased if your will look at this and see if you can find a
 fix.

 I have a sample folder of for 2021/05&06 of these zero-sized files if you
 want to see it.  Its size is 0Kb. Other than the file creation date, it
 contains no information I can see,
 You can open it with Notepad as it only contains file names etc,
 The 05-2021 list:
 https://www.dropbox.com/s/tprupg3qts8618a/05%20Blank%20files?dl=0
 The 06-2021 lost:
 https://www.dropbox.com/s/z8iagzym3j1o2jl/06%20Blank%20files?dl=0
 If you have any more questions, please do ask.  I am pleased to help.

 FYI. I am using the lasted WP and all plugins are up to date.

 Regards and thanks,
 Angus

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53455>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list