Author Topic: Error on 2nd language  (Read 17203 times)

Offline pask2008

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Error on 2nd language
« on: April 15, 2020, 12:30:04 PM »
hello
i was adding a second language through extension to my project.
after installed it, set the language on, and start to load missing data from english (unsuccesful ), i have received the following
mysql error in log that i don't know how to fix. It looks like spacing problem in SQL command, so i have add in my.ini  SQL_MODE=IGNORE_SPACE
but still the LOAD command doesn't work.
do you have any suggestion ? thanks a lot

2020-04-14 10:40:42 - database error: AbanteCart core v.1.2.15 SQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE language_id = 1' at line 3
Error No: 1064
SQL: SELECT COUNT(*) as cnt
FROM
WHERE language_id = 1 in <b>C:\Bitnami\abantecart-1.2.15-10\apps\abantecart\htdocs\core\database\amysqli.php</b> on line <b>114</b>


Offline dvagner

  • Core/UI Developer
  • Jr. Member
  • **
  • Posts: 73
  • Karma: +28/-1
    • View Profile
Re: Error on 2nd language
« Reply #1 on: April 16, 2020, 04:36:25 AM »
1. Clear cache.
2. If Step1 not solved your issue -   Show result of query

SELECT DISTINCT table_name
                FROM information_schema.columns
                WHERE column_name = 'language_id' AND table_schema='DB_DATABASE';

Where DB_DATABASE - your DB name

Offline pask2008

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Error on 2nd language
« Reply #2 on: April 18, 2020, 12:52:31 PM »
hi Dvagner
thanks for your suggestion but clearing the cache didn't solve
here the query result

SELECT DISTINCT table_name
                FROM information_schema.columns
                WHERE column_name = 'language_id' AND table_schema='solution1_ps';


TABLE_NAME   
ac_banner_descriptions   
ac_block_descriptions   
ac_category_descriptions   
ac_content_descriptions   
ac_country_descriptions   
ac_coupon_descriptions   
ac_download_descriptions   
ac_field_descriptions   
ac_field_values   
ac_fields_group_descriptions   
ac_form_descriptions   
ac_global_attributes_descriptions   
ac_global_attributes_groups_descriptions   
ac_global_attributes_type_descriptions   
ac_global_attributes_value_descriptions   
ac_language_definitions   
ac_languages   
ac_length_class_descriptions   
ac_order_data_types   
ac_order_statuses   
ac_orders   
ac_page_descriptions   
ac_product_descriptions   
ac_product_filter_descriptions   
ac_product_filter_ranges_descriptions   
ac_product_option_descriptions   
ac_product_option_value_descriptions   
ac_product_tags   
ac_resource_descriptions   
ac_stock_statuses   
ac_store_descriptions   
ac_tax_class_descriptions   
ac_tax_rate_descriptions   
ac_url_aliases   
ac_weight_class_descriptions   
ac_zone_descriptions   

Offline HADY

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: +27/-5
    • View Profile
Re: Error on 2nd language
« Reply #3 on: September 22, 2020, 05:49:41 AM »
Hello!

I am trying to fix some products information so I deleted them and started to correct the information inside each item but during this i got next error:

2020-09-22 12:01:11 - database error: AbanteCart core v.1.2.16 SQL Error: Duplicate entry '01-644-1011-1012-1013-1014-1015-1016-1017-1018-1019-1020-1021...' for key 'ac_url_aliases_idx'
Error No: 1062
SQL: INSERT INTO ac_url_aliases (`keyword`, `query`, `language_id`) VALUES ('01-644-1011-1012-1013-1014-1015-1016-1017-1018-1019-1020-1021-1022-1023-1024-1025-1026-1027-1028-1029-1030-1031-1032-1033-1034-1035-1036-1037-1038-1039-1040-1041-1042-1043-1044-1045-1046-1047-1048-1049-1050-1051-1052-1053-1054-1055-1056-1057-1058-1059-106-1062', 'product_id=1062', '18')
PHP call stack:
#0 /home/public_html/core/lib/db.php:100
#1 /home/public_html/core/engine/extensions.php:1176
#2 /home/public_html/core/engine/extensions.php:1127
#3 /home/public_html/core/lib/db.php:67
#4 /home/public_html/core/lib/language_manager.php:443
#5 /home/public_html/core/lib/language_manager.php:191
#6 /home/public_html/admin/model/catalog/product.php:155
#7 /home/public_html/admin/model/catalog/product.php:1124
#8 /home/public_html/admin/controller/pages/catalog/product.php:362
#9 /home/public_html/core/engine/dispatcher.php:293
#10 /home/public_html/core/engine/dispatcher.php:328
#11 /home/public_html/core/engine/page.php:108
#12 /home/public_html/core/engine/router.php:176
#13 /home/public_html/core/engine/router.php:80
#14 /home/public_html/index.php:94
in <b>/home/public_html/core/database/amysqli.php</b> on line <b>119</b>


I will be thankful for your support and help in advance.
Thank you In Advanced
Regards
HADY

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5819
  • Karma: +274/-2
    • View Profile
Re: Error on 2nd language
« Reply #4 on: September 22, 2020, 05:52:19 AM »
started to correct the information inside

Hello. What exactly you did and on what page?

Offline HADY

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: +27/-5
    • View Profile
Re: Error on 2nd language
« Reply #5 on: September 22, 2020, 06:16:39 AM »
started to correct the information inside

Hello. What exactly you did and on what page?


Thank you for fast reply Sir,

I started correcting the information about the specifications for each item and started translating the content. We use 11 languages ​​on our website, and in the past the information and description was only in English, but now as I said, we have decided to delete the old information and correct the information of each item so that it will be changed correctly when customers browse in a language suitable for them. Now I cannot add new products too.

Thanks.
« Last Edit: September 22, 2020, 06:47:58 AM by HADY »
Thank you In Advanced
Regards
HADY

Offline HADY

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: +27/-5
    • View Profile
Re: Error on 2nd language
« Reply #6 on: September 22, 2020, 07:30:11 AM »
started to correct the information inside

Hello. What exactly you did and on what page?


Thank you for fast reply Sir,

I started correcting the information about the specifications for each item and started translating the content. We use 11 languages ​​on our website, and in the past the information and description was only in English, but now as I said, we have decided to delete the old information and correct the information of each item so that it will be changed correctly when customers browse in a language suitable for them. Now I cannot add new products too.

Thanks.


Also i have to say that I cloned 1st product and keep cloning because i have in the same specification of that product many other colors.
Thank you In Advanced
Regards
HADY

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5819
  • Karma: +274/-2
    • View Profile
Re: Error on 2nd language
« Reply #7 on: September 22, 2020, 09:01:16 AM »
Backup your database and try to clean ac_url_aliases table (do not remove it)

Offline HADY

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: +27/-5
    • View Profile
Re: Error on 2nd language
« Reply #8 on: September 22, 2020, 10:41:12 AM »
Backup your database and try to clean ac_url_aliases table (do not remove it)

Sir Just to be sure, do you mean i have to EMPTY the specific table (ac_url_aliases) as in the screenshot ???
« Last Edit: September 22, 2020, 10:47:45 AM by HADY »
Thank you In Advanced
Regards
HADY

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5819
  • Karma: +274/-2
    • View Profile
Re: Error on 2nd language
« Reply #9 on: September 23, 2020, 02:07:31 AM »
Yes, and remove the SEO keyword field in the product you clone

Offline HADY

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: +27/-5
    • View Profile
Re: Error on 2nd language
« Reply #10 on: September 23, 2020, 07:39:48 AM »
Yes, and remove the SEO keyword field in the product you clone

when I clone the product it will be already given a new SEO keyword as above in the Product Name mentioned.

So, What do you mean I need to remove the SEO keyword and why?
Thank you In Advanced
Regards
HADY

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5819
  • Karma: +274/-2
    • View Profile
Re: Error on 2nd language
« Reply #11 on: October 09, 2020, 06:21:04 AM »
The issue is related to the SEO URL keyword length and reported to the bug tracker
https://github.com/abantecart/abantecart-src/issues/1428

Offline HADY

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: +27/-5
    • View Profile
Re: Error on 2nd language
« Reply #12 on: October 09, 2020, 10:10:20 AM »
The issue is related to the SEO URL keyword length and reported to the bug tracker
https://github.com/abantecart/abantecart-src/issues/1428

Thank you sir. I hope this will be fixed in the next version.

Happy safe day...
Thank you In Advanced
Regards
HADY

 

Database Error

Please try again. If you come back to this error screen, report the error to an administrator.