Banner Logo

Be a part of the family: Connect, Receive Support,
Contribute, and Reap Abundant Rewards

AFM throwing a PHP exception

WCMp Advanced Frontend Manager

Resolved
Viewing 9 reply threads
  • Author
    Posts
    • #133538
      WLS_FH
      Participant

      Hi we noticed the following on our debug.log

      [24-Jan-2022 10:15:46 UTC] PHP Notice: Undefined index: wp-embed in /wp-content/plugins/wcmp-frontend_product_manager/classes/class-wcmp-afm-frontend.php on line 36
      [24-Jan-2022 10:15:46 UTC] PHP Notice: Trying to get property ‘src’ of non-object in /wp-content/plugins/wcmp-frontend_product_manager/classes/class-wcmp-afm-frontend.php on line 36

      The property throwing this error in class-wcmp-afm-frontend.php is:
      $src = $wp_scripts->registered[$handle]->src;

      Have you got any idea?
      Thanks

    • #133543
      WLS_FH
      Participant

      This one too

      [24-Jan-2022 11:17:21 UTC] PHP Warning: preg_replace(): Compilation failed: missing terminating ] for character class at offset 107 in /wp-content/plugins/wcmp-frontend_product_manager/classes/class-wcmp-afm.php on line 316
      [24-Jan-2022 11:17:21 UTC] PHP Warning: preg_replace(): Compilation failed: missing terminating ] for character class at offset 107 in /wp-content/plugins/wcmp-frontend_product_manager/classes/class-wcmp-afm.php on line 317

      Properties throwing errors

      $request_link = preg_replace($pattern, ”, $request_link);
      $dashboard_link = preg_replace($pattern, ”, $dashboard_link);

    • #133557

      Hi,
      We are not getting this error on our end.
      Kindly explain how you are recreating the issue, so that we can assist you further.

    • #133570
      WLS_FH
      Participant

      Hi

      I don’t normally edit inside function.php but I use snippet plugin.
      The plugin is telling me there’s a syntax error therefore it won’t be saved.

      I then copied your code at https://phpcodechecker.com/ and it is throwing the same error as snippet.

      Hence, syntax is wrong.

    • #133597
      Anonymous
      Inactive

      hi,
      kindly create a staging site and share the admin, FTP access of that site, so we can debug there.
      While sharing the access, don’t forget to mark the response as private.

      Also, please share the code which you have tested for which you have got the syntax error.

    • #133694
      WLS_FH
      Participant
      This reply has been marked as private.
    • #133715
      Anonymous
      Inactive

      hi,
      Provide us some time we are looking into it.
      Thanks

    • #133922

      @WLS_FH, as you are checking some specific file, hence that might give you an error, as this is one file only. The fields seem missing, might have been used in another template/file.

      That is why we would ask you if you are getting this error on any page or by following any flow, please do let us know. So we can recreate this. e

      • #134013
        WLS_FH
        Participant

        Hi,
        I tail -f my debug.log and noticed this is happening when you access to AFM with any vendor account after you click on product manager -> all products:

        [03-Feb-2022 15:10:49 UTC] PHP Notice: Trying to get property ‘comment_content’ of non-object in /home/stagingwp/public_html/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-ajax.php on line 1936
        [03-Feb-2022 15:10:49 UTC] PHP Notice: Trying to get property ‘comment_author’ of non-object in /home/stagingwp/public_html/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-ajax.php on line 1937
        [03-Feb-2022 15:10:49 UTC] PHP Notice: Trying to get property ‘comment_date’ of non-object in /home/stagingwp/public_html/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-ajax.php on line 1937
        [03-Feb-2022 15:10:49 UTC] PHP Notice: Trying to get property ‘comment_content’ of non-object in /home/stagingwp/public_html/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-ajax.php on line 1936
        [03-Feb-2022 15:10:49 UTC] PHP Notice: Trying to get property ‘comment_author’ of non-object in /home/stagingwp/public_html/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-ajax.php on line 1937
        [03-Feb-2022 15:10:49 UTC] PHP Notice: Trying to get property ‘comment_date’ of non-object in /home/stagingwp/public_html/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-ajax.php on line 1937
        [03-Feb-2022 15:10:49 UTC] PHP Notice: Trying to get property ‘comment_content’ of non-object in /home/stagingwp/public_html/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-ajax.php on line 1936
        [03-Feb-2022 15:10:49 UTC] PHP Notice: Trying to get property ‘comment_author’ of non-object in /home/stagingwp/public_html/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-ajax.php on line 1937
        [03-Feb-2022 15:10:49 UTC] PHP Notice: Trying to get property ‘comment_date’ of non-object in /home/stagingwp/public_html/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-ajax.php on line 1937
        [03-Feb-2022 15:10:49 UTC] PHP Notice: Trying to get property ‘comment_content’ of non-object in /home/stagingwp/public_html/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-ajax.php on line 1936
        [03-Feb-2022 15:10:49 UTC] PHP Notice: Trying to get property ‘comment_author’ of non-object in /home/stagingwp/public_html/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-ajax.php on line 1937
        [03-Feb-2022 15:10:49 UTC] PHP Notice: Trying to get property ‘comment_date’ of non-object in /home/stagingwp/public_html/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-ajax.php on line 1937
        [03-Feb-2022 15:10:49 UTC] PHP Notice: Trying to get property ‘comment_content’ of non-object in /home/stagingwp/public_html/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-ajax.php on line 1936
        [03-Feb-2022 15:10:49 UTC] PHP Notice: Trying to get property ‘comment_author’ of non-object in /home/stagingwp/public_html/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-ajax.php on line 1937
        [03-Feb-2022 15:10:49 UTC] PHP Notice: Trying to get property ‘comment_date’ of non-object in /home/stagingwp/public_html/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-ajax.php on line 1937

        This is happening after you click on ‘orders’
        [03-Feb-2022 15:16:36 UTC] PHP Notice: Undefined index: target in /home/stagingwp/public_html/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-ajax.php on line 341

    • #134064

      Hi, sorry to hear that.

      I have raised this issue, this will be fixed in our next update https://github.com/wcmarketplace/dc-woocommerce-multi-vendor/issues/1040

      • #134072
        WLS_FH
        Participant

        No worries it’s not urget.
        I saw your ticket on github but I think you missed the last issue at the bottom of the message.

        This is happening after you click on ‘orders’
        [03-Feb-2022 15:16:36 UTC] PHP Notice: Undefined index: target in /home/stagingwp/public_html/wp-content/plugins/dc-woocommerce-multi-vendor/classes/class-wcmp-ajax.php on line 341

    • #134121

      WLS_FH, thanks for the help 🙂

Viewing 9 reply threads

The topic ‘AFM throwing a PHP exception’ is closed to new replies.