humanmade / S3-Uploads

The WordPress Plugin to Store Uploads on Amazon S3
1.92k stars 389 forks source link

URL rewrites for attachments added to classic editor not working #664

Open zubairali6 opened 7 months ago

zubairali6 commented 7 months ago

The URL rewrites are working fine for attachments uploaded via the media library, however when I add an attachment/media via the classic editor tiny MCE the link for the attachment is not getting rewritten and is instead the default base URL for wordpress. Is this a known issue?

tomjn commented 7 months ago

Do you have examples?

zubairali6 commented 7 months ago

So investigating this a bit furthur I can see that it is in fact rewriting URLs when uploading attachment for the first time in the classic editor, however it hasn't rewritten URLs for pages that had already had attachments uploaded prior to the switch to S3 uploads (we were on offload media plugin before).

So for example,

When going to a page on the website where an editor had uploaded an attachement using the tiny MCE classic editor before the switch to S3 uploads, I can see that it still has the old default wp URL e.g https:webuat-cm/uploads/wp-content/testfile.doc when it should be the S3 URL. Screenshot 2024-02-02 at 16 45 29