• Hi All!

    I have a really big issue with mailpoet and ACF, if i activate Mailpoet in every website where i use ACF i get an error with ACF, specifically i get:

    Fatal error: Uncaught Error: Object of class WP_Block_Template could not be converted to string in /home/yyy/web/xxx/public_html/wp-includes/formatting.php:1096 Stack trace: #0 /home/yyy/web/xxx/public_html/wp-includes/formatting.php(4655): wp_check_invalid_utf8() #1 /home/yyy/web/xxx/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/acf-input-functions.php(451): esc_html() #2 /home/yyy/web/xxx/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/acf-input-functions.php(436): acf_walk_select_input() #3 /home/yyy/web/xxx/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/acf-input-functions.php(402): acf_walk_select_input() #4 /home/yyy/web/xxx/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/acf-input-functions.php(382): acf_get_select_input() #5 /home/yyy/web/xxx/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-select.php(316): acf_select_input() #6 /home/yyy/web/xxx/public_html/wp-includes/class-wp-hook.php(324): acf_field_select->render_field() #7 /home/yyy/web/xxx/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #8 /home/yyy/web/xxx/public_html/wp-includes/plugin.php(565): WP_Hook->do_action() #9 /home/yyy/web/xxx/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/acf-hook-functions.php(113): do_action_ref_array() #10 /home/yyy/web/xxx/public_html/wp-includes/class-wp-hook.php(324): _acf_apply_hook_variations() #11 /home/yyy/web/xxx/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #12 /home/yyy/web/xxx/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #13 /home/yyy/web/xxx/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/acf-field-functions.php(807): do_action() #14 /home/yyy/web/xxx/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/admin/views/acf-field-group/location-rule.php(65): acf_render_field() #15 /home/yyy/web/xxx/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/api/api-helpers.php(350): include('…') #16 /home/yyy/web/xxx/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/admin/views/acf-field-group/location-group.php(18): acf_get_view() #17 /home/yyy/web/xxx/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/api/api-helpers.php(350): include('…') #18 /home/yyy/web/xxx/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/admin/views/acf-field-group/locations.php(25): acf_get_view() #19 /home/yyy/web/xxx/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/api/api-helpers.php(350): include('…') #20 /home/yyy/web/xxx/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/admin/views/acf-field-group/options.php(74): acf_get_view() #21 /home/yyy/web/xxx/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/api/api-helpers.php(350): include('…') #22 /home/yyy/web/xxx/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/admin/post-types/admin-field-group.php(435): acf_get_view() #23 /home/yyy/web/xxx/public_html/wp-admin/includes/template.php(1456): acf_admin_field_group->mb_options() #24 /home/yyy/web/xxx/public_html/wp-admin/edit-form-advanced.php(722): do_meta_boxes() #25 /home/yyy/web/xxx/public_html/wp-admin/post.php(206): require('…') #26 {main} thrown in /home/yyy/web/xxx/public_html/wp-includes/formatting.php on line 1096

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Ján Mikláš

    (@neosinner)

    Hi @tusca,

    I see no mention of MailPoet code in that error, and just by installing ACF with MailPoet I don’t see such an error on my website.

    1. Can you please provide steps to reliably reproduce this error, or better yet, share a test website where we can see the error?
    2. Are you using any specific hosting for all your websites and if so, can you try replicating the issue on any other hosting?
    Thread Starter tusca

    (@tusca)

    Hi Ján, so the problem occurs only when i install and activate mailpoet, i’m using a custom built theme.

    Using php 8.1 on the server, and some others plugin like wpml, wpml seo and wpml string and contact form 7 + multilingual

    Specific hosting no, i’m using a proprietary vps with latest cpanel installed, the problem occurs also in my dev server hestiacp.

    The steps are simple, wp installation + the plugins that i’ve mentioned, try to create some custom fields in ACF and then install mailpoet, the custom fields are getting an error inside the field settings, where you can choose which template the field should appear.

    Plugin Author Ján Mikláš

    (@neosinner)

    @tusca MailPoet doesn’t officially support WMPL (nor do I have it purchased to test it out), so there might be a conflict that we are not aware.

    I followed your steps (without WMPL) and can’t replicate the issue locally. Can you please check this plugin conflict guide to determine if just the combination of ACF and MailPoet is causing the problem on your side or if there is another plugin that might be causing this in combination with MailPoet?

    Thread Starter tusca

    (@tusca)

    I have no other plugins other than the ones i’ve mentioned.

    I had a problem some years ago with mailpoet and cookiebot, so i have ditched cookiebot, but the problem was occuring only when i activate mailpoet, cookiebot had no problem.

    Now i think that i should ditch mailpoet, i have 18 website with the combination of mailpoet premium, wpml and acf and i can’t uninstall wpml, the problem was inexistent since january.

    Thread Starter tusca

    (@tusca)

    @neosinner i have tried the troubleshooting mode, activeting only mailpoet and acf i have the same error in acf, can’t assign the custom field to a template

    Thread Starter tusca

    (@tusca)

    @neosinner forget to say that i’m using the default 2024 wp template

    Thread Starter tusca

    (@tusca)

    Plugin Author Ján Mikláš

    (@neosinner)

    the problem was inexistent since january.

    @tusca do you remember which MailPoet version started causing the issue? If not, could you please test previous versions to see when the issue disappears?

    If we can narrow that down to a specific version, I can take a look at what changed in that version, which can help find the issue.

    activeting only mailpoet and acf i have the same error in acf, can’t assign the custom field to a template

    It would really help if you could provide exact steps to reproduce the issue. E.g.,

    1. Clean WordPress installation.
    2. Install and activate ACF.
    3. Install and activate MailPoet.
    4. Add custom field by doing X > Y > Z.
    5. Observe the issue on page X.

    If you can provide steps like this to replicate the issue on any webhosting, that would improve the chances of fixing the issue.

    Thread Starter tusca

    (@tusca)

    @neosinner I’ve done what you’ve requested: in a website where do i have the problem i installed the troubleshooting tool, in the troubleshooting mode i have installed the default 2024 wp template, activated ACF and amilpoet plugins, and if i go inside an ACF custom field in the ACF settings i get the error. So i think that installing wp with a default theme and install acf, create a custom field applied to a custom template and then activating mailpoet could reproduce the issue.

    I don’t remember the mailpoet version i think that the 5.6 was still working, i can try a downgrade

    Thread Starter tusca

    (@tusca)

    @neosinner i’ve seen the new version with the fix, trying to do the upgrade

    • Improved: Apply get_the_excerpt filter to MailPoets post excerpts;
    • Fixed: conflict with Rank Math plugin breaking “Scheduled Actions” page.
    Thread Starter tusca

    (@tusca)

    @neosinner so i have another website with a non updated version of mailpoet, with the version 5.6.3 i don’t get the error in ACF (6.3.12).

    In every message i refer to the latest version of ACF (6.3.12 now)

    Upgrading the mailpoet versione in this website (5.6.3->5.7.1) i don’t get any error, this website does not have WPML!

    Deactivating WPML in the developing website the problem doesn’t exists with ACF and Mailpoet.

    So Mailpoet is having trouble with WPML. I need a solution for this or i need to change my newsletter system for 8 website bc this website have wpml installed.

    • This reply was modified 1 year, 2 months ago by tusca.
    Plugin Author Ján Mikláš

    (@neosinner)

    @tusca, I went ahead and got WPML, and while I haven’t experienced your issue, I have come across different ones. Unfortunately, that likely means that there are more conflicts between MailPoet and WPML (and its accompanying plugins for SEO or WooCommerce). As MailPoet doesn’t officially support multilingual plugins, we won’t be able to fix these issues in the short term.

    Thread Starter tusca

    (@tusca)

    Hi @neosinner
    So i need to find a mailpoet alternative, hope that in future the plugin will support multilanguage, at least not getting errors if wpml it’s installed

    Plugin Author Ján Mikláš

    (@neosinner)

    Thanks for using MailPoet all this time, @tusca. I do understand that with WPML being a requirement for you, the errors you experience are preventing you from continuing with MailPoet.

    I’d suggest giving a vote to adding a WPML to MailPoet in our feedback board: https://mailpoet.canny.io/feature-requests/p/wpml-support-please

    I actually just ran into this error. I confirmed it’s happening on a brand new installation of WordPress with the only plugins installed and activated being ACF and MailPoet.

    Steps to reproduce:

    1) New WordPress 6.8.1 install
    2) Install and activate Mailpoet 5.12.7
    3) Install and activate Advanced Custom Fields 6.4.2
    4) Create a Field Group in ACF
    5) Attempt to set the Location Rules to “Show this field group if [Post Template]”

    It will result in the following error:

    Fatal error: Uncaught Error: Object of class WP_Block_Template could not be converted to string in /wp-includes/formatting.php:1096

    Stack trace:
    #0 /wp-includes/formatting.php(4664): wp_check_invalid_utf8(Object(WP_Block_Template))
    #1 /wp-content/plugins/advanced-custom-fields/includes/acf-input-functions.php(451): esc_html(Object(WP_Block_Template))
    #2 /wp-content/plugins/advanced-custom-fields/includes/acf-input-functions.php(436): acf_walk_select_input(Array, Array, 1)
    #3 /wp-content/plugins/advanced-custom-fields/includes/acf-input-functions.php(402): acf_walk_select_input(Array, Array)
    #4 /wp-content/plugins/advanced-custom-fields/includes/acf-input-functions.php(382): acf_get_select_input(Array)
    #5 /wp-content/plugins/advanced-custom-fields/includes/fields/class-acf-field-select.php(319): acf_select_input(Array)
    #6 /wp-includes/class-wp-hook.php(324): acf_field_select->render_field(Array)
    #7 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
    #8 /wp-includes/plugin.php(565): WP_Hook->do_action(Array)
    #9 /wp-content/plugins/advanced-custom-fields/includes/acf-hook-functions.php(113): do_action_ref_array('acf/render_fiel…', Array)
    #10 /wp-includes/class-wp-hook.php(324): _acf_apply_hook_variations(Array)
    #11 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
    #12 /wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #13 /wp-content/plugins/advanced-custom-fields/includes/acf-field-functions.php(807): do_action('acf/render_fiel…', Array)
    #14 /wp-content/plugins/advanced-custom-fields/includes/admin/views/acf-field-group/location-rule.php(65): acf_render_field(Array)
    #15 /wp-content/plugins/advanced-custom-fields/includes/api/api-helpers.php(350): include('/Users/…')
    #16 /wp-content/plugins/advanced-custom-fields/includes/admin/views/acf-field-group/location-group.php(18): acf_get_view('/Users/…', Array)
    #17 /wp-content/plugins/advanced-custom-fields/includes/api/api-helpers.php(350): include('/Users/…')
    #18 /wp-content/plugins/advanced-custom-fields/includes/admin/views/acf-field-group/locations.php(25): acf_get_view('/Users/…', Array)
    #19 /wp-content/plugins/advanced-custom-fields/includes/api/api-helpers.php(350): include('/Users/…')
    #20 /wp-content/plugins/advanced-custom-fields/includes/admin/views/acf-field-group/options.php(74): acf_get_view('/Users/…')
    #21 /wp-content/plugins/advanced-custom-fields/includes/api/api-helpers.php(350): include('/Users/…')
    #22 /wp-content/plugins/advanced-custom-fields/includes/admin/post-types/admin-field-group.php(435): acf_get_view('/Users/…')
    #23 /wp-admin/includes/template.php(1456): acf_admin_field_group->mb_options(Object(WP_Post), Array)
    #24 /wp-admin/edit-form-advanced.php(721): do_meta_boxes(Object(WP_Screen), 'normal', Object(WP_Post))
    #25 /wp-admin/post.php(206): require('/Users/…')
    #26 /server.php(167): require('/Users/…')
    #27 {main} thrown in /wp-includes/formatting.php on line 1096

    Only stuff I cleaned up in that stack trace was removing the first part of home directory path and my server path.

    Once I deactivate MailPoet, I can refresh the Field Group view and it loads correctly.

    • This reply was modified 10 months, 1 week ago by nbltnow.
Viewing 15 replies - 1 through 15 (of 17 total)

The topic ‘Mailpoet error with ACF’ is closed to new replies.