Fatal Php Error caused by the Swatch plugin

This topic has 5 replies, 2 voices, and was last updated 1 years ago ago by Rose Tyler

  • Avatar: jimmy
    jimmy
    Participant
    November 13, 2023 at 15:25

    Hi,

    I got an error every time I tried to open a product editing page, for example: https://www.peilishop.com/wp-admin/post.php?post=61679&action=edit, below the error message:

    Line 2349
    Message Uncaught TypeError: mysqli::real_connect(): Argument #5 ($port) must be of type ?int, string given in /home/612627.cloudwaysapps.com/eerwjyhrug/public_html/wp-includes/class-wpdb.php:2349 Stack trace: #0 [internal function]: mysqli->real_connect() #1 /home/612627.cloudwaysapps.com/eerwjyhrug/public_html/wp-includes/class-wpdb.php(2349): mysqli_query() #2 /home/612627.cloudwaysapps.com/eerwjyhrug/public_html/wp-includes/class-wpdb.php(2263): wpdb->_do_query() #3 /home/612627.cloudwaysapps.com/eerwjyhrug/public_html/wp-includes/class-wpdb.php(3107): wpdb->query() #4 /home/612627.cloudwaysapps.com/eerwjyhrug/public_html/wp-admin/includes/template.php(720): wpdb->get_col() #5 /home/612627.cloudwaysapps.com/eerwjyhrug/public_html/wp-admin/includes/meta-boxes.php(825): meta_form() #6 /home/612627.cloudwaysapps.com/eerwjyhrug/public_html/wp-admin/includes/template.php(1456): post_custom_meta_box() #7 /home/612627.cloudwaysapps.com/eerwjyhrug/public_html/wp-admin/edit-form-advanced.php(714): do_meta_boxes() #8 /home/612627.cloudwaysapps.com/eerwjyhrug/public_html/wp-admin/post.php(206): require(‘/home/612627.cl…’) #9 {main} thrown
    File /home/612627.cloudwaysapps.com/eerwjyhrug/public_html/wp-includes/class-wpdb.php

    When I contacted Cloudway, they replied that this plugin “st-woo-swatches” is causing the crash:

    [0x00007f3d47c15500] get_available_variation() /home/612627.cloudwaysapps.com/eerwjyhrug/public_html/wp-content/plugins/woocommerce/includes/class-wc-product-variable.php:326
    [0x00007f3d47c15430] get_available_variations() /home/612627.cloudwaysapps.com/eerwjyhrug/public_html/wp-content/plugins/et-core-plugin/packages/st-woo-swatches/public/partials/class-st-woo-shop.php:64
    [0x00007f3d47c15140] loop_swatch() /home/612627.cloudwaysapps.com/eerwjyhrug/public_html/wp-includes/class-wp-hook.php:324
    [0x00007f3d47c15060] apply_filters() /home/612627.cloudwaysapps.com/eerwjyhrug/public_html/wp-includes/class-wp-hook.php:348
    [0x00007f3d47c14ff0] do_action() /home/612627.cloudwaysapps.com/eerwjyhrug/public_html/wp-includes/plugin.php:517
    [0x00007f3d47c14f00] do_action() /home/612627.cloudwaysapps.com/eerwjyhrug/public_html/wp-content/plugins/et-core-plugin/packages/st-woo-swatches/public/partials/class-st-woo-shop.php:44
    [0x00007f3d47c14ea0] {closure}() /home/612627.cloudwaysapps.com/eerwjyhrug/public_html/wp-includes/class-wp-hook.php:324
    [0x00007f3d47c14dc0] apply_filters() /home/612627.cloudwaysapps.com/eerwjyhrug/public_html/wp-includes/class-wp-hook.php:348
    [0x00007f3d47c14d50] do_action() /home/612627.cloudwaysapps.com/eerwjyhrug/public_html/wp-includes/plugin.php:517
    [0x00007f3d47c14c70] do_action() /home/612627.cloudwaysapps.com/eerwjyhrug/public_html/wp-content/themes/xstore/woocommerce/content-product.php:783

    Since I’ve never installed this plugin, I am not sure whether this plugin is built into your theme, please let me know if you can fix it. Currently, I am running on the latest PHP 8.2

    Thanks,
    Jimmy

    4 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 13, 2023 at 15:34

    Hello, Jimmy,

    Thank you for reaching out to us with your concern.

    Please provide the URL of any product that can’t be edited, temporary wp-admin and FTP access, so we can take a closer look.

    To provide wp-admin access, you can create a new user account with administrator role via the Dashboard, and provide us with the username and password via the Private Content area.
    To create FTP access (FTP host, FTP username, FTP password, FTP port, FTP encryption) , please contact your hosting provider for assistance.

    Kind Regards,
    8theme team

    Avatar: jimmy
    jimmy
    Participant
    November 14, 2023 at 00:35

    Here is the credential for the wp admin and SFTP

    Please contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 15, 2023 at 08:28

    Hello, Jimmy,

    We wish to inform you that your inquiry has been forwarded to another specialist for a more detailed review.
    Please be patient and do not change access.

    Kind Regards,
    8theme team

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 15, 2023 at 18:04

    Hello, Jimmy,

    1 / Please downgrade the PHP version to 8.0.

    2/ Ask your hosting provider to increase the Maximum execution time (we added a screenshot of the fatal error into the Private Content area).

    3/ Disable all 3rd-party plugins and check how the edit works then.

    Kind Regards,
    8theme team

    Please contact administrator
    for this information.
  • Viewing 5 results - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.