Plugin Author
sbouey
(@sbouey)
What are the languages you are using ? you have this in backend or front-end ?
Plugin Author
sbouey
(@sbouey)
you says on my websites ? you have this on several sites ?
Plugin Author
sbouey
(@sbouey)
When i look on google ICL_LANGUAGE_CODE is a WPML problem
Falang read the wpml-config.xml file to translate string perhaps it’s the problem
I have a couple of real estate websites. One uses the Houzez theme and the other uses Residence wordpress theme. Both were working well with your plugin for a long time. I only have your plugin installed and never used WPML. The theme developers may have put code in the script to make it compatible with WPML.
The error code pointed to this below in the theme script:
if (function_exists(‘icl_translate’)) {
if (ICL_LANGUAGE_CODE != ‘en’) {
$handle = “bootstrap-datepicker.” . ICL_LANGUAGE_CODE;
$name = “bootstrap-datepicker.” . ICL_LANGUAGE_CODE . “.min.js”;
wp_enqueue_script($handle, HOUZEZ_JS_DIR_URI . ‘vendors/locales/’ . $name, array(‘jquery’), ‘1.0’, true);
}
$houzez_date_language = ICL_LANGUAGE_CODE;
}
}
I have 2 real estate websites and one uses the Houzez theme and the other Residence wordpress real estate theme. They both were working for a long time and then one of the updates made them start with errors. I only use your language plugin and never installed WPML. I think maybe the theme developers added code to make the themes compatible with the WPML plugin and that may be causing the problems.
Here is a link to a page that throws the error: https://thailandluxuryhomes.com/property/luxury-condominium-for-sale-north-hua-hin-cha-am/
Here is some of the code that the error points to:
$handle = “bootstrap-datepicker.” . ICL_LANGUAGE_CODE;
$name = “bootstrap-datepicker.” . ICL_LANGUAGE_CODE . “.min.js”;
wp_enqueue_script($handle, HOUZEZ_JS_DIR_URI . ‘vendors/locales/’ . $name, array(‘jquery’), ‘1.0’, true)
$houzez_date_language = ICL_LANGUAGE_CODE;
Plugin Author
sbouey
(@sbouey)
The theme houzez is a free theme ? to test it locally
The theme is a paid theme from Themeforest I purchased from there several years ago. They have done many updates and added functions to be compatible with WPML from what I saw in the changelog. That probably created the problem with your plugin as it always worked perfectly.
I removed the code the theme developer added for the WPML option and now your plugin works good again. The problem was due to the theme developer adding code just for the use of the WPML plugin. So everything is resolved and working again until possibly another theme update. I plan to keep using your good plugin as it works very well.