WordPress.org

Ready to get started?Download WordPress

Forums

Media Rename
[resolved] Error in regex for files with multiple periods (4 posts)

  1. Thlayli
    Member
    Posted 1 year ago #

    Line 16 needs to be:
    preg_match('~.*/(.*)\.(.*?)$~', $post->guid, $file_parts);

    As it is the filename "Tob.-Couns.-referral-form.pdf" only allows editing "Tob" and recognizes the rest as the extension. It looks like the regex is correct on line 98.

    Apologies if I overlooked something.

    http://wordpress.org/extend/plugins/media-rename/

  2. ShadowsDweller
    Member
    Plugin Author

    Posted 1 year ago #

    Fixed. Thanks for reporting!

  3. scalare
    Member
    Posted 1 year ago #

    I also have trouble with this. But not in the same way as above. It actually shows the New Filename field, but in its content, it shows my domain name (without the .com), and to the right of the field, it shows .com/services/what-to-expect/what-to-expect-2, where what-to-expect-2 is the actual name of the file, and all the rest is the path to the page in which I have that image inserted (I'm using %postname% as permalink structure).

    Should the plugin display the full name including domain name and path for the file, or just the file name?

    I can send you a screenshot if you need to see what I see.

    Thank you!
    Andrés

  4. ShadowsDweller
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Did this issue happen on the latest version (2.0.2)? If so, please send me a screenshot.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.