Support » Plugin: Pardot » Fatal Error PHP7.2 ,WordPress 4.9.4, Pardot 1.4.5, IIS10.0

  • Resolved jimcin

    (@jimcin)


    Hi,

    I am currently migrating our websites from PHP5.6.3 to PHP7.2

    We are hosting our website on our IIS Servers,

    We are using WordPress 4.9.4, and Pardot 1.4.5.

    I did tried to deactivate all plugins, and put the default WP theme, and issue still occurs.

    I can’t see all options on the settings of the pardot plugin, and I have Fatal error on my logs:

    [16-Mar-2018 19:02:27 UTC] PHP Recoverable fatal error: Object of class stdClass could not be converted to string in E:\Web\XXX\wp-includes\formatting.php on line 1045 [16-Mar-2018 19:02:36 UTC] PHP Recoverable fatal error: Object of class stdClass could not be converted to string in E:\Web\XXX\wp-content\plugins\pardot\includes\pardot-plugin-class.php on line 656 [16-Mar-2018 19:03:28 UTC] PHP Recoverable fatal error: Object of class stdClass could not be converted to string in E:\Web\XXX\wp-includes\formatting.php on line 1045

    Thank you for your help.

Viewing 15 replies - 1 through 15 (of 23 total)
  • Plugin Author Barry

    (@barryhughes-1)

    Thanks @jimcin — we’re looking at this and will keep you updated.

    Plugin Author Barry

    (@barryhughes-1)

    Right off the bat we’re having some problems replicating this (even under PHP 7.2).

    What other plugins are currently running (and what theme are you using)? Is it possible for you to establish a staging site running only the Pardot plugin, to see if the problem occurs there with no other factors such as third party plugins?

    Thank you,

    I did deactivating all plugins and using default twentyseventeen theme and still had the issue.

    Are you running on IIS or Apache/NginX ? Although I don’t think the server is the problem, it’s better to have the exact same state as we have, and we are using IIS 10.0 on Windows Server 2016.

    I am tying to create a new instance from scratch, and will add only the Pardot plugin to check.

    Thank you

    Plugin Author Barry

    (@barryhughes-1)

    Though not impossible, I’d also be surprised if the server was a factor. On my end, testing was performed using Nginx.

    OK, so apparently, issue comes from your “Campaign (for Tracking Code)” variable,

    you pass it as an Integer (Int), that cannot be cast through the wp_check_invalid_utf8 function in wp-includes/formatting.php

    $string = (string) $string;

    Not sure if you need to change your code to pass the campaign code as a string, or if this is a special issue because I am using a database collation “utf8 – default collation” ?

    Hope this helps,

    thanks for your help.

    Additional info:

    in your pardot-settings-class.php -> function campaign_field() :
    The following part
    if ( isset($data->name) ) {
    $campaign_name = esc_html( $data->name );
    }

    is breaking, because your campaign object cannot be converted into array of string, is that correct?

    I don’t know why there isn’t more people with the issue. So I’m wondering if this could be cause by a missing module in php.ini.

    thanks for your help.

    any updates?

    Plugin Author Barry

    (@barryhughes-1)

    We have a fix in progress, please stay tuned while we complete that work and testing on the same.

    Thanks for your patience so far!

    Plugin Author Barry

    (@barryhughes-1)

    1.4.6 is now available. Please try updating and let us know if it helps to resolve this issue 🙂

    Hi, thank you,

    I did update the plugin, and also tried deleting the folder and copy it again. As well as clearing the cache ans settings.

    I am able now to see the plugin fields, but I still have a fatal error. I look like it’s coming from another file/line:

    [04-Apr-2018 20:22:00 UTC] PHP Recoverable fatal error: Object of class stdClass could not be converted to string in E:\Web\xxx\wp-content\plugins\pardot\includes\pardot-template-tags.php on line 97

    Thank you

    Plugin Author Barry

    (@barryhughes-1)

    @jimcin,

    I’m sorry to hear that — of course we will look into this right away.

    Can you confirm I’m correct in thinking you are experiencing this on the frontend of the site?

    I also appreciate you taking the time to clear your Pardot cache and settings; that was definitely worthwhile and I certainly don’t want to waste your time here but can I ask that A) you try that again and that B) if you are using a caching plugin/having object caching enabled on your site you additional clear the cache at that level?

    right,

    On the backend admin, I am able to see the campaign, api version and use HTTPS? and buttons that were previsouly hidden.

    On the Frontdend, it’s breaking my site (menu not displayed, and some other parts of the website).

    A) I just tried again, and got the same issue.

    B) Not using a caching plugin, and tried with parameter at the end of the url to force load new version as well as private browsing, but issue still present

    Thanks for your time

    Plugin Author Barry

    (@barryhughes-1)

    I appreciate the notes. As a short term measure only, to eliminate the breakages, you could make use of the following snippet:

    add_action( 'init', function() {
        if ( class_exists( 'Pardot_Plugin' ) ) {
            remove_action( 'wp_footer', [ Pardot_Plugin::self(), 'wp_footer' ] );
        }
    }, 20 );

    This could be added either to a custom plugin (preferred) or else to your theme’s functions.php file.

    This should eliminate the breakages you are seeing, though it will also stop Pardot from tracking things properly.

    To help us get to the bottom of this more quickly, would you be down to email me directly? That would make it safer to share details such as your site URL and we might be able to get a handle on this a little more quickly. If you’re happy to do this, please don’t hesitate to reach out at barry [at] tri [dot] be.

    That’s fine, I don’t need to add the snippet as the error is not on production (which is still in PHP 5.6.x),

    it is only on our new PHP7.2 testing environment, which will go live once we tested everything with this new config; which is not accessible from the outside anyway, so you won’t be able to reach it.

    Thanks though

    Plugin Author Barry

    (@barryhughes-1)

    Good to hear! We’ll keep digging into this and will let you know the outcome.

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘Fatal Error PHP7.2 ,WordPress 4.9.4, Pardot 1.4.5, IIS10.0’ is closed to new replies.