-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems attaching to ACF file field from the "Global Media" Tab #98
Comments
We are faceing the same isse on our current installation. WP Version 5.0.3 |
Same issue of @mikem33 with gallery ACF |
@feldmarv @mikem33 and @Leobar00 have you tried this with the last version, that have several enhancements for the ACF plugin? |
@bueltge @feldmarv @mikem33 Searching in the ACF source code, I found a solution In the file (acf) : acf/includes/api/api-helpers.php function acf_get_attachment At first :
So we have an interesting hook "acf/pre_load_attachment" and the answer expected by ACF is an array We can use the hook, if we are in the context "global media" then we can make the "switch" get the info from the media and return it
@Leobar00 I don't have a fix for your problem But you can cheat :) |
I have some ACF File fields that if I attach to them PDF's files uploaded in the main site from the "Global Media" tab, in first instance it get attached to them without any apparent problem but when I reload the page after saving it, the file is no longer attached to them.
If the file is from the current site it works without problem. I suppose this is Gutenberg related.
Any idea? Thank you in advance!
The text was updated successfully, but these errors were encountered: