[wp-trac] [WordPress Trac] #49314: WordPress Adding "-1" to Uploaded Images
WordPress Trac
noreply at wordpress.org
Tue Jan 28 17:53:38 UTC 2020
#49314: WordPress Adding "-1" to Uploaded Images
--------------------------+-----------------------------
Reporter: WebmasterT | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 5.3.2
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
This problem occurs even when I deactivate all plugins and use the default
theme.
It began on December 13, 2019.
When adding an image into the WordPress data that is labeled:
this-picture-upload-01-700x400
Wordpress has begun adding a -1 after the file name, creating:
this-picture-upload-01-700x400-1
This "-1" is typically added only when the exact same file name already
exists in in the database.
Now WordPress is adding it to any upload like this:
this-picture-upload-01-700x400
If I add a picture with a file name like this (I actually added this into
the database for you to see):
drfdffdfsddfdfdfdf38
Wordpress doesn't add "-1"
But when I change that same file to this file name (I actually added this
into the database for you to see):
qorianka-kilcher-the-new-world-01-1896x812
Wordpress does this to the file name:
qorianka-kilcher-the-new-world-01-1896x812-1
Again, no other previous upload for "qorianka-kilcher-the-new-
world-01-1896x812' exists in our system.
........
I showed this problem to my website host, and this was their reply:
I have set up a brand new fresh installation of Wordpress on my personal
account. There are no plugins or themes. The installation was
performed specifically to test this on a fresh install.
=================
[0159][root at sip1-228 /home/ehegelne/wp.ehegel.net/html]$ find . |grep -i
jelly
./wp-content/uploads/2020/01/Jellyfish-01-2020-1024x768-1-300x225.jpg
./wp-content/uploads/2020/01/Jellyfish-01-2020-1024x768-1-150x150.jpg
./wp-content/uploads/2020/01/Jellyfish-01-2020-1024x768-1.jpg
./wp-content/uploads/2020/01/Jellyfish-01-2020-1024x768-1-768x576.jpg
=================
=================
[0200][root at sip1-228 /home/ehegelne/wp.ehegel.net/html]$ find . |grep -i
koala
./wp-content/uploads/2020/01/Koala.jpg
./wp-content/uploads/2020/01/Koala-150x150.jpg
./wp-content/uploads/2020/01/Koala-768x576.jpg
./wp-content/uploads/2020/01/Koala-300x225.jpg
=================
As you can see the same behavior occurs. I am not sure why Wordpress
does this, but it is default behavior of the application.
.................
Can this error be fixed please so that when a person adds a non-duplicate
file like this-picture-upload-01-700x400, a "-1" is not added to it?
Thank you.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49314>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list