[WCML v4.14] ReferenceError: woocommerce_price_slider_params is not defined
-
after installing WCML 4.14:
ReferenceError: woocommerce_price_slider_params is not defined
Deactivating WCML -> no error shown
-
This topic was modified 8 years, 12 months ago by
mbgrafik.
-
This topic was modified 8 years, 12 months ago by
-
I’m getting the same error…unsure what needs to be done to resolve!
I ended up having to patch the file ‘class-wcml-price-filter.php’ on line 27 from:
woocommerce_price_slider_params.currency_symbol = wcml_mc_settings.current_currency.symbol;to the following:
if( typeof woocommerce_price_slider_params != 'undefined' ){ woocommerce_price_slider_params.currency_symbol = wcml_mc_settings.current_currency.symbol; }Hello and thank you for contacting us.
Can you give us more details?
What action triggers this error?
What are the effects of the error?
Do you have any other plugins that are interfering with the price or the currency?
Maybe you should test in a minimal setup with only WPML and its addons, WooCommerce and WooCommerce Multilingual plugins enabled.I am not sure if the patch that you did would be good – it may block some WooCommerce Multilingual functionality and lead to other issues.
version: 4.1.4
I also have this error in my console:
(index):1051 Uncaught ReferenceError: woocommerce_price_slider_params is not defined
sources: woocommerce_price_slider_params.currency_format_symbol = wcml_mc_settings.current_currency.symbol;
not sure what it is effecting.I have the same error on each side
This is my Plugin (latest Versions) Setup:
Contact Form 7
Maintenance
Vendidero Helper
WooCommerce
WooCommerce Composite Products
WooCommerce Germanized
WooCommerce Germanized Pro
WooCommerce Multilingual
WPML Media
WPML Multilingual CMS
WPML String Translation
WPML Translation ManagementI am also getting this issue. disabled WCML, then resolved. This undefined issue will cause /undefined url once a while. Its a pain.
WCML Version 4.1.4.
We have reproduced the issue and it will be fixed in the next release of WooCommerce Multilingual.
You can fix it by changing the lines in two files.
In
woocommerce-multilingual/inc/currencies/class-wcml-price-filter.php
You change:woocommerce_price_slider_params.currency_format_symbol = wcml_mc_settings.current_currency.symbol;to
if( typeof woocommerce_price_slider_params !== 'undefined' ) { woocommerce_price_slider_params.currency_format_symbol = wcml_mc_settings.current_currency.symbol; }and in the file:
woocommerce-multilingual/res/js/wcml-multi-currency.jsif( typeof woocommerce_price_slider_params != 'undefined' ){to:
if( typeof woocommerce_price_slider_params !== 'undefined' ){ woocommerce_price_slider_params.currency_symbol = wcml_mc_settings.current_currency.symbol; }Please remember to backup your database and files first before you proceed! You can use a plugin for this if you like (example: http://ww.wp.xz.cn/plugins/duplicator/)
When will the update be released?
We are not encouraging you to “hack” the code. This is just one line fix that will help you get back on track, and help us receive proper feedback if this works for you or if there are some other issues that we might have missed.
“Just updating” the plugin takes serious testing from our side with various scenarios and plugins and it is very time consuming and complex process.The update will be released once all issues that need resolving in the current development cycle are resolved and once the version passes QA and the results are good from it.
For now I cannot tell you an exact time-frame. You can help by testing (on staging environment first of course) the patch that I provided above as the patch testing in various configurations is very helpful for creating a good product.used your patch and it seems to solve the issue. thx
1 month, still not fixed? 😮
@thibotus01 we are preparing a new release soon.
For the time being, you can use the workaround in the code bove in this thread.hello
js var wcml_mc_settings not definedWooCommerce Multilingual
Version: 4.2.0patch – Ã la – just make it work
file : /public_html/wp-content/plugins/woocommerce-multilingual/inc/currencies/class-wcml-multi-currency-resources.php
public static function set_up( WCML_Multi_Currency $multi_currency, woocommerce_wpml $woocommerce_wpml ){ global $pagenow; self::$multi_currency = $multi_currency; self::$woocommerce_wpml = $woocommerce_wpml; // if( !is_admin() && $pagenow != 'wp-login.php' && $woocommerce_wpml->cs_templates->get_active_templates() ) if( !is_admin() && $pagenow != 'wp-login.php' ) { self::load_inline_js(); } }-
This reply was modified 8 years, 10 months ago by
andre.beaudry.
-
This reply was modified 8 years, 10 months ago by
The topic ‘[WCML v4.14] ReferenceError: woocommerce_price_slider_params is not defined’ is closed to new replies.