Skip to content

Image gets saved to file system, but incorrect image path is saved in media attachment #66

@Jakob-Maudience

Description

@Jakob-Maudience

I have a strange behavior when using this plugin, I have imported posts from a Squarespace blog. I import the posts, and the image paths before the plugin is activated are like this:
https://images.squarespace-cdn.com/content/v1/55b3d4afe4b0edbb36a4b6ea/1552236764572-KT58HNL34WDKJYMWFJFX/ke17ZwdGBToddI8pDm48kLzw7P_nKYlGGC0MzqILKf17gQa3H78H3Y0txjaiv_0fDoOvxcdMmMKkDsyUqMSsMWxHk725yiiHCCLfrh8O1z4YTzHvnKhyp6Da-NYroOW3rv7sVmavAApj1cuSnuUyXzqqXjS3CfNDSuuf31e0tVEhpqFMoPGd0_ypppePcJDz-vqyAZGPnUfr_Ql19q21eghW3lgGaAnbOfVbqEfQJYA/Accounts+Payable300dpi--3.jpg?format=original

When I activate the wp-auto-upload plugin, the path is like this:
.../uploads/2019/10AccountsPayable300dpi-3.jpg

The image is saved to disk under this path:
.../uploads/2019/10/AccountsPayable300dpi-3.jpg

It should be uploads/year/month/image.
Instead the path is saved as uploads/year/monthimage (no slash between month and image name)

What is strange is, the image path does get overwritten properly in the edited post, where the original image url got replaced with the imported image url. But since the image url doesn't get saved to the media attachment, you are unable to see the image in the media gallery (a blank thumbnail) and you can not use the image in a different post / page.

I'm using the latest version of the plugin from wordpress.org and the latest stable wordpress release ( 5.2.4 ) I have the classic editor plugin installed if that's relevant. OS is windows, server is Apache.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions