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!
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users