• Hello,

    We’re encountering a fatal error when accessing the WooCommerce product admin page. The issue appears to be caused by an undefined constant WPML\WPML_PLUGIN_FOLDER in the WooCommerce Multilingual plugin (UIPage.php:45). It looks like the plugin is attempting to use a constant from WPML that may not be defined or properly loaded. WPML core may be missing, inactive, or there’s a version mismatch between WPML and WCML.

    Steps to reproduce:

    1. Go to WooCommerce > Products in the WordPress admin
    2. Fatal error is thrown, preventing access to the product list

    Error Level: E_ERROR
    Message: Uncaught Error: Undefined constant “WPML\WPML_PLUGIN_FOLDER” in /home/WEBSITEPATH/wp-content/plugins/woocommerce-multilingual/addons/wpml-dependencies/vendor/wpml/core-api/core/UIPage.php:45
    Stack trace: 0 /home/WEBSITEPATH/wp-content/plugins/woocommerce-multilingual/addons/wpml-dependencies/vendor/wpml/core-api/core/UIPage.php(149): WPML\UIPage::init() 1 /home/WEBSITEPATH/wp-content/plugins/elementor/vendor/composer/ClassLoader.php(576): include(‘/home/ksc5577p/…’) 2 /home/WEBSITEPATH/wp-content/plugins/elementor/vendor/composer/ClassLoader.php(427): Composer\Autoload{closure}() 3 /home/WEBSITEPATH/wp-content/plugins/woocommerce-multilingual/classes/Utilities/AdminUrl.php(118): Composer\Autoload\ClassLoader->loadClass() 4 /home/WEBSITEPATH/wp-content/plugins/woocommerce-multilingual/classes/Utilities/AdminUrl.php(151): WCML\Utilities\AdminUrl::getWPMLTMDashboard() 5 /home/WEBSITEPATH/wp-content/plugins/woocommerce-multilingual/inc/admin-menus/class-wcml-admin-menus.php(177): WCML\Utilities\AdminUrl::getWPMLTMDashboardProducts() 6 /home/WEBSITEPATH/wp-includes/class-wp-hook.php(324): WCML_Admin_Menus::documentation_links() 7 /home/WEBSITEPATH/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 8 /home/WEBSITEPATH/wp-includes/plugin.php(517): WP_Hook->do_action() 9 /home/WEBSITEPATH/wp-admin/admin-footer.php(78): do_action() 10 /home/WEBSITEPATH/wp-admin/edit.php(518): require_once(‘/home/ksc5577p/…’) 11 {main}

    thrown
    File: /home/WEBSITEPATH/wp-content/plugins/woocommerce-multilingual/addons/wpml-dependencies/vendor/wpml/core-api/core/UIPage.php
    Line: 45
    Request: /wp-admin/edit.php?post_type=product
    Referrer: https%3A%2F%2FWEBSITE%2Fwp-admin%

    We’d appreciate guidance on resolving this compatibility issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter dev

    (@devksec)

    Rolling back to 5.3.9 fixes the issue. It also fixes the product quick edit which was broken. Seems the latest version is causing a few issues.

    Plugin Author Pierre Sylvestre

    (@strategio)

    Hi @devksec,

    Thanks for your report!

    Indeed, it seems like a bug in our latest version (5.4).

    It throws a fatal error in the admin footer of the product list screen on servers with PHP8+. And the symptom is that some features are broken, like “quick edit” of products.

    As a quick workaround, I would suggest to add the following line in your wp-config.php file:

    define( 'WPML_PLUGIN_FOLDER', 'sitepress-multilingual-cms' );

    We’ll try to fix it as soon as possible.

    Note: Once it will be fixed in next WCML patch version, you should remove the workaround.

    Thanks,

    Pierre

    Plugin Author Pierre Sylvestre

    (@strategio)

    Hi @devksec,

    With released WCML 5.4.4 which should fix the problem.

    Let us know otherwise or close the ticket.

    Thanks,

    Pierre

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WPML\WPML_PLUGIN_FOLDER – fatal error’ is closed to new replies.