WordPress.org

Support

Support » Plugins and Hacks » Media Rename » [Resolved] Error in regex for files with multiple periods

[Resolved] Error in regex for files with multiple periods

  • Thlayli

    @thlayli

    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/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ShadowsDweller

    @shadowsdweller

    Fixed. Thanks for reporting!

    scalare

    @scalare

    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

    Plugin Author ShadowsDweller

    @shadowsdweller

    Hi,

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Error in regex for files with multiple periods’ is closed to new replies.
Skip to toolbar