Error 500 : Conflict with FluentForms
-
Hi, your plugin does have a conflict in my setup, where i have fluent forms pro and the
wpfluentframework is already provided and loaded by fluentforms.In your code, you have over-loaded the wpfluent’s
QueryBuilderto add aselectDistinctfunction, 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 2423I suggest 3 ways of solving this:
- (recommended) using your own
wpFluentoverride implentation using the correct autoload +useinstruction in your php classes - (dirty hack) make sure you load and over-write the existing
wpFluentclass forcefully. - rename your wpFluent to something else??
- (recommended) using your own
The topic ‘Error 500 : Conflict with FluentForms’ is closed to new replies.