• Resolved airc

    (@airc)


    Hi there,

    Previously, names of uploads have always maintained the case of the filename.

    Since the latest version of WordPress, titles are now changed to lowercase and spaces replaced with hyphens. After each upload I have to manually change this.

    For example, previously it would have shown like this:

    Windows filename: 2016-09-28 Important Letter.pdf
    Wordpress filename: 2016-09-28-Important-Letter.pdf
    Wordpress Title: 2016-09-28 Important Letter

    Now, the following is happening:

    Windows filename: 2016-09-28 Important Letter.pdf
    Wordpress filename: 2016-09-28-Important-Letter.pdf
    Wordpress Title: 2016-09-28-important-letter

    Many thanks for any assistance

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your report. This issue has been reported elsewhere:

    Plugin no longer works properly with WordPress 4.6.1

    File name and title handling was changed in WordPress 4.6. The media_handle_upload function in file /wp-admin/includes/media.php was modified to call sanitize_title, which makes the changes you have observed.

    You could use the hooks provided by MLA to replace the WordPress value with the original filename or anything else your application needs. The “MLA Simple Mapping Hooks Example” example plugin is a good place to start. You could activate the mla_upload_prefilter to capture the unaltered file name and then use the mla_mapping_updates filter to change the Title value.

    To find the example plugin, navigate to the Settings/Media Library Assistant Documentation tab and click the new “Example Plugins” button. Enter “Simple Mapping” in the text box and click “Search Plugins”. You should see the example plugin.

    The “MLA Simple Mapping Hooks Example” plugin is the one you want. You can hover over the plugin name and click the “Download” rollover action to get a copy you can modify to suit your needs.

    I am marking this topic resolved because the change you reported is part of WordPress, not MLA. If you need more specific guidance on adapting the example plugin, post an update here and I will give you what help I can. Thanks for your interest in the plugin.

    Plugin Author David Lingren

    (@dglingren)

    It looks like this has already been reported as a bug:

    Unexpected change to media title behavior in WP 4.6.1

    You might just wait for the next WordPress update and see if it gets resolved that way.

    David,

    The ticket isn’t closed yet but in the latest nightly build it seems as though this issue has been fixed. On my local test site media items once again maintain the case of the uploaded filename.

    Can you confirm this your end, with your plugin?

    Regards,

    David

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update with the new results. I updated one of my test systems to the just-released WordPress 4.7 Beta 1 version and it does indeed look like the issue has been fixed.

    Actually, MLA does not participate in the Title generation process so the fix works whether or not MLA is active.

    I believe this issue was introduced on WordPress 4.5.4 because that’s when I noticed it.

    I can confirm this will be fixed in the WP 4.7 release.

    Thread Starter airc

    (@airc)

    My apologies, appears I missed notification that this topic had been updated.

    Thank you for the replies on my issue. I have also now updated and can confirm all is well again.

    Assistance much appreciated

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Uploads Changed To Lower Case’ is closed to new replies.