Author Topic: cant change text in language definitions  (Read 11248 times)

Offline Craig

  • Newbie
  • *
  • Posts: 28
  • Karma: +3/-0
    • View Profile
cant change text in language definitions
« on: December 18, 2012, 05:10:04 AM »
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

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2050
  • Karma: +320/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: cant change text in language definitions
« Reply #1 on: December 18, 2012, 07:58:19 AM »
hello.
Did you tried to repeat edition?
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline Craig

  • Newbie
  • *
  • Posts: 28
  • Karma: +3/-0
    • View Profile
Re: cant change text in language definitions
« Reply #2 on: December 19, 2012, 03:39:55 AM »
hi, sorry but i don't know what means?

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4360
  • Karma: +299/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: cant change text in language definitions
« Reply #3 on: December 19, 2012, 11:11:32 PM »
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

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2050
  • Karma: +320/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: cant change text in language definitions
« Reply #4 on: December 20, 2012, 03:50:07 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

Offline Craig

  • Newbie
  • *
  • Posts: 28
  • Karma: +3/-0
    • View Profile
Re: cant change text in language definitions
« Reply #5 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.

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2050
  • Karma: +320/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: cant change text in language definitions
« Reply #6 on: December 20, 2012, 09:44:35 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
Code: [Select]
  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
Code: [Select]
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

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2050
  • Karma: +320/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: cant change text in language definitions
« Reply #7 on: December 21, 2012, 03:16:07 AM »
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

 

Powered by SMFPacks Social Login Mod