Hi there,
I’ve got an error message as belows; (p.s. It occurred while I was importing ../sql/ub_craft_v2.sql to my database. Theme:Craft for magento 2)
SQL 查詢:
—
— Constraints for table `eav_attribute`
—
ALTER TABLE `eav_attribute` ADD CONSTRAINT `FK_EAV_ATTRIBUTE_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID` FOREIGN KEY ( `entity_type_id` ) REFERENCES `eav_entity_type` ( `entity_type_id` ) ON DELETE CASCADE ON UPDATE CASCADE ;
MySQL 返回:文件
#1452 -- Cannot add or update a child row: a foreign key constraint fails (`apexever_jmcraft201`.`#sql-eba_297aee`, CONSTRAINT `FK_EAV_ATTRIBUTE_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_i)
Please tell me how to solve it. I would like you to tell me how to do rather than you just solve it.
I’m grateful for your help as soon as possible.
Regards,
Ken
Apexever
5 answers
Hi Ken,
Module ‘Magento_Core’: [ERROR] exception ‘PDOException’ with message ‘SQLSTATE[28000] [1045] Access denied for user ‘apexever’@’ns447.websitewelcome.com’ (using password: YES)’
To solve that issue, you need to re-check the Database connection information & Database User Privileges of User with name of ‘apexever’. Database user ‘apexever’ need have full of privileges.
Hi Ken,
I see the database user named ‘apexever_apex‘ in http://www.apexever.com/apexever/Privileges.png
The database was raised error with name of: ‘apexever‘ , you should re-check the Database user which you used when install Magento2 via wizard install.
Hi Ken,
Thanks for reply.I’ve followed your advice to insall and it was showing ‘Success” as the picture at http://www.apexever.com/apexever/q&a/success.png.
I’ve got two problems as followings:
1. I’ve got an ‘error 404 page not found’ after clicking ‘Launch magento admin’ button.
2. It redirected to ‘http://10.0.0.159/magento2/?SID=de6199a7852676a1623b67fd0719fa09’ after visiting my store a thttp://www.apexever.com/apexever/jmcraft201.
I have no idea why it was occurred. Please tell me how to do.
I see you have wrong setting the Store Address in step 2 (Web Configuration) the Store Address have to contain “/” at end.
You can do bellow steps to re-install the Magento2:
- Step 1: Delete the file at \app\etc\config.php
- Step 2: Delete all folders in \var\
- Step 3: Delete all folders in \pub\static\
- Re-install the Magento2 via Wizard install. Note setting correct Store Url in step 2.
Hi Ken,
Where did you download the data sample for crafts2 theme?
As you see our theme & data sample working fine at http://crafts.magento2.demo.ubertheme.com/
You should empty the Database used for this site and try import the ub_crafts_v2.sql in downloaded package from bellow links:
http://www.ubertheme.com/magento-themes/crafts-magento-2-theme/
or
https://github.com/ubertheme/crafts-magento-2-theme
And you can do bellow steps to re-install the Magento2:
- Step 1: Delete the file at \app\etc\config.php
- Step 2: Delete all folders in \var\
- Step 3: Delete all folders in \pub\static\
- Re-install the Magento2 via Wizard install. Note setting correct Store Url in step 2.
- Reindex data: Open SSH window and go to \dev\shell folder and type & run command line: php indexer.php reindexall
Give it a try & let me know how it goes.
Thanks for reply.I've followed your advice to insall and it was showing 'Success" as the picture at http://www.apexever.com/apexever/q&a/success.png.
I've got two problems as followings:
1. I've got an 'error 404 page not found' after clicking 'Launch magento admin' button.
2. It redirected to 'http://10.0.0.159/magento2/?SID=de6199a7852676a1623b67fd0719fa09' after visiting my store at http://www.apexever.com/apexever/jmcraft201.
I have no idea why it was occurred. Please tell me how to do.
Your prompt reply will be highly appreciated.
Best regards,
Ken
Apexever
Thanks for your reply.
I've added '/' as you said. I reinstalled Theme:Craft for magento 2, and then I've got 'Success' as before.(see picture at http://www.apexever.com/apexever/q&a/success_1.png)
I've got two errors as followings:
1. I've got into logging page as the picture at http://www.apexever.com/apexever/q&a/admin.png after clicking 'Launch magento admin' button. It took me more than 1 minute, then, it redirected to http://10.0.0.159/magento2/admin/admin/auth/forgotpassword/?SID=0f5bad74238b1a31dd4508f8c65d18362 after I've logged in.
2. It redirected to http://10.0.0.159/magento2/?SID=8200be9acd800c9b3aea9ad25f172894' after visiting my store at http://www.apexever.com/apexever/jmcraft201/.Do you have any solution?
Waiting for you.
Sincerely,
Ken
Apexever