Support

Account

Home Forums General Issues Warnings from ACF after migrating to live site.

Solved

Warnings from ACF after migrating to live site.

  • Hello there. I have tried several times to migrate a website from local development environment to a live server. In my local environment, the ACF plugin works wonderfully. However, it will not work on my live site. This is a big problem, because I rely heavily on it. I get the following output on my main page:

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'my_register_fields' was given in /my/site/root/wp-includes/plugin.php on line 406
    
    Warning: Cannot modify header information - headers already sent by (output started at /my/site/root/wp-includes/plugin.php:406) in /my/site/root/wp-includes/pluggable.php on line 876

    I get the first one, but not the second one in my admin panel as well. If I shut off ACF, these errors go away. If I switch to a default theme instead of my custom theme, these errors go away. Either way, my site is useless without ACF and my custom theme.

    Any help would be greatly appreciated.

  • Hi @mwwardle

    Looks like the error stats with ‘my_register_fields’.

    Perhaps you need to activate your theme, then activate ACF?

  • Thanks for the response Elliot. I checked my functions.php file and there was a problem with it. I had this:

    add_action('acf/register_fields', 'my_register_fields');

    I commented it out and everything seems to work just fine now. I am still not sure why it wasn’t an issue with my local environment, but it was on my live site.

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

The topic ‘Warnings from ACF after migrating to live site.’ is closed to new replies.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.