• Resolved rupeshjorkar

    (@rupeshjorkar)


    Dear Support Team,

    I hope this message finds you well. I am encountering a critical error on my WordPress website related to the “Open Graph and Twitter Card Tags” plugin.

    I am reaching out to request detailed assistance and generate a support ticket for this issue.

    Error Details:
    Error Type: PHP Fatal error
    Error Message: Uncaught TypeError: preg_replace(): Argument #3 ($subject) must be of type array|string, WP_Error given in /var/www/html/wp-includes/formatting.php:5396
    Stack Trace: [26-Jul-2023 06:17:36 UTC] PHP Fatal error: Uncaught TypeError: preg_replace(): Argument #3 ($subject) must be of type array|string, WP_Error given in /var/www/html/wp-includes/formatting.php:5396
    Stack trace:
    #0 /var/www/html/wp-includes/formatting.php(5396): preg_replace()
    #1 /var/www/html/wp-content/plugins/wonderm00ns-simple-facebook-open-graph-tags/public/class-webdados-fb-open-graph-public.php(468): wp_strip_all_tags()
    #2 /var/www/html/wp-includes/class-wp-hook.php(307): Webdados_FB_Public->insert_meta_tags()
    #3 /var/www/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #4 /var/www/html/wp-includes/plugin.php(474): WP_Hook->do_action()
    #5 /var/www/html/wp-includes/general-template.php(3042): do_action()
    #6 /var/www/html/wp-content/themes/experience-engine-v2/header.php(100): wp_head()
    #7 /var/www/html/wp-includes/template.php(770): require_once(‘…’)
    #8 /var/www/html/wp-includes/template.php(716): load_template()
    #9 /var/www/html/wp-includes/general-template.php(48): locate_template() #10 /var/www/html/wp-content/themes/experience-engine-v2/category.php(3): get_header()
    #11 /var/www/html/wp-includes/template-loader.php(106): include(‘…’)
    #12 /var/www/html/wp-blog-header.php(19): require_once(‘…’)
    #13 /var/www/html/index.php(17): require(‘…’)
    #14 {main}
    thrown in /var/www/html/wp-includes/formatting.php on line 5396

    Problematic Code:
    File: /wordpress/wp-content/plugins/wonderm00ns-simple-facebook-open-graph-tags/public/class-webdados-fb-open-graph-public.php
    Line Number: 287
    Code Snippet: $fb_url = get_term_link( $term, $term->taxonomy );

    WordPress Version: 6.1.3
    Plugin Version: 3.1.2

    Context: This error seems to be related to generating an URL based on a term in the plugin. However, the specific issue with the data being passed to the preg_replace() function in “formatting.php” is not clear to me.
    Additional Information: I have not made any recent changes to the plugin or my WordPress installation before encountering this error.

    I kindly request your expertise and support to resolve this issue as soon as possible, as it is affecting the functionality of my website.

    Please let me know if you require any further information or if there are any troubleshooting steps I can perform from my end to help identify the problem.
    Thank you for your prompt attention to this matter.

    Thank you in advance

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Hi @rupeshjorkar

    I hope you are doing well.

    Let me reproduce this issue on our staging websites and get back to you soon with updates.

    Thanks and regards,
    Support Team – WPExperts  

    Thread Starter rupeshjorkar

    (@rupeshjorkar)

    Hello Support team,

    No problem at all!

    Please go ahead and reproduce the issue on your staging websites. Once you’ve done that, please update me with the details and any relevant information you can gather. This will help me better understand the problem and provide you with the most appropriate assistance.

    If you have any questions or need further clarification, feel free to ask. I’m here to assist you.

    Thanks and regards,
    Rupesh Jorkar

    @rupeshjorkar

    I didn’t get any errors on my staging websites. You are using an older version of the plugin and WordPress; please update your WordPress and plugin, test it, and let me know.

    Thanks and regards,
    Support Team – WPExperts  

    Thread Starter rupeshjorkar

    (@rupeshjorkar)

    Hello Support team,

    Thank you for this update. let me upgrade plugin version and come to you if required.

    Thanks,
    Rupesh Jorkar

    @rupeshjorkar

    Sure, Thanks

    Thread Starter rupeshjorkar

    (@rupeshjorkar)

    Hello Support Team,

    I wanted to provide an update on the situation after following your previous suggestion to update the plugin. Regrettably, the issue I initially reported is still persistent.

    Upon further investigation, I’ve identified a specific aspect of the problem. It appears that the $term variable is not being adequately safeguarded against having a null value in certain cases. Here are the details:

    Problematic Code:
    File: /wordpress/wp-content/plugins/wonderm00ns-simple-facebook-open-graph-tags/public/class-webdados-fb-open-graph-public.php
    Line Number: 287
    Code: $fb_url = get_term_link( $term, $term->taxonomy );

    Solution:
    To prevent potential null value issues, it’s recommended to wrap the code snippet within an if condition:
    if ( $term ) {
    $fb_url = get_term_link( $term, $term->taxonomy );
    }

    I understand that addressing code-related matters can be intricate, but I believe that this adjustment could significantly contribute to resolving the issue and we received this resolving issue in next version

    Thank you for your understanding and support.
    Rupesh Jorkar

    smakazmi15

    (@smakazmi15)

    Hi @rupeshjorkar,

    I hope you are doing well.

    Please provide us your staging so we can test few things and get back to you with a solution.

    Thanks and regards,
    Support Team – WPExperts

    Thread Starter rupeshjorkar

    (@rupeshjorkar)

    Hello Support Team,

    I understand your request to access the staging environment for testing purposes. However, due to security and privacy concerns, sharing the staging URL is not possible. Instead, we can go with the following options

    1) Screen sharing using Zoom/Skype/Microsoft-Team or any other video call platform
    2) Sharing screenshots

    Moreover, I’d like to bring to your attention that we’ve already provided a potential solution. We kindly request you to review it and contemplate its inclusion or modification in your upcoming plugin version.

    Feel free to choose the option that works best for you, and we’ll proceed accordingly.

    Thank you for your understanding and support,
    Rupesh Jorkar

    Hi @rupeshjorkar,

    I hope you are doing well.

    We have fixed the issue. You can download the beta version and test it. Still is there anything we can help you with Do let us know?

    Thanks and regards,
    Support Team – WPExperts

    Thread Starter rupeshjorkar

    (@rupeshjorkar)

    Hello Support Team,

    Thank you for your message and the update regarding the beta version.

    However, I wanted to inform you that we won’t be able to use this beta version on our server because of some existing configurations that are managed using Composer, as well as the fact that plugins are managed using Composer.

    We believe that we will receive the next version with these changes soon, and we are eagerly awaiting this update.

    Best regards,
    Rupesh Jorkar

    Hi @rupeshjorkar,

    I hope you are doing well.

    We will keep you updated with the latest version release.

    Thanks and regards,
    Support Team – WPExperts

    @rupeshjorkar

    We have fixed this issue in our Beta version; please download it from here, test it, and let me know.

    Thanks and regards,
    Support Team – WPExperts  

    We have fixed the issue in version 3.3.2. Please update the plugin and notify us if there are any further issues.

    Thanks and regards,
    Support Team – WPExperts  

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