• Resolved LilGames

    (@lilgames)


    BUG REPORT:
    I uploaded a logo with the name “Filename-Logo.png”, then set it as the logo for a game in your plugin. I generated the page and then viewed it. The logo image shows a “broken image” icon, because it’s trying to use “filename-logo.png” instead of the original correct name.

    WORK-AROUND: Use only all-lowercase filenames.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author LearnOnline.shop

    (@blacklodgegames)

    Thanks for the bug report! That is a frustrating issue, so I appreciate you taking the time to report it. I’ll do everything I can to resolve this for you.

    Unfortunately, I tried to recreate this issue in multiple ways but cannot. Every mixed case image I upload and set as a logo or icon for a game appears correctly with uppercase and lower case letters. This happens whether I upload the image while creating the game, or if I upload the image separately and then choose it from the media gallery later.

    I also combed through the code to look at the functions that handle the filename and uploads. Uploading or choosing images is done through WordPress itself with the Media Library. The actual input field doesn’t have any type of case changing/checking done to it, so the filename we use is the one WordPress natively provides to us using their functions. It should be exactly the name of the file you upload.

    Now I believe 100% that this is an issue you’re experiencing, and I want to help. However, until I can recreate the issue, it is impossible to know if I solved it. In addition, all the code I wrote for this just taps into standard WordPress functions. I can say with near certainty (after doubling checking) that the functions I wrote do not mess with the case of the filename and so cannot be the root cause of this bug.

    To that end, I feel like another plugin or your theme might be hooking/filtering the Media Library and potentially erroneously converting filenames to lowercase on your site.

    To test this, simply use the Media Library from wp-admin > Media > Add New > and click the Upload button. Then select a mixed case image and upload it. Now click the Edit button and see if the issue is repeated. If it is, well you can cross my plugin off of the list. However, if the image works fine, maybe there is something I missed or some plugin conflicts causing the issue.

    There’s a good chance the Media Library works fine. In that case, I’ve just released version 2.0.1. This new version adds a tab called Diagnostics to the main IndieDev Game Marketer admin page. Click on that tab, copy the diagnostic data in the textbox and email it to [email protected] – I will then install all the plugins you have and try to recreate your issue by using an almost identical setup to the one you’re running.

    Sorry for the long reply and that I couldn’t replicate your issue. I am here to help though, so I totally appreciate your help in this matter. Thanks again!

    Thread Starter LilGames

    (@lilgames)

    I just emailed you the diagnostics you requested.

    Plugins I have that could possibly alter or impede media are:
    – ShortPixel Image Optimizer
    – Enable Media Replace (by Shortpixel)

    In fact, when I view a presskit page for the first time after a change, I see the Shortpixel icon in the admin bar, with an exclamation mark next to it. Not sure why.

    I tested out, uploading a new image, with mixed-case letters for the icon, and sure enough, the same bug appeared.

    I wish I had time to test more thoroughly for you but I don’t.

    EDIT:
    *File I uploaded retained its case in WordPress: /wp-content/uploads/Save-up-Your-caps_1.jpg
    But in your generated presskit page it’s looking for lowercase: https://www.wheeloffate.com/wheel-of-fate-press-kit/

    • This reply was modified 5 years, 8 months ago by LilGames.
    Plugin Author LearnOnline.shop

    (@blacklodgegames)

    I think I’ve got this patched as of version 2.0.3 2.0.4. If you could update and verify I would totally appreciate it. Thanks again for the bug report! Do you have any feature requests?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bug with mixed-case filenames.’ is closed to new replies.