• Resolved Rogyw

    (@turtleline)


    Installed flexible-product-fields 1.0.5 on WordPress 4.8.3, WooCommerce 3.2.3. PHP 5.6.31
    On activation I get the following errors:

    Plugin could not be activated because it triggered a fatal error.
    Fatal error: Cannot redeclare class Flexible_Product_Fields in /wp-content/plugins/flexible-product-fields/flexible-product-fields.php on line 281

    Log includes:

    [03-Nov-2017 04:33:23 UTC] PHP Fatal error: Call to undefined function wpdesk_tracker_enabled() in /wp-content/plugins/flexible-product-fields/classes/tracker.php on line 126
    [03-Nov-2017 04:33:26 UTC] PHP Fatal error: Cannot redeclare class Flexible_Product_Fields in /wp-content/plugins/flexible-product-fields/flexible-product-fields.php on line 281
    [03-Nov-2017 04:33:27 UTC] PHP Fatal error: Cannot redeclare class Flexible_Product_Fields in /wp-content/plugins/flexible-product-fields/flexible-product-fields.php on line 281

    To check again, I disabled all plugins. Deleted the debug.log Enabled WooCommerce Plugin. Deleted Flexible Product Fields and reinstalled. Activated it and generated the following again:

    [03-Nov-2017 05:04:06 UTC] PHP Fatal error: Call to undefined function wpdesk_tracker_enabled() in /wp-content/plugins/flexible-product-fields/classes/tracker.php on line 126
    [03-Nov-2017 05:04:08 UTC] PHP Fatal error: Cannot redeclare class Flexible_Product_Fields in /wp-content/plugins/flexible-product-fields/flexible-product-fields.php on line 281
    [03-Nov-2017 05:04:09 UTC] PHP Fatal error: Cannot redeclare class Flexible_Product_Fields in /wp-content/plugins/flexible-product-fields/flexible-product-fields.php on line 281

    Updated to PHP 7.0.x

    Deactivated and activated.
    Result:
    Plugin could not be activated because it triggered a fatal error.
    Fatal error: Cannot redeclare is_flexible_products_fields_pro_active() (previously declared in /wp-content/plugins/flexible-product-fields/flexible-product-fields.php:306) in /wp-content/plugins/flexible-product-fields/flexible-product-fields.php on line 306

    And debug.log output:

    [03-Nov-2017 05:11:15 UTC] PHP Fatal error: Uncaught Error: Call to undefined function wpdesk_tracker_enabled() in /wp-content/plugins/flexible-product-fields/classes/tracker.php:126
    Stack trace:
    #0 /wp-includes/class-wp-hook.php(298): WPDesk_Flexible_Product_Fields_Tracker->activated_plugin(‘flexible-produc…’, false)
    #1 /wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
    #2 /wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #3 /wp-admin/includes/plugin.php(618): do_action(‘activated_plugi…’, ‘flexible-produc…’, false)
    #4 /wp-admin/plugins.php(42): activate_plugin(‘flexible-produc…’, ‘https://…’, false)
    #5 {main}
    thrown in /wp-content/plugins/flexible-product-fields/classes/tracker.php on line 126
    [03-Nov-2017 05:11:16 UTC] PHP Fatal error: Cannot redeclare is_flexible_products_fields_pro_active() (previously declared in /wp-content/plugins/flexible-product-fields/flexible-product-fields.php:306) in /wp-content/plugins/flexible-product-fields/flexible-product-fields.php on line 306
    [03-Nov-2017 05:11:16 UTC] PHP Fatal error: Cannot redeclare is_flexible_products_fields_pro_active() (previously declared in /wp-content/plugins/flexible-product-fields/flexible-product-fields.php:306) in /wp-content/plugins/flexible-product-fields/flexible-product-fields.php on line 306

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello Rogyw,

    Thank you for your detailed report.
    I can confirm that there is an issue with a plugin. Our team will try to fix as soon as possible.

    But when I was trying to reproduce the bug, I found out that despite the errors, the plugin is active and it’s configuration page is accessible.

    Also, you can install WP Desk Helper and use it as a workaround. With this plugin activated, there will be no errors during Flexible Product Fields activation.

    I will let you know when the fix will be ready.

    Hello again Rogyw,

    New version has been released! The issue has now been resolved. You won’t experience any further problems during activation.

    Regards,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin Activation Error – Cannot redeclare Flexible_Product_Fields (ver 1.0.5)’ is closed to new replies.