I am using acf_form() to create a series of frontend forms that will be used to edit/create several post types.
While trying to edit a specific post type (artists in this example), I get the following error in my console and the form does not even load (I am using templates and endpoints to dynamically create edit/create pages).
TypeError: wp.hooks is undefined
Any insights on this error? Any guidance?
It seems there’s a conflict on your site. Do you have any other error messages on the console? Could you please try to reproduce the issue on one of the WordPress’ stock themes (like Twenty Sixteen) with other plugins deactivated? If it disappears, then you can activate the theme and plugins one by one to see which one causes the issue.
Also, could you please make sure that you have
acf_form_head() set correctly? This page should give you more idea about it: https://www.advancedcustomfields.com/resources/create-a-front-end-form/.
I tried the default theme, but the result is the same. And this only happens on a particular post type. I have 3-4 more post types and editing one of them works correctly. I am using the theme’s functions file to add the acf_form_head() tag on all relevant pages.
I would assume that even without the acf_form)head() tag, the form would at least show up, but this does not happen. The page does not even change, although the URL does and that’s when I get the error.
Could you please open a new ticket and provide temporary admin credentials to your site? You can open a new ticket here: https://support.advancedcustomfields.com/new-ticket.
If you can create a staging/development site and provide the credentials to that site instead, that would be great! That way, we can do some tests without affecting your live site.
Also, please don’t forget to explain the issue again and provide the link to this thread.