• Resolved katsepatessera

    (@katsepatessera)


    Hello,

    i have your plugin (PRO version) and as i was trying to display a ACF via shortcode i got the following error:

    Fatal error: Uncaught Error: Object of class WP_Post could not be converted to string in /home/filters4/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/api/api-template.php:902 Stack trace: #0 /home/filters4/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/api/api-template.php(902): implode(‘, ‘, Array) #1 /home/filters4/public_html/wp-includes/shortcodes.php(355): acf_shortcode(Array, ”, ‘acf’) #2 [internal function]: do_shortcode_tag(Array) #3 /home/filters4/public_html/wp-includes/shortcodes.php(227): preg_replace_callback(‘/\\[(\\[?)(acf)(?…’, ‘do_shortcode_ta…’, ‘[acf field=”rel…’) #4 /home/filters4/public_html/wp-includes/class-wp-hook.php(310): do_shortcode(‘[acf field=”rel…’) #5 /home/filters4/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(‘[acf field=”rel…’, Array) #6 /home/filters4/public_html/wp-content/plugins/elementor/includes/base/widget-base.php(423): apply_filters(‘widget_text’, ‘[acf field=”rel…’, Array) #7 /home/filters4/public_html/wp-c in?/home/filters4/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/api/api-template.php?on line?902

    how do i solve this???

    thank u

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @katsepatessera

    ACF Support Team here. This forum is generally used by ACF users helping 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 katsepatessera

    (@katsepatessera)

    Ok, i made a ticket on this issue.

    I am trying to display in the front end a relationship field and as i undersand i can only display it via shortcode. (There is no option from the elementor text editor ACF data)

    When i put the shortcode i get this error.

    Can u suggest me an another way to display the relationship field in the front end?

    Thank you

    Hi there!

    ACF Support Team here, Thanks for reaching out with your query we would be happy to assist.

    I am afraid ACF shortcode at the moment only supports text based fields and not complex fields like relationship field.

    Could you please create a ticket using our ?support form so that we can advise you further?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Uncaught Error: Object of class WP_Post could not be converted to string’ is closed to new replies.