Hello,
I've been trying to figure out why I'm unable to store certain configuration values.
By debugging each step of Configuration.php I noticed something strange.
I'm running 1.6.1.7 by the way.
The reason why my settings arent being saved is because hasKey() returns true
even though there are no row in the configuration table with the key name I specify.
For some reason, the one value which contains a longer string value (dateformat)
saves perfectly fine, whereas the rest (being binary 0/1 values) will not save to db.
The debugging I did was to prior to executing updateValue(key,val) - print out the status of
hasKey() and getIdByName(), as there wont be any insertion if hasKey() is true.
Am I doing something wrong here or what is going on?
Note:
If I alter line 412 of Configuration.php to check if stored_value is set IT WORKS:
// If key already exists, update value
if (Configuration::hasKey($key, $lang, $id_shop_group, $id_shop)) {
into:
// If key already exists, update value
if (stored_value !== false) {
Debug log
Configuration::getIdByName(HANSA_CHECKOUT_SHIPDATE) = 0
Configuration::hasKey(HANSA_CHECKOUT_SHIPDATE) = 1
Executing Configuration::updateValue('HANSA_CHECKOUT_SHIPDATE','1')
Configuration::getIdByName(HANSA_CHECKOUT_UPLOAD) = 0
Configuration::hasKey(HANSA_CHECKOUT_UPLOAD) = 1
Executing Configuration::updateValue('HANSA_CHECKOUT_UPLOAD','1')
Configuration::getIdByName(HANSA_CHECKOUT_PHONE) = 0
Configuration::hasKey(HANSA_CHECKOUT_PHONE) = 1
Executing Configuration::updateValue('HANSA_CHECKOUT_PHONE','1')
Configuration::getIdByName(HANSA_CHECKOUT_PARTDEL) = 0
Configuration::hasKey(HANSA_CHECKOUT_PARTDEL) = 1
Executing Configuration::updateValue('HANSA_CHECKOUT_PARTDEL','1')
Configuration::getIdByName(HANSA_CHECKOUT_DATEFORMAT) = 465
Configuration::hasKey(HANSA_CHECKOUT_DATEFORMAT) = 1
Executing Configuration::updateValue('HANSA_CHECKOUT_DATEFORMAT','yy-mm-dd')