I found the culprit, if you have a own field e.g. pre 5.6 like this:
class acf_field_mytheme_identifier extends acf_field_text {
function __construct()
{
// vars
$this->name = 'mytheme_identifier';
$this->label = MyTheme::_("Identifier");
$this->category = 'choice';
$this->defaults = array(
'default_value' => "",
'maxlength' => '',
'placeholder' => '',
'prepend' => '',
'append' => '',
'readonly' => true,
'disabled' => 0,
);
acf_field::__construct();
}
it must be now
class acf_field_mytheme_identifier extends acf_field_text {
function initialize()
...
}
No construct anumore
What on earth, even the Add Group is affected, see attached screenshot.
I did a fresh WordPress installation, same bug.
To me this is getting critical point, since all sites are updating to latest version slowyly, all sites ceases functioning in a while.
Downgrading to 5.5.14 works. I hope you could find this bug, it’s a show stopper for me. I can’t upgrade my countless sites if this is not found.
ACF 5.3.2.2, WPML 3.3.3
It is not copying the custom fields, e.g. flexible layout fields (which I use massively) so WPML “copy from” is rather useless for ACF.
Yes I think this problem is WPML’s problem, they are just custom fields… but I don’t think WPML team cares about this.
Did you try the WP_DEBUG? Because to me there was a some other plugin throwing Notice/Warning in the AJAX call and thus the JSON response which shows the results was corrupted.
You can put WP_DEBUG true, and check from Chrome developer tool’s network tab the ajax calls, and see if their results look normal or not.
Problem still persists, translation of “Text” tab in Finnish is “Teksti [ Nimi Tekstieditori välilehdelle (aiemmin HTML) ]” it should be just “Teksti”
This line $post_id === false
does not work anymore, one must do it like this: get_post_status($post_id) === 'auto-draft'
I purchased the v5, this was fixed in ACF pro v5. New option in ACF pro v5 is called “block”.
Thank you!
It only fails when WP_DEBUG is True. “Notice: like_escape is deprecated.” So it seems like somewhere in ajax handler there is like_escape call that is deprecated in WP 4.0.
Problematic for me too.
It works just fine, though “sharing the modules” is pain since all flexible layout “modules” (I call them blocks) are not easily thrown to different Custom Field group.
Thus I have single Custom Field Group with one field, the Flexible Layout Field with all of my blocks.
I use these theme files:
Layout.php
<?php
if (have_rows('layout_blocks')) {
while (have_rows('layout_blocks')) {
the_row();
echo get_template_part("block", get_row_layout());
}
}?>
include the layout.php on each page I need to, and then I simply have for each module or a block an own PHP file like:
block-header-left.php
<section class="header-left page-wrapper">
<div class="container">
<h1><?php the_sub_field('title'); ?></h1>
<div class="content"><?php the_sub_field('content'); ?></div>
<div class="clear"></div>
</div>
</section>
Fetch data etc on each block as you would normally in PHP files.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.