Support

Account

Home Forums Backend Issues (wp-admin) Flexible Content drop area not showing

Solved

Flexible Content drop area not showing

  • I’m setting up a Flexible Content field using ACF Pro on my local install which is working fine. I have some custom fields in a customfields.php file that I had previously exported, but I was careful to use a new field group name when creating the Flexible Content fields through the UI (and therefore database).

    I exported the custom fields group and inserted it into the PHP file, changed the field group name to the one used in the PHP code, and uploaded it to the staging site. While the other custom fields and the labels for the field group that has the Flexible Content field show up, the drop area and button to actually add the content for the Flexible Content field does not.

    I have tried renaming the id and title of the field group in the code, but it made no difference.

    What’s going on? Missing data in the database? Naming conflict? Something else?

    ___________________________

    Local: https://cloudup.com/cDtZ4TWR-aJ

    Staging: https://cloudup.com/cVYlBckPlSl

    Code: https://gist.github.com/JulieKuehl/10ce4300ea5e92f6d71bd2d1578c3abe

  • Hi @juliekuehl

    I’ve just tested your code and it was working correctly on my installation. Could you please make sure that the flexible contents, its layouts, and fields don’t have the same keys as the ones registered from the backend?

    Thanks 🙂

  • I added a character to each of the keys for the flexible content, the layouts, and the fields; and it didn’t make a difference. I changed the id of the field group; and it didn’t make a difference. I’ve searched my complete customfields.php file for possible duplicate keys and came up empty.

    Is there any additional information I could provide to help suss this out? The complete customfields.php file? The database?

  • This may or may not be related as I changed an unrelated field from text to textarea, but I am now seeing an error on the backend that looks like (some of which is cut off)(also, this is on the staging site which has DEBUG turned on whereas my local does not):

    parameter 2 to be array, string given in /srv/bindings/12640c8101344cb094ab42dafce15f4e/code/wp-content/plugins/advanced-custom-fields/core/controllers/post.php on line 338 Warning: in_array() expects parameter 2 to be array, string given in /srv/bindings/12640c8101344cb094ab42dafce15f4e/code/wp-content/plugins/advanced-custom-fields/core/controllers/post.php on line 342 Warning: in_array() expects parameter 2 to be array, string given in /srv/bindings/12640c8101344cb094ab42dafce15f4e/code/wp-content/plugins/advanced-custom-fields/core/controllers/post.php on line 346 Warning: in_array() expects parameter 2 to be array, string given in /srv/bindings/12640c8101344cb094ab42dafce15f4e/code/wp-content/plugins/advanced-custom-fields/core/controllers/post.php on line 350 Warning: in_array() expects parameter 2 to be array, string given in /srv/bindings/12640c8101344cb094ab42dafce15f4e/code/wp-content/plugins/advanced-custom-fields/core/controllers/post.php on line 354 Warning: in_array() expects parameter 2 to be array, string given in /srv/bindings/12640c8101344cb094ab42dafce15f4e/code/wp-content/plugins/advanced-custom-fields/core/controllers/post.php on line 358 Warning: in_array() expects parameter 2 to be array, string given in /srv/bindings/12640c8101344cb094ab42dafce15f4e/code/wp-content/plugins/advanced-custom-fields/core/controllers/post.php on line 362 Warning: in_array() expects parameter 2 to be array, string given in /srv/bindings/12640c8101344cb094ab42dafce15f4e/code/wp-content/plugins/advanced-custom-fields/core/controllers/post.php on line 366 Warning: in_array() expects parameter 2 to be array, string given in /srv/bindings/12640c8101344cb094ab42dafce15f4e/code/wp-content/plugins/advanced-custom-fields/core/controllers/post.php on line 370 Warning: in_array() expects parameter 2 to be array, string given in /srv/bindings/12640c8101344cb094ab42dafce15f4e/code/wp-content/plugins/advanced-custom-fields/core/controllers/post.php on line 374 Warning: in_array() expects parameter 2 to be array, string given in /srv/bindings/12640c8101344cb094ab42dafce15f4e/code/wp-content/plugins/advanced-custom-fields/core/controllers/post.php on line 378 Warning: in_array() expects parameter 2 to be array, string given in /srv/bindings/12640c8101344cb094ab42dafce15f4e/code/wp-content/plugins/advanced-custom-fields/core/controllers/post.php on line 382 Warning: in_array() expects parameter 2 to be array, string given in /srv/bindings/12640c8101344cb094ab42dafce15f4e/code/wp-content/plugins/advanced-custom-fields/core/controllers/post.php on line 386 Warning: in_array() expects parameter 2 to be array, string given in /srv/bindings/12640c8101344cb094ab42dafce15f4e/code/wp-content/plugins/advanced-custom-fields/core/controllers/post.php

  • FYI, I now have missing custom field occurring elsewhere. These are brand new fields that should not have conflicts with previous information. One field in the group shows, the second does not. <scratches head in utter bewilderment>

  • /FACEPALM

    The troubles were stemming from the staging site having older ACF plugins for Repeater and Video and other features. Local was using ACF Pro which had been uploaded to the server, but not activated. No wonder the Flexible Content fields were causing problems.

    Thanks for your time and verifying that the code wasn’t in error. Much obliged!

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

You must be logged in to reply to this topic.