• Hi, your plugin does have a conflict in my setup, where i have fluent forms pro and the wpfluent framework is already provided and loaded by fluentforms.

    In your code, you have over-loaded the wpfluent’s QueryBuilder to add a selectDistinct function, but your autoload is not taking into account the fact that the wpfluent framework might be loaded elsewhere and it would use the available wpfluent class and not load its custom version anymore.

    Here is the error message that helped me identify the issue:

    [STDERR] PHP Fatal error: Uncaught BadMethodCallException: Call to undefined method FluentForm\Framework\Database\Query\Builder::selectDistinct() in /var/www/vhosts/example.com/html/wp-content/plugins/fluentform/vendor/wpfluent/framework/src/WPFluent/Database/Query/Builder.php:2423
    Stack trace: 0 /var/www/vhosts/example.com/html/wp-content/plugins/reviewx/app/Controllers/Admin/Criteria/CriteriaController.php(139): FluentForm\Framework\Database\Query\Builder->__call() 1 /var/www/vhosts/example.com/html/wp-content/plugins/reviewx/app/Controllers/Admin/Criteria/CriteriaController.php(149): ReviewX\Controllers\Admin\Criteria\CriteriaController->getReviewIds() 2 /var/www/vhosts/example.com/html/wp-content/plugins/reviewx/app/Controllers/Admin/Criteria/CriteriaController.php(122): ReviewX\Controllers\Admin\Criteria\CriteriaController->applyCreateEvent() 3 /var/www/vhosts/example.com/html/wp-content/plugins/reviewx/app/Controllers/Admin/Criteria/CriteriaController.php(23): ReviewX\Controllers\Admin\Criteria\CriteriaController->dispatchAction() 4 /var/www/vhosts/example.com/html/wp-content/plugins/reviewx/app/Controllers/Admin/Core/ReviewxAdmin.php(654): ReviewX\Controllers\Admin\Criteria\CriteriaController->handleAction() 5 /var/www/vhosts/example.com/html/wp-includes/class-wp-hook.php(324): ReviewX\Controllers\Admin\Core\ReviewxAdmin->save_setting_tab() 6 /var/www/vhosts/example.com/html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 7 /var/www/vhosts/example.com/html/wp-includes/plugin.php(517): WP_Hook->do_action() 8 /var/www/vhosts/example.com/html/wp-admin/admin-ajax.php(188): do_action() 9 {main}
    thrown in /var/www/vhosts/example.com/html/wp-content/plugins/fluentform/vendor/wpfluent/framework/src/WPFluent/Database/Query/Builder.php on line 2423

    I suggest 3 ways of solving this:

    • (recommended) using your own wpFluent override implentation using the correct autoload + use instruction in your php classes
    • (dirty hack) make sure you load and over-write the existing wpFluent class forcefully.
    • rename your wpFluent to something else??
Viewing 15 replies - 1 through 15 (of 23 total)
  • Plugin Contributor Sabbir Mahmud

    (@sadhinsabbir)

    Hi,

    Thank you so much for bringing the issue to our attention. We’re looking into the matter, and hopefully it will be sorted out soon. In the meantime, if you need any further assistance, feel free to contact our dedicated support team.

    Warm regards ??

    Plugin Contributor Sabbir Mahmud

    (@sadhinsabbir)

    Hi,

    Surprisingly, we couldn’t reproduce the issue at our end. But you can try this, a little modified version of ReviewX. Hopefully, it will work. Don’t forget to share the result with us.

    Best regards ??

    Thread Starter amirhmoradi

    (@amirhmoradi)

    Hi, Thanks for your feedback and the provided file.

    After updating to the latest version (reviewx.1.6.23) this issue seems to be resolved.

    BTW, I compared the provided modified version with the latest release and could not identify the code that is supposed to address the issue.

    Regards.

    Plugin Contributor Sabbir Mahmud

    (@sadhinsabbir)

    Hi,

    It’s great to hear that it worked. We just added the following code in the modified version and in the latest release as well.

    global $wpdb; if (wpFluent()) { $query = “SELECT DISTINCT review_id FROM {$wpdb->prefix}reviewx_criterias”; return $wpdb->get_results($query, ARRAY_A); } return wpFluent()->table(‘reviewx_criterias’)->selectDistinct([‘review_id’])->get();

    Warm regards ??

    Thread Starter amirhmoradi

    (@amirhmoradi)

    Hi, unfortunately, it seems the conflict is still there and happens in some cases. For example it happens when accessing some orders or updating them in the woocommerce order management page.
    Here is the trace of the error i caught today while updating an order to the ‘completed’ status:

    [14-Dec-2023 14:12:32 UTC] PHP Fatal error:  Uncaught TypeError: FluentForm\Framework\Database\BaseGrammar::columnize(): Argument #1 ($columns) must be of type array, string given, called in /var/www/vhosts/example.com/html/wp-content/plugins/fluentform/vendor/wpfluent/framework/src/WPFluent/Database/Query/Grammar.php on line 121 and defined in /var/www/vhosts/example.com/html/wp-content/plugins/fluentform/vendor/wpfluent/framework/src/WPFluent/Database/BaseGrammar.php:107
    Stack trace:
    
    #0 /var/www/vhosts/example.com/html/wp-content/plugins/fluentform/vendor/wpfluent/framework/src/WPFluent/Database/Query/Grammar.php(121): FluentForm\Framework\Database\BaseGrammar->columnize()
    
    #1 /var/www/vhosts/example.com/html/wp-content/plugins/fluentform/vendor/wpfluent/framework/src/WPFluent/Database/Query/Grammar.php(75): FluentForm\Framework\Database\Query\Grammar->compileColumns()
    
    #2 /var/www/vhosts/example.com/html/wp-content/plugins/fluentform/vendor/wpfluent/framework/src/WPFluent/Database/Query/Grammar.php(51): FluentForm\Framework\Database\Query\Grammar->compileComponents()
    
    #3 /var/www/vhosts/example.com/html/wp-content/plugins/fluentform/vendor/wpfluent/framework/src/WPFluent/Database/Query/MySqlGrammar.php(39): FluentForm\Framework\Database\Query\Grammar->compileSelect()
    
    #4 /var/www/vhosts/example.com/html/wp-content/plugins/fluentform/vendor/wpfluent/framework/src/WPFluent/Database/Query/Builder.php(1558): FluentForm\Framework\Database\Query\MySqlGrammar->compileSelect()
    
    #5 /var/www/vhosts/example.com/html/wp-content/plugins/fluentform/vendor/wpfluent/framework/src/WPFluent/Database/Query/Builder.php(1627): FluentForm\Framework\Database\Query\Builder->toSql()
    
    #6 /var/www/vhosts/example.com/html/wp-content/plugins/fluentform/vendor/wpfluent/framework/src/WPFluent/Database/Query/Builder.php(1613): FluentForm\Framework\Database\Query\Builder->runSelect()
    
    #7 /var/www/vhosts/example.com/html/wp-content/plugins/fluentform/vendor/wpfluent/framework/src/WPFluent/Database/Query/Builder.php(1594): FluentForm\Framework\Database\Query\Builder->get()
    
    #8 /var/www/vhosts/example.com/html/wp-content/plugins/fluentform/vendor/wpfluent/framework/src/WPFluent/Database/Query/Builder.php(1570): FluentForm\Framework\Database\Query\Builder->first()
    
    #9 /var/www/vhosts/example.com/html/wp-content/plugins/reviewx/app/Controllers/Admin/Email/ReminderEmail.php(63): FluentForm\Framework\Database\Query\Builder->find()
    
    #10 /var/www/vhosts/example.com/html/wp-content/plugins/reviewx/app/Controllers/Admin/Email/EmailSettings.php(351): ReviewX\Controllers\Admin\Email\ReminderEmail->getEmailLog()
    
    #11 /var/www/vhosts/example.com/html/wp-content/plugins/reviewx/app/Hooks/Backend.php(83): ReviewX\Controllers\Admin\Email\EmailSettings->processSingleEmail()
    
    #12 /var/www/vhosts/example.com/html/wp-includes/class-wp-hook.php(326): JoulesLabs\Warehouse\Foundation\Application->{closure}()
    
    #13 /var/www/vhosts/example.com/html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    
    #14 /var/www/vhosts/example.com/html/wp-includes/plugin.php(517): WP_Hook->do_action()
    
    #15 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/includes/class-wc-order.php(411): do_action()
    
    #16 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/includes/class-wc-order.php(253): WC_Order->status_transition()
    
    #17 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-data.php(714): WC_Order->save()
    
    #18 /var/www/vhosts/example.com/html/wp-includes/class-wp-hook.php(326): WC_Meta_Box_Order_Data::save()
    
    #19 /var/www/vhosts/example.com/html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    
    #20 /var/www/vhosts/example.com/html/wp-includes/plugin.php(517): WP_Hook->do_action()
    
    #21 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/Edit.php(233): do_action()
    
    #22 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/Edit.php(147): Automattic\WooCommerce\Internal\Admin\Orders\Edit->handle_order_update()
    
    #23 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php(350): Automattic\WooCommerce\Internal\Admin\Orders\Edit->setup()
    
    #24 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php(366): Automattic\WooCommerce\Internal\Admin\Orders\PageController->prepare_order_edit_form()
    
    #25 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php(167): Automattic\WooCommerce\Internal\Admin\Orders\PageController->setup_action_edit_order()
    
    #26 [internal function]: Automattic\WooCommerce\Internal\Admin\Orders\PageController->handle_load_page_action()
    
    #27 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/src/Internal/Traits/AccessiblePrivateMethods.php(158): call_user_func_array()
    
    #28 /var/www/vhosts/example.com/html/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Internal\Admin\Orders\PageController->__call()
    
    #29 /var/www/vhosts/example.com/html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    
    #30 /var/www/vhosts/example.com/html/wp-includes/plugin.php(517): WP_Hook->do_action()
    
    #31 /var/www/vhosts/example.com/html/wp-admin/admin.php(237): do_action()
    
    #32 {main}
    
      thrown in /var/www/vhosts/example.com/html/wp-content/plugins/fluentform/vendor/wpfluent/framework/src/WPFluent/Database/BaseGrammar.php on line 107
    Plugin Contributor Sabbir Mahmud

    (@sadhinsabbir)

    Hi,

    This is really unfortunate. No worries; we are looking into the matter, and hopefully it will be sorted out soon. Since it’s the weekend here, it can take a little longer. Please keep your patience.

    Warm regards ??

    Thread Starter amirhmoradi

    (@amirhmoradi)

    Hi,

    Any updates on this issue?

    I still get errors related to your use of “wpfluent” framework

    Best

    Plugin Contributor Sabbir Mahmud

    (@sadhinsabbir)

    Hi @amirhmoradi,

    Thanks for your immense patience. I will get back to you with an update by tomorrow.

    Have a great day ahead ??

    Plugin Contributor Sabbir Mahmud

    (@sadhinsabbir)

    Hi?@amirhmoradi,

    A quick update for you: we’re still working on the issue, hopefully it will be resolved by Thursday.

    Thanks for your support and patience ??

    Warm regards,
    Sabbir

    Plugin Contributor Sabbir Mahmud

    (@sadhinsabbir)

    Hi?@amirhmoradi,

    Thanks for your immense patience, Mate. Would you please try this instead of the current ReviewX plugin on your site? Hopefully, it will resolve the issue.

    Warm regards,
    Sabbir, ReviewX

    Thread Starter amirhmoradi

    (@amirhmoradi)

    Hi Sabbir,

    Thanks for getting back to me. I tried to install the file provided, but I get an error saying ‘Incompatible Archive.’ when I try to install it, maybe it is the dev version of the project and not the “build” one?


    I did some file comparaison and it seems you renamed your framework to wpFluents (the added S at the end) and in theory it shall work.

    If you could provide an installable version of the plugin with your modification, I can test and let you know.

    Thread Starter amirhmoradi

    (@amirhmoradi)

    Sabbir, I found another annoying issue in the styles applied in the admin side by your plugin: it adds css styles to the whole admin area and not only on its pages, this causes issues with other plugins.

    For example, in your file reviewx/resources/assets/admin/css/reviewx-admin.css you have a css class .step with display: none; that breaks another plugin’s UI (Super Page Cache for CloudFlare), making it unusable.

    I think each plugin shall only apply its styles on its own pages and nothing global. Please fix this too.

    Thread Starter amirhmoradi

    (@amirhmoradi)

    Hi @sadhinsabbir,

    Please let me know if you have a built version with your modifications that you want me to test.

    Best regards

    Plugin Contributor Sabbir Mahmud

    (@sadhinsabbir)

    Hi?@amirhmoradi,

    Sorry for the delayed response. I don’t why but somehow my last reply to you disappeared and it was the weekend here.

    You can try downloading it once again from here. It will resolve all the reported issues.

    Feel free to let me know if you need any further assistance.

    Warm regards,
    Sabbir

    Thread Starter amirhmoradi

    (@amirhmoradi)

    Hi @sadhinsabbir, thanks for getting back to me.

    There is still some Fatal Errors happening in the latest file you provided, (i tried only to update an order status in woocommerce):

    [11-Feb-2024 18:00:11 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function ReviewX\Controllers\Admin\Email\wpFluents() in /var/www/vhosts/example.com/html/wp-content/plugins/reviewx/app/Controllers/Admin/Email/EmailSettings.php:334
    Stack trace:
    #0 /var/www/vhosts/example.com/html/wp-content/plugins/reviewx/app/Hooks/Backend.php(83): ReviewX\Controllers\Admin\Email\EmailSettings->processSingleEmail()
    #1 /var/www/vhosts/example.com/html/wp-includes/class-wp-hook.php(326): JoulesLabs\Warehouse\Foundation\Application->{closure}()
    #2 /var/www/vhosts/example.com/html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #3 /var/www/vhosts/example.com/html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/includes/class-wc-order.php(411): do_action()
    #5 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/includes/class-wc-order.php(253): WC_Order->status_transition()
    #6 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-data.php(714): WC_Order->save()
    #7 /var/www/vhosts/example.com/html/wp-includes/class-wp-hook.php(326): WC_Meta_Box_Order_Data::save()
    #8 /var/www/vhosts/example.com/html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #9 /var/www/vhosts/example.com/html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #10 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/Edit.php(303): do_action()
    #11 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/Edit.php(152): Automattic\WooCommerce\Internal\Admin\Orders\Edit->handle_order_update()
    #12 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php(350): Automattic\WooCommerce\Internal\Admin\Orders\Edit->setup()
    #13 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php(366): Automattic\WooCommerce\Internal\Admin\Orders\PageController->prepare_order_edit_form()
    #14 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/src/Internal/Admin/Orders/PageController.php(167): Automattic\WooCommerce\Internal\Admin\Orders\PageController->setup_action_edit_order()
    #15 [internal function]: Automattic\WooCommerce\Internal\Admin\Orders\PageController->handle_load_page_action()
    #16 /var/www/vhosts/example.com/html/wp-content/plugins/woocommerce/src/Internal/Traits/AccessiblePrivateMethods.php(158): call_user_func_array()
    #17 /var/www/vhosts/example.com/html/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Internal\Admin\Orders\PageController->__call()
    #18 /var/www/vhosts/example.com/html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
    #19 /var/www/vhosts/example.com/html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #20 /var/www/vhosts/example.com/html/wp-admin/admin.php(237): do_action()
    #21 {main}
      thrown in /var/www/vhosts/example.com/html/wp-content/plugins/reviewx/app/Controllers/Admin/Email/EmailSettings.php on line 334
    • This reply was modified 9 months, 2 weeks ago by amirhmoradi.
Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘Error 500 : Conflict with FluentForms’ is closed to new replies.