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
Not working for options pages #56
Comments
Yeah, options page isn't working for me either. I just get:
|
Hi @ethanclevenger91 and @Specik, Thanks |
I tested and didn't see any problem. I recorded a video with the test, follow the link: https://www.youtube.com/watch?v=EPZOxi2QzAI Thanks |
Your example shows a GET request, which does indeed work for me, but I'm getting the same error as @Specik when trying to POST data |
Hi @ethanclevenger91, Thanks |
Hi @ethanclevenger91 & @Specik, I fixed the erro, but you need to add this code below in your Filter reference: add_filter( 'acf/location/rule_match/options_page', function( $visibility ) {
if ( ! is_admin() ) {
return true;
}
return $visibility;
} ); Thanks |
@airesvsg The above code causes all fields to show when I'm using ACF fields outside of the admin, like the following scenario: https://www.advancedcustomfields.com/resources/create-a-front-end-form/ |
I wasn't able to post updates to options pages using the latest ACF PRO. I did some digging and come across a couple of potential problems, but I don't claim to know exactly how your plugin works.
1 - I see you're attempting to use
option
as thepost_id
argument toacf_get_field_groups
, but this doesn't return any fields. I found that a successful call to that function for an options page looks like this:With the registered options page slug there at the end.
2 - It looks like the ACF Pro Options extension isn't even loaded when the API request is made. I put a
die
in the constructor for theacf_pro_options_page
class and it never fired while making an API request. This means that when it attempts to validate the field, it doesn't find it, unless you're doing something special on your end to bootstrap that.That's what I found, but maybe it's way off base and I totally misunderstand what's happening. Anyway, moral of the story is I can't currently update any ACF options with this plugin. Let me know if you have thoughts.
Thanks!
The text was updated successfully, but these errors were encountered: