@dariusroberts Yes, Members plugin.
Maybe this helps: I tried to dig through this problem and in my case I create post using acf/pre_save_post. I save post as a draft. The thing is all the metadata is saved for draft post, but when I try to see preview, WordPress actually shows me the first revision, but that revision does not have any metadata attached unless I open post in admin panel and press ‘Save Draft’ or keep it open long enough to trigger auto-save. It seems that WordPress’ hook wp_insert_post
does not handle creating metadata for first revision.
Nevermind, gallery shows up only unattached images, so that’s not a problem at all! Thanks @markbloomfield!
That looks much better! But what about situation where user does not upload media file, but chooses from already uploaded posts instead? I think if it’s done via WordPress, then attachment record is cloned and then attached to new post_parent. Then your solution would break previous ties of existing attachment, wouldn’t it?
As I see it, it’s a WordPress isssue – if I grant access for anonymous useres to upload media, then it works. In my case I require users to register as contributors and allow contributor role users to upload media.
Having the same issue when trying to implement form on front-end. Everything works ok, if I’m logged in (as admin, haven’t tried other user types). But, when trying to upload images while not being logged in is generating above mentioned error.
Is there any advice how to fix it?