Home Forums Front-end Issues acf_form() error while editing post from frontend


acf_form() error while editing post from frontend

  • Hi all,

    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?

  • Hi @georgen

    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:

    Thanks 🙂

  • Hi @James

    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.

  • Hi @georgen

    Could you please open a new ticket and provide temporary admin credentials to your site? You can open a new ticket here:

    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.

    Thanks 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘acf_form() error while editing post from frontend’ is closed to new replies.