• Resolved l1z0b

    (@l1z0b)


    Hi there,

    I’m experiencing an issue with the ACF shortcode no longer working for the fields in a specific custom post type on my WordPress site. Up until a few months ago, the following shortcode worked fine, but now it doesn’t display anything:

    [acf field=”menu_della_settimana_lunedi_pranzo” post_id=”3804″]

    Here are some additional details about my setup:

    • I have created a custom post type called “menu” using the CPT UI plugin.
    • The field group “menu_della_settimana” is assigned only to this custom post type.
    • The specific field I want to display is a WYSIWYG editor with the field name “lunedi_pranzo”, and it’s part of the group “menu_della_settimana” but I noticed that even other types of fields won’t display
    • I’m trying to display this field for a post with ID 3804
    • I’m using ACF version 6.3.6

    I’ve already tried the following steps:

    1. Verified that the post ID is correct.
    2. Checked that the WYSIWYG field contains content.
    3. Disabled other plugins to rule out conflicts.
    4. Tried modifying the shortcode syntax and even called the field directly using PHP <?php echo get_field('lunedi_pranzo', 3804); ?> , but that also didn’t work.
    5. Activated the shortcodes using the following code in the file functions.php of my website:
      add_action( 'acf/init', 'set_acf_settings' );
      function set_acf_settings() {
      acf_update_setting( 'enable_shortcode', true );
      }

    Can you please help me troubleshoot this issue? Any insights would be greatly appreciated!

    • This topic was modified 2 months, 3 weeks ago by l1z0b.
Viewing 15 replies - 1 through 15 (of 17 total)
  • +1

    +1 Exactly the same here, no error or other indication, just everything empty when trying to use even the simplest shortcode in some plain Gutenberg block. Started initially with a fresh install of 6.3.6. Testwise tried a downgrade to 6.3.5 – suddenly everything works as expected – back to 6.3.6 – broken.

    Strange enough in other similar environments meanwhile arrived at the same version (6.3.6) the thing is still working as it used to – but those installations have come a longer path from potentially initially older versions of ACF.

    +1

    I’ve created a new site, modelled off an existing one with the same ACF settings, fields, plugins, etc. For some reason, ACF shortcodes will not work on the new site, which has had 6.3.6 from the very beginning (i.e. no rollback option for me to test 6.3.5). I’ve enabled ACF shortcodes in functions.php and tried every other sort of snippet relating to enabling shortcodes there is. Nothing works. Standard shortcodes work, ACF ones do not.

    I just changed to 6.3.5 and everything works now. I’m no expert but it seems to be a bug with shortcode enabling/registration in 6.3.6. I’ll wait for the next version before I upgrade again.

    Hi @l1z0b

    ACF Support Team here. This forum is generally used by ACF users to help each other out. 

    However, we would love to continue investigating and troubleshooting this issue, please can you create a ticket using our ?support form and we can look into it further.

    Thread Starter l1z0b

    (@l1z0b)

    Thank you @acfsupport I opened a ticket on your support form, same content of this one and same title

    dccs52

    (@dccs52)

    Can also confirm 6.3.6 has a bug for shortcode rendering, 6.3.5 works fine.

    Still can’t update as this bug is still there in 6.3.6.1

    +1 6.3.8 and shortcodes are not working for me in wp bakery. However, the acf widget is working.

    So who fixes this now, SCF or ACF? Both? New version of ACF that is required to continue with the original probably hasn’t fixed it (an issue because only the latest version is provided for download), and I get the sense that SCF probably won’t fix this for a while with everything going on. So I’ll just leave ACF 6.5.3 on the sites… Quite ironic, given the security talk. I’ll look to report a bug over at ACF website.

    @jason9j I was planning to do the same thing and report to ACF. If you do could you update this ticket. I will do the same thing. And yes the irony was not lost on me either

    +1.

    i switched back to 6.3.5 and shortcodes in CUSTOM POST TEMPLATE only work when i do this in the functions.php:

    add_filter('acf/shortcode/allow_in_block_themes_outside_content', '__return_true');

    add_action( 'acf/init', 'set_acf_settings' );
    function set_acf_settings() {
    acf_update_setting( 'enable_shortcode', true );
    }

    This worked for me….

    function force_acf_shortcode($atts) {
    $value = apply_filters('acf/format_value', get_field($atts['field'], $atts['post_id']));
    return $value;
    }
    add_shortcode('acf', 'force_acf_shortcode');

    has anyone got this working with any of the latest update using either SCF or ACF?

    I haven’t had the time to address this during the last couple of weeks. But I too need to get it sorted so I guess it’s ticket time. Makes sense to stick with ACF for this plugin.

Viewing 15 replies - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.