Support » Plugin: Media File Renamer - Auto & Manual Rename » Wrong file name when using Renamer

  • Resolved Konijntje

    (@konijntje)


    Hi all,

    I’m using WordPress 5.4.1, WooCommerce 4.1.1 and Media File Renamer 4.6.9.

    When I upload an image file named ‘monkey-king.png’ (2.2MB) to the WordPress Media Library, it will show this in FTP (path /wp-content/uploads/2020/05):

    monkey-king-100x100.png
    monkey-king-150x150.png
    monkey-king-300x153.png
    monkey-king-350x179.png
    monkey-king-680x347.png
    monkey-king-700x357.png
    monkey-king-768x392.png
    monkey-king.png

    But when I rename the title from ‘monkey-king’ to e.g. ‘funny-monkey-king’ it will show this in FTP:

    funny-funny-monkey-king-100x100.png
    funny-funny-monkey-king-350x179.png
    funny-funny-monkey-king-680x347.png
    funny-monkey-king-150x150.png
    funny-monkey-king-300x153.png
    funny-monkey-king-700x357.png
    funny-monkey-king-768x392.png
    funny-monkey-king.png

    Why are the first 3 filename duplicated with ‘funny-funny’ ?

    Is this a known bug?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hi @konijntje,

    Sorry to ask that but… are you sure? Really sure that it happens this way? To be honest, I have no idea how the first term of a filename could be re-used twice. Technically, it seems totally impossible 🙂 And the algorithm used to write the sized image names is exactly the same, so I can’t see how it could result in different filenames.

    Can you replicate this bug with a brand new Media entry?

    Thread Starter Konijntje

    (@konijntje)

    Hello @tigroumeow,

    I’m 100% sure 🙂 You can try it by yourself if you don’t believe me.

    I did a clean installation of WordPress 5.4.1, then I use the TwentyTwenty theme with only 2 plug-ins installed and activated: WooCommerce 4.1.1 and Media File Renamer 4.6.9.

    Hosting server specs are: Apache 2 / PHP 7.2.31 / MySQL 5.7.30

    Instructions:
    Just upload a file named “little-bunny.jpg”. Then rename “little-bunny” to “cute-little-bunny” or “little-bunny-animal”.

    FTP:
    cute-cute-little-bunny-100×100.jpg
    cute-cute-little-bunny-450×450.jpg
    cute-cute-little-bunny-600×600.jpg
    cute-little-bunny-150×150.jpg
    cute-little-bunny-300×300.jpg
    cute-little-bunny-768×768.jpg
    cute-little-bunny.jpg

    FTP:
    little-bunny-animal-150×150.jpg
    little-bunny-animal-300×300.jpg
    little-bunny-animal-768×768.jpg
    little-bunny-animal-animal-100×100.jpg
    little-bunny-animal-animal-450×450.jpg
    little-bunny-animal-animal-600×600.jpg
    little-bunny-animal.jpg

    It seems that the ‘bug’ only affects 100×100, 450×450 and 600×600 sizes.

    • This reply was modified 1 year, 4 months ago by Konijntje.
    • This reply was modified 1 year, 4 months ago by Konijntje.
    • This reply was modified 1 year, 4 months ago by Konijntje.
    • This reply was modified 1 year, 4 months ago by Konijntje.
    • This reply was modified 1 year, 4 months ago by Konijntje.
    Plugin Author Jordy Meow

    (@tigroumeow)

    Of course, I tried 🙂 And tried again with your specific filenames. But impossible for me to replicate it.

    I really think something else is going on. It’s impossible that the rename is different from one size to another.

    Are you sure those images weren’t existing before? Or were named like this at some point, when those sizes where actually used and part of your metadata? Maybe now they aren’t part of your metadata?

    If you rename your file into “whatever-else.jpg”, what will happen? My guess is that the double-cute bunny will remain double-cute 😉 And the other files will be updated.

    Thread Starter Konijntje

    (@konijntje)

    Hello @tigroumeow,

    Thanks for your reply!

    I’ve even tested on two different hosting servers (PHP7.2, PHP7.3) with a new installation of WordPress (5.4.1) with just only WooCommerce (4.1.1) and Media File Renamer (4.6.9) installed and activated. I’ve also tested on different standard themes: TwentyNine and TwentyTwenty.

    It gives the same result and the ‘bug’ only affect the WooCommerce sizes:
    woocommerce_single (600x)
    woocommerce_thumbnail (450x)
    woocommerce_gallery_thumbnail (100x)
    shop_single (600x)
    shop_catalog (450x)
    shop_thumbnail (100x)

    While the Media File Renaming function works normally to thumbnail (150x), medium (300x) and medium_large (768x) sizes.

    And the bug only occurs when you upload a filename in lowercase.

    Result in FTP:
    cute-cute-little-bunny-100×100.jpg <——–
    cute-cute-little-bunny-450×450.jpg <——–
    cute-cute-little-bunny-600×600.jpg <——–
    cute-little-bunny-150×150.jpg
    cute-little-bunny-300×300.jpg
    cute-little-bunny-768×768.jpg
    cute-little-bunny.jpg

    Please upload a Hi-Res (e.g. 900×900) JPG-file named e.g. “test file.jpg” or “test-file.jpg” all lowercase. Then rename it to e.g. “test file blabla”, thus just add blabla as prefix or suffix.

    Thanks in advance!

    • This reply was modified 1 year, 4 months ago by Konijntje.
    Thread Starter Konijntje

    (@konijntje)

    Hi @tigroumeow,

    I have uploaded a video (1:35 minutes) to https://youtu.be/BrTB_F2WUtw
    You can see the bug in the video.

    Plugin Author Jordy Meow

    (@tigroumeow)

    Hi,

    Sorry for my late reply. I didn’t forget about you 🙂 I was just really busy working on this plugin a lot, and I really wanted to make a huge upgrade, then come back to those little fixes later. I also thought that most of those issues would disappear after this big work.

    Could you contact me directly? Here: http://meowapps.com/contact. I would like to share with you a fresh new version of Media File Renamer, and see if you are still experiencing that issue with it (I actually don’t). If yes, I’ll fix it for you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Wrong file name when using Renamer’ is closed to new replies.