Step #5 Error

[mtwotest@sip4-1134 html]$ php bin/ubdatamigration run --step=5
Processing in step #5…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………….
Status: fail
Message: 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 ‘AND attribute_id = 79 AND store_id = 0 LIMIT 1’ at line 1. The SQL statement executed was: SELECT * FROM `catalog_product_entity_datetime` `t` WHERE entity_id =  AND attribute_id = 79 AND store_id = 0 LIMIT 1

22 answers

Profile photo of Mall Staff 110580.00 $tone January 5, 2019
Public

Hi there,

MySQL server version for the right syntax to use near ‘AND attribute_id = 79 AND store_id = 0 LIMIT 1’ at line 1. The SQL statement executed was: SELECT * FROM `catalog_product_entity_datetime` `t` WHERE entity_id =  AND attribute_id = 79 AND store_id = 0 LIMIT 1

That issue because your M1 database has some bad records in table ‘catalog_product_super_link’.
To handle for that case, you could try with steps below:
+ Download the PHP file at here
+ Upload replace downloaded file to the file at path: pub/ub-tool/protected/controllers/Step5Controller.php
+ Once done, you could continue with data migration in the step #5 of our migration tool by run CLI command:
php -f bin/ubdatamigration run --step=5
Regards,
Mall.
 

#1
Profile photo of Mall Staff 110580.00 $tone January 7, 2019
Public

Hi there,

would you please help me fixing this issue.

That is Magento’s note only. Let’s index the data to clean that. 
Also, please do full steps of data migration as indicated in the guide of our migration tool in readme.html
Regards,
Mall.

#3
Profile photo of aswan 350.00 $tone January 7, 2019
Public

I re-run full migration steps and clean the cache the reindex and here’s what i got
 
[mtwotest@sip4-1134 html]$ php -f bin/magento indexer:reindex
Design Config Grid index has been rebuilt successfully in 00:00:00
Customer Grid index has been rebuilt successfully in 00:00:01
Category Products index has been rebuilt successfully in 00:00:00
Product Categories index has been rebuilt successfully in 00:00:00
Catalog Rule Product index has been rebuilt successfully in 00:00:00
Product EAV index has been rebuilt successfully in 00:00:01
Stock index has been rebuilt successfully in 00:00:00
Inventory index has been rebuilt successfully in 00:00:00
Catalog Product Rule index has been rebuilt successfully in 00:00:00
No linked stock found
Catalog Search index has been rebuilt successfully in 00:00:00
[mtwotest@sip4-1134 html]$
 

#4
Profile photo of Mall Staff 110580.00 $tone January 7, 2019
Public

Hi there,

No linked stock found

That is strange. Let’s try reset indexers and reindex the data once more:
php -f bin/magento indexer:reset
php -f bin/magento indexer:reindex
Once done, run the command: 
php -f bin/magento indexer:status
And provide me the captured screenshots of the result.
Regards,
Mall.
 
 

#5
Profile photo of aswan 350.00 $tone January 7, 2019
Public

+———————-+——————+———--+———————+———————+
| Title                | Status           | Update On | Schedule Status     | Schedule Updated    |
+———————-+——————+———--+———————+———————+
| Catalog Product Rule | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 15:30:03 |
| Catalog Rule Product | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 15:30:37 |
| Catalog Search       | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 15:30:40 |
| Category Products    | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 15:30:37 |
| Customer Grid        | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 15:30:36 |
| Design Config Grid   | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 15:30:34 |
| Inventory            | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 15:30:39 |
| Product Categories   | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 15:30:03 |
| Product EAV          | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 15:30:39 |
| Product Price        | Reindex required | Schedule  | idle (0 in backlog) | 2019-01-07 15:30:39 |
| Stock                | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 15:30:39 |
+———————-+——————+———--+———————+———————+
[mtwotest@sip4-1134 html]$

#6
Profile photo of Mall Staff 110580.00 $tone January 7, 2019
Public

Hi there,

| Product Price        | Reindex required | Schedule  | idle (0 in backlog) | 2019-01-07 15:30:39 |

That is required to reindex. Let’s try reindex for that by run below command:
php -f bin/magento indexer:reindex catalog_product_price
Once done run the command: php -f bin/magento indexer:status
And provide me the captured screenshots of the result.
Regards,
Mall.
 

#7
Profile photo of aswan 350.00 $tone January 7, 2019
Public

[mtwotest@sip4-1134 html]$ php -f bin/magento indexer:reindex catalog_product_price
No linked stock found
Catalog Search index has been rebuilt successfully in 00:00:00
[mtwotest@sip4-1134 html]$ php -f bin/magento indexer:status
+———————-+——————+———--+———————+———————+
| Title                | Status           | Update On | Schedule Status     | Schedule Updated    |
+———————-+——————+———--+———————+———————+
| Catalog Product Rule | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 15:43:03 |
| Catalog Rule Product | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 15:43:03 |
| Catalog Search       | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 15:43:03 |
| Category Products    | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 15:43:03 |
| Customer Grid        | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 15:43:03 |
| Design Config Grid   | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 15:43:03 |
| Inventory            | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 15:43:03 |
| Product Categories   | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 15:43:03 |
| Product EAV          | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 15:43:03 |
| Product Price        | Reindex required | Schedule  | idle (0 in backlog) | 2019-01-07 15:43:03 |
| Stock                | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 15:43:03 |
+———————-+——————+———--+———————+———————+

#8
Profile photo of Mall Staff 110580.00 $tone January 7, 2019
Public

Hi there,
Let’s try change ‘Update On’ of the indexers to ‘Save’ and then reindex the data once more.
And tell me know how it goes.
Regards,
Mall

#9
Profile photo of aswan 350.00 $tone January 7, 2019
Public

I chaned it from “Update by Schedule” to “Update on Save” via the Magento Admin then I run the below
[mtwotest@sip4-1134 html]$ php -f bin/magento indexer:reindex
Design Config Grid index has been rebuilt successfully in 00:00:00
Customer Grid index has been rebuilt successfully in 00:00:01
Category Products index has been rebuilt successfully in 00:00:01
Product Categories index has been rebuilt successfully in 00:00:00
Catalog Rule Product index has been rebuilt successfully in 00:00:00
Product EAV index has been rebuilt successfully in 00:00:01
Stock index has been rebuilt successfully in 00:00:00
Inventory index has been rebuilt successfully in 00:00:00
Catalog Product Rule index has been rebuilt successfully in 00:00:00
No linked stock found
Catalog Search index has been rebuilt successfully in 00:00:00
[mtwotest@sip4-1134 html]$ php -f bin/magento indexer:status
+———————-+——————+———--+———————+———————+
| Title                | Status           | Update On | Schedule Status     | Schedule Updated    |
+———————-+——————+———--+———————+———————+
| Catalog Product Rule | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 16:01:03 |
| Catalog Rule Product | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 16:01:37 |
| Catalog Search       | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 16:01:39 |
| Category Products    | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 16:01:37 |
| Customer Grid        | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 16:01:36 |
| Design Config Grid   | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 16:01:34 |
| Inventory            | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 16:01:39 |
| Product Categories   | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 16:01:03 |
| Product EAV          | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 16:01:38 |
| Product Price        | Reindex required | Save      |                     |                     |
| Stock                | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 16:01:39 |
+———————-+——————+———--+———————+———————+
 

#11
Profile photo of aswan 350.00 $tone January 7, 2019
Public

That is required to reindex. Let’s try reindex for that by run below command:
php -f bin/magento indexer:reindex catalog_product_price
Once done run the command: php -f bin/magento indexer:status
And provide me the captured screenshots of the result.

I chaned it from “Update by Schedule” to “Update on Save” via the Magento Admin then I run the below
[mtwotest@sip4-1134 html]$ php -f bin/magento indexer:reindex
Design Config Grid index has been rebuilt successfully in 00:00:00
Customer Grid index has been rebuilt successfully in 00:00:01
Category Products index has been rebuilt successfully in 00:00:01
Product Categories index has been rebuilt successfully in 00:00:00
Catalog Rule Product index has been rebuilt successfully in 00:00:00
Product EAV index has been rebuilt successfully in 00:00:01
Stock index has been rebuilt successfully in 00:00:00
Inventory index has been rebuilt successfully in 00:00:00
Catalog Product Rule index has been rebuilt successfully in 00:00:00
No linked stock found
Catalog Search index has been rebuilt successfully in 00:00:00
[mtwotest@sip4-1134 html]$ php -f bin/magento indexer:status
+———————-+——————+———--+———————+———————+
| Title                | Status           | Update On | Schedule Status     | Schedule Updated    |
+———————-+——————+———--+———————+———————+
| Catalog Product Rule | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 16:01:03 |
| Catalog Rule Product | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 16:01:37 |
| Catalog Search       | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 16:01:39 |
| Category Products    | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 16:01:37 |
| Customer Grid        | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 16:01:36 |
| Design Config Grid   | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 16:01:34 |
| Inventory            | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 16:01:39 |
| Product Categories   | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 16:01:03 |
| Product EAV          | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 16:01:38 |
| Product Price        | Reindex required | Save      |                     |                     |
| Stock                | Ready            | Schedule  | idle (0 in backlog) | 2019-01-07 16:01:39 |
+———————-+——————+———--+———————+———————+

#13
Profile photo of aswan 350.00 $tone January 7, 2019
Public

[mtwotest@sip4-1134 html]$ php -f bin/magento indexer:status
+———————-+——————+———--+—————--+——————+
| Title                | Status           | Update On | Schedule Status | Schedule Updated |
+———————-+——————+———--+—————--+——————+
| Catalog Product Rule | Ready            | Save      |                 |                  |
| Catalog Rule Product | Ready            | Save      |                 |                  |
| Catalog Search       | Ready            | Save      |                 |                  |
| Category Products    | Ready            | Save      |                 |                  |
| Customer Grid        | Ready            | Save      |                 |                  |
| Design Config Grid   | Ready            | Save      |                 |                  |
| Inventory            | Ready            | Save      |                 |                  |
| Product Categories   | Ready            | Save      |                 |                  |
| Product EAV          | Ready            | Save      |                 |                  |
| Product Price        | Reindex required | Save      |                 |                  |
| Stock                | Ready            | Save      |                 |                  |
+———————-+——————+———--+—————--+——————+
[mtwotest@sip4-1134 html]$

#14
Profile photo of Mall Staff 110580.00 $tone January 8, 2019
Public

Hi there,

| Product Price        | Reindex required | Save      |                 |                  |

That is strange. Let’s provide me information about your instance:
+ Admin credentials and URL to back-end
+ SSH credentials and path to Magento folder
I will help to check further and get back you then.
Regards,
Mall.

#15
Profile photo of Mall Staff 110580.00 $tone January 9, 2019
Public

Hi there,

I have connected to your server via SSH and saw the issue of Catalog Product Price indexer’s function:

No linked stock found

I debugged further and found the root issue that relates to the data in Magento’s core table named ‘inventory_stock_sales_channel’. You could see this screenshot: http://i.prntscr.com/BQEAhv0RQ96HKpLlfSRKcQ.png
As you see, your database has 4 frontend websites with the website codes: base, base_migrated, dsc_migrated, jt_migrated. 
But there is only one data record for the website code ‘base’ in the table ‘inventory_stock_sales_channel’. And that is the root of Magento’s issue with the indexer function above.
These data records were automatically added by Magento’s function. I didn’t know why they were missing for other websites. To solve that issue, you must manually insert those records. And you could run the following SQLs in your M2 database to add the missing data records:

INSERT INTO `inventory_stock_sales_channel` (`type`, `code`, `stock_id`) VALUES ('website', 'base_migrated', '1');
INSERT INTO `inventory_stock_sales_channel` (`type`, `code`, `stock_id`) VALUES ('website', 'dsc_migrated', '1');
INSERT INTO `inventory_stock_sales_channel` (`type`, `code`, `stock_id`) VALUES ('website', 'jt_migrated', '1');

+ Once done, reindex the data at your end and let me know how it goes.

Regards,
Mall.

#19
Profile photo of ubdev Staff 39580.00 $tone January 9, 2019
Public

Hi there,
Beside the manual SQL Mall did suggeste above, you can select another alternative option.
You navigate to the store management, then simply open each website and click Save respectively, then the missing data records will be automatically added by Magento.
Regards,
Ubertheme team

#20
Profile photo of aswan 350.00 $tone January 9, 2019
Public

I did the alternative option and that fixed the indexing issue.
 
thank you so much for the help!
 
a side question, do you guys have a service to install themes without reinstalling Magento and loos all the work we’ve done?

#21
Profile photo of ubdev Staff 39580.00 $tone January 9, 2019
Public

Hi there, 
We’ve replied to you via email regarding the theme installation inquiry. Please check and follow up further with us there. 
Regards,
Ubertheme team

#22

Please login or Register to Submit Answer

Written By

Comments