CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ‘war-cut.gif’ LIMIT 1′ at line 1
96 answers
Hi there,
As our team is off now for the weekend, please give us sometime to follow up your question. Our technical team will get back to as soon as possible within today though.
Thanks for your patience.
Regards,
Ubertheme team
Hi there,
It seems your Magento 1 database has bad data portion that caused the issue. Please provide us the admin, ssh credentials and web root folder path of your Magento 2 site, we will check and help you out.
PS. Please use the ‘private’ reply, then your site credentials will be kept confidential.
Regards,
Hi sunny-dodeja305,
I’m in my home now. Let’s enable debug mode of our tool by bellow steps:
Open the php file at pub/ub-tool/index.php
and find to the code lines:
#ini_set(‘display_errors’, 1);
and replace it by code line:
ini_set(‘display_errors’, 1);
And find to the code line:
#defined(‘YII_DEBUG’) or define(‘YII_DEBUG’, true);
and replace it by code line:
defined(‘YII_DEBUG’) or define(‘YII_DEBUG’, true);
Once done, let’s re-run data migration in the step #5 of our tool by cli command:
php -f bin/ubdatamigration run --step=5
And then, provide me the full content of the log file of our tool at:
pub/ub-tool/protected/runtime/ub_data_migration.log
I will check further and tell you work around to solve that.
Regards,
Mall.
Hi there,
SELECT * FROM `catalog_product_entity_media_gallery` `t` WHERE attribute_id = 90 AND value = ‘/e/n/engine-block-man-o’war-cut.gif’ LIMIT 1
To handle that issue, let’s open the php file at path: pub/ub-tool/protected/controllers/Step5Controller.php
and find to the code line:
$condition = "attribute_id = {$attributeId2} AND value = '{$model->value}'";
and replace it by code line:
$condition = "attribute_id = {$attributeId2} AND value = '".addslashes($model->value)."'";
And then, you can continue with data migration in the step #5 and other steps.
Regards,
Mall.
Hi there,
After .html there is one more suffix .
Let’s do steps as bellow to solve that issue:
Step 1: Backup current your Magento2 database migrated.
Step 2: Run bellow sql in your Magento2 database:
UPDATE url_rewrite SET request_path = REPLACE(request_path, '.html.html', '.html');
UPDATE url_rewrite SET request_path = REPLACE(request_path, '-html.html', '.html');
Step 3: Clear all cache of Magento and your browser and access it
Regards,
Mall.
Hi there,
I just want to make sure before run sql query
Let’s do it ASAP to solve the issue as you mentioned.
Regards,
Mall.
Hello Mall,
Getting error
#1062 -- Duplicate entry ‘merlin-pro-block-cast-iron.html-35’ for key ‘URL_REWRITE_REQUEST_PATH_STORE_ID’
do you have skype?
Hi there,
I think that issue come from you have bad data in url_rewrite table, which was not compatible with new rules of Magento2.
For that case, let’s try with steps as bellow:
Step 1: Run bellow sql in your database:
Delete From url_rewrite Where entity_type = ‘category’ OR entity_type = ‘product’;
Delete From catalog_url_rewrite_product_category;
Step 2: Open and re-save all your categories migrated to re-generate your catalog rewrite urls.
Regards,
Mall.
Where i need to oper after step 1
“Step 2: Open and re-save all your categories migrated to re-generate your catalog rewrite urls.”
Hi there,
Let’s go to PRODUCTS/Products/Inventory/Categories menu item in back-end of your site.
And then, click to open and click to save button for your category.
Regards,
Mall.
is that one time or i need to go and do step for all category?there is around 200 categories
Yeah, you have to do it for each category. But that because your old data has some records was not compatible with new rules of your Magento2.
You should back-up current your database before you do as my suggesting.
Regards,
Mall.
its just for category or also products url needs same thing?
Yes, it just for your categories migrated.
Please back-up your database before any your action.
Regards,
Mall.
Ok, is there any other easy way, its bit complicated, please?
Hi there,
Ok, is there any other easy way, its bit complicated, please?
As you mentioned, your data migrated has some bad data which was not compatible with new working rules of Magento2.
And that steps are best way for your case. After that, Magento2 will re-generates category and product urls.
Regards,
Mall.
Ok i will do the steps,
One more thing, I migrated customers too but i can’t see in dashboard it says “No such entity.”
Hi there,
I migrated customers too but i can’t see in dashboard it says “No such entity.”
You have to re-index your data after migrate to see your customers in grid view.
#1054 -- Unknown column ‘‘category’’ in ‘where clause’
You have got that issue in what step of our tool? Let’s provide me the log file of our tool at: pub/ub-tool/protected/runtime/ub_data_migration.log
Regards,
Mall.
I already ran reindex command lin, You have to re-index your data after migrate to see your customers in grid view.? which command line i need to run please?
https://we.tl/7dQXMB7hpp You can download log file from link
let me know if you have any question?
Do you have skype?
Hi there,
#1054 — Unknown column ‘‘category’’ in ‘where clause’
I can’t find that issue in the log of our tool. Seem you got that issue with sql command as my suggesting in first reply. It seem you have use wrong sql. You should do steps as bellow:
Step 1: Run bellow sql in your database:
Delete From url_rewrite Where entity_type = 'category' OR entity_type = 'product';
Delete From catalog_url_rewrite_product_category;
Step 2: Open and re-save all your categories migrated to re-generate your catalog rewrite urls.
Regards,
Mall.
is that correct?
Hi there,
is that correct?
Yes, Maybe you have done that sql in first time. Let’s continue as my suggesting in first reply.
Regards,
Mall.
Now go each category and save it?
Don’t we first run html removing query you sent me before?
Also can you help me with customers? i reindexed but didn’t see it yet 🙁
Mall, Also in migrated product i can’t see inventory option, however in new product i can see inventory option
Attention
Sorry, we’re unable to complete this request.
when i try to set attributes
after watching this video
Attention
Sorry, we’re unable to complete this request.
when i try to set attributes
after watching this video
Hi there,
Sorry, we’re unable to complete this request.
Why you can’t do it? Let’s provide me the admin and ssh credentials of your Magento2 site.
Regards,
Mall.
I need your ip address to grant ssh access.
One more thing when I try to create new product i got this error
“Invalid entity_type specified” it was working fine before migration? Any idea How to resolve thanks!
Hi there,
Bellow are our office’s IPs:
113.190.252.133
118.70.176.221
113.190.254.239
Let’s provide me the admin credentials, ssh credentials and web root folder path of your Magento2.
I will check further and reply you later.
Regards,
Mall.
Please check this things
- Attribute Set
- Customers data not showing up in backend
- Can’t add products
Hello Mall,
- Attribute Set (I fixed it)
now only 2 errors i see can you help me please?
- Customers data not showing up in backend
- Can’t add products
Hello Mall,
- Attribute Set (I fixed it)
now only 2 errors i see can you help me please?
- Customers data not showing up in backend
- Can’t add products
1.Customers Data {no such entity}
2.Can’t add new products {
Invalid entity_type specified:
}
I tried reindexing and every thing
Hi sunny-dodeja305,
I have check your migrated database via Terminal and see the tables related to customer are in place now.
At this time, I have not found the root of issue related to Customer grid view in your back-end yet.
Could you please provide me with more information, what are steps you did before you when you got this issue? And did you install third party extensions before or after data migration? And did you make any changes to your database after migration?
Also, I see you have installed a lot of third-party extensions in your site now. Can you try to disable all third-party extensions so that we can debug and verify the migrated data issue first?
Regards,
Mall.
Hi there,
Also please provide me more the phpmyadmin credentials of your database. As it helps me debug faster than via terminal.
Regards,
Mall.
Hello can you provide me your email to send you phpmyadmin access?
Actually we didn’t make any major changes after migration, we can disable plugin, i also have backup copy after migration so i will try to unzip and ran it to make sure give me 1-2 hours to complete this process.
Thanks
Hello Mall,
Send me your email so i can send you php my admin access
I disable 2 recent plugin which i installed after migration
Hi there,
1.Customers Data {no such entity}
2.Can’t add new products {
Invalid entity_type specified:}
It is hard for me to detect the issues you mentioned in your instance now.
I have just made a back-up of your Magento1’s database to the file at: /home/devteagu/dev.teaguecustommarine.com/html/sunny_dodeja305_mg17x.sql.tar.gz
I need more time to proceed a testing migration with your database in my local. I will keep you updated once I can complete this step and debug the the issue.
Thanks for your patience.
Regards,
Mall.
Hello Mall,
thanks for your help, any idea when it can completed?
may b there is multiple store’s thats why getting error?
Thank you sir!
Hi there,
I have finished data migration with your Magento1’s database in my local: http://i.prntscr.com/3b446a3fa0714636a1c3963a2144f14d.png
1.Customers Data {no such entity}
2.Can’t add new products {
Invalid entity_type specified:}
I have checked again that issue after migration but I did not see that issues in my local instance:
You can see this for reference: http://i.prntscr.com/3e8b64022e3640fdabb2e71e3c8c5ca8.png
=> I can see all migrated Customers in back-end after re-indexing migrated data.
And I can access Add New Product form normally: http://i.prntscr.com/15216f4de74a4fe8940ce7e1dec842f5.png
So, we can confirm that, the issues in your instance comes from your customized settings or third-party extensions which you installed in your web site.
If you want, I can share you the back-up file of your database that I migrated in my local.
As your data volume is not big, please consider to re-migrate your data following steps below:
Step 1: Install a fresh Magento2.1.5 instance.
Step 2: Re-download the latest package of our tool -- v3.0.6 (You should re-download our package, because we have added more tweak code to handle some special cases with bad data, including one case as you mentioned in product data)
And then, install our tool to your new site.
Step 3: Start data migration with steps as our guide in the Readme.html included.
Step 4: Verify all your migrated data.
Step 5: Once done, you can install more third-party themes/extensions.
Regards,
Mall.
Yes please share files and database, is there any way i can shift all the pages and other staff from old instance?
Can i use your backup copy as you already migrated is that work?
Sure, Whats the credentials of Magento?
SQL query:
INSERT INTO `url_rewrite` VALUES (204417,’product’,942,’ss-flexible-drive-shower-1800.html’,’ss-flexible-drive-shower-2290.html’,301,2,NULL,0,NULL),(204418,’product’,942,’bravo-drive-showers/ss-flexible-drive-shower-1710.html’,’bravo-drive-showers/ss-flexible-drive-shower-2200.html’,301,2,NULL,0,’a:1:{s:11:\”category_id\”;i:174;}’),(204419,’product’,942,’ss-flexible-drive-shower-1800.html’,’ss-flexible-drive-shower-2290.html’,301,3,NULL,0,NULL),(204420,’product’,942,’bravo-drive-showers/ss-flexible-drive-shower-1710.html’,’bravo-drive-showers/ss-flexible-drive-shower-2200.html’,301,3,NULL,0,’a:1:{s:11:\”category_id\”;i:174;}’),(204421,’product’,942,’ss-flexible-drive-shower-1814.html’,’ss-flexible-drive-shower-2290.html’,301,2,NULL,0,NULL),(204422,’product’,942,’bravo-drive-showers/ss-flexible-drive-shower-1724.html’,’bravo-drive-showers/ss-flexible-drive-shower-2200.html’,301,2,NULL,0,’a:1:{s:11:\”category_id\”;i:174;}’),(204423,’product’,942,’ss-flexible-drive-shower-1814.html’,’ss-[…]
MySQL said:
#1064 - 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 ''oil' at line 1
getting error while import db
Let me do this way
I am unable to connect using this command line
could you dump database for me please?
mysql -H localhost -U devteagu_backupd -P test1243$1234 devteagu_backup < public_html/new/FILE_NAME.sql
ERROR 1064 (42000) at line 11090: You have an error in your SQL syntax; check th e manual that corresponds to your MySQL server version for the right syntax to u se near ”oil’ at line 1
same error from ssh too
I migrated data from scratch now seems all good
thank you all set now, i appreciate your help!
Hi there,
Yeah, let’s contact me if you need further assistance.
Regards,
Mall.
I am getting .html.html issue, before editing products there is only one .html but when i save products and category it turns into double html suffix any idea?
Hi there,
I am getting .html.html issue,
That issue because your database has some bad data in the value of url_key and request_path attributes in product section.
To solve that, let’s do steps as bellow:
Step 1: Run bellow sql in your database:
UPDATE catalog_category_entity_varchar SET value = REPLACE(value, '.html/', '/') WHERE attribute_id = 118;
UPDATE catalog_category_entity_varchar SET value = REPLACE(value, '.html', '') WHERE attribute_id = 118;
UPDATE catalog_product_entity_varchar SET value = REPLACE(value, '.html', '') WHERE attribute_id = 120;
DELETE FROM url_rewrite WHERE entity_type = 'category' OR entity_type = 'product';
DELETE FROM catalog_url_rewrite_product_category;
Step 2: Once done, let’s open and re-save for each Category migrated in back-end of your site. Magento will re-generate related catgory and product urls.
Regards,
Mall.
Thanks that’s solved the problem, however there is one More issue in url structure in old site the sub category is set without parent category name but in magento 2 after migration url generated with parent category name on sub category url any idea how to resolve?
Hi there,
however there is one More issue in url structure in old site the sub category is set without parent category name
I don’t see there is such an option in Magento 1.x default to exclude parent category path in category urls. It seem comes from your third-party extension or customized code of Magento1.
but in magento 2 after migration url generated with parent category name on sub category url any idea how to resolve?
That is default working rules of Magento2 core. It is not related to our tool.
In case you wish to customize that, you can follow this post: http://magento.stackexchange.com/questions/134988/how-to-remove-parent-category-from-subcategory-url/140363
Regards,
Mall.
Hello Mall,
I hope you are doing well, I am just finished with my project and in the process to get recent sales and customers, But after i migrated the last product I removed UB tool because I installed fresh magento 2-3 times and now when i try to update sales it says migrate product first but I already have product and I don’t want to migrate that, can you please assist me with that i really appreciate thanks!
Hi there,
We’ve just replied to you via email, kindly check.
Regards,
Ubertheme team
Hello,
I am almost finish with the migration thats just last step which i need help, but I’ll surely purchase your subscription again in next 1-2 months because i got one more website but i need to sign off from this one so please help i would appreciate.
Thanks!
Hi Sunny,
We’ve just replied to you via email. Kindly check.
Regards,
Ubertheme team