News:

AbanteCart v1.4.2 is released.

Main Menu

cant change text in language definitions

Started by Craig, December 18, 2012, 05:10:04 AM

Previous topic - Next topic

Craig

hi Guys, trying to change some text in language definitions using the edit option but are getting a message to check error log which reads... 2012-12-18 9:51:32 - database error:  AbanteCart core v.1.1.2 Error: Duplicate entry '0-default_bank_transfer_default_bank_transfer-1-text_payment' for key 2<br />Error No: 1062<br />UPDATE language_definitions SET section = '0', block = 'default_bank_transfer_default_bank_transfer', language_key = 'text_payment', language_value = 'Your order will not ship until we receive payment. Thank you' WHERE block = 'default_bank_transfer_default_bank_transfer' AND language_key = 'text_payment' AND language_id = '1' in <b>/home/www/newbrand.co.nz/core/database/mysql.php</b> on line <b>86</b>

any idea why i cant simply change the text and save? Cheers

abolabo

"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

Craig


abantecart

Please try again. This problems usually go away on second attempt.

We will try to catch this problem and eliminate.
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

abolabo

Quote from: Craig on December 19, 2012, 03:39:55 AM
hi, sorry but i don't know what means?

i mean did you tried to edit definition twice?
i note that on second attempt error disappear.
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

Craig

yes I have tried to input new text 3 or 4 times and each time the error comes up again. I have also had the dashboad in admin dissapear a couple of times when i've been inputting sub categories. It comes back if i close the  window and log in again. Not a biggie but a bit annoying.

abolabo

Quote from: Craig on December 20, 2012, 04:55:46 AM
yes I have tried to input new text 3 or 4 times and each time the error comes up again. I have also had the dashboad in admin dissapear a couple of times when i've been inputting sub categories. It comes back if i close the  window and log in again. Not a biggie but a bit annoying.

hmm...
What is extension default_bank_transfer? are you created it?

About sql error. Table language_definitions have unique index
  UNIQUE KEY `lang_definition_index` (`section`,`block`,`language_id`,`language_key`)
When you tried to update some row with value that already exists sql will give you error.
buy the way, i don't see "section" in your error sql query condition.
look

UPDATE language_definitions
SET section = '0',
         block = 'default_bank_transfer_default_bank_transfer',
         language_key = 'text_payment',
         language_value = 'Your order will not ship until we receive payment. Thank you'
WHERE block = 'default_bank_transfer_default_bank_transfer' AND language_key = 'text_payment' AND language_id = '1'

You trying to set section = '0' for all records with  block = 'default_bank_transfer_default_bank_transfer' AND language_key = 'text_payment' AND language_id = '1' (!)
Please check if row with block = 'default_bank_transfer_default_bank_transfer' AND language_key = 'text_payment' AND language_id = '1' only one in your language_definitions table.

i'm not sure but it looks like partial upgrage of abantecart. In version 1.1.2 sql query for language definitions runs by language_manager class

if you extension written by you, you have xml language files in language folder inside extension dir... for ex. extensions/default_bank_transfer/storefront/language/english/
Easiest way is deleting all rows with block='default_bank_transfer_default_bank_transfer' and clearing cache.
After first call for language of default_bank_transfer extension engine refill definitions into language_definitions table.
And then try to edit.
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

abolabo

so..we found that bug.
Please replace file /core/lib/language_manager.php by file from attachment
Thank you.
"No one is useless in this world who lightens the burdens of another."
― Charles Dickens

Forum Rules Code of conduct
AbanteCart.com 2010 -