Home › Forums › General Issues › Warnings/errors when saving ACF on page not post
I’ve set up a custom post type (has repeaters in too). If I set the ACF to show when it’s on a custom post, it’s fine. When it’s on a page (tried page template and page name), it saves (e.g. click back and refresh) but then I get these warnings on a white page (doesn’t bring you back to WP page):
Warning: array_keys() expects parameter 1 to be array, null given in /var/sites/c/clandestinecakeclub.co.uk/public_html/br-testsite/wp-includes/wp-db.php on line 1324
Warning: Invalid argument supplied for foreach() in /var/sites/c/clandestinecakeclub.co.uk/public_html/br-testsite/wp-includes/wp-db.php on line 1326
Warning: implode() [function.implode]: Invalid arguments passed in /var/sites/c/clandestinecakeclub.co.uk/public_html/br-testsite/wp-includes/wp-db.php on line 1335
Warning: Cannot modify header information - headers already sent by (output started at /var/sites/c/clandestinecakeclub.co.uk/public_html/br-testsite/wp-includes/wp-db.php:1324) in /var/sites/c/clandestinecakeclub.co.uk/public_html/br-testsite/wp-admin/post.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /var/sites/c/clandestinecakeclub.co.uk/public_html/br-testsite/wp-includes/wp-db.php:1324) in /var/sites/c/clandestinecakeclub.co.uk/public_html/br-testsite/wp-includes/pluggable.php on line 896
I can’t work out what on earth it is. I’ve reinstalled the repeater and ACF, increased the memory size, reinstalled the entire wp-includes folder. At a complete loss.
I need to have it on a page as I want to be able to set this page as a homepage so not really another way around it very easily.
Sorry I slept on it and woke up this morning realising it was probably one of my own functions causing the error. After narrowing it down, I realised that a had a function with some acf fields saving to another db table on post save, and that I hadn’t wrapped it correctly in an if function. It’s only supposed to do it with a certain custom post type you see. Sorry!
The topic ‘Warnings/errors when saving ACF on page not post’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.