Jump to content
X2Community Forums

Unable to install sample data


Recommended Posts

I am stumped.

 

I am getting:

 

 

Installing X2CRM

Completed: set up core database structure
Completed: set up role-based access control (RBAC) permissions system
Completed: insert time zone data
Completed: install modules
Completed: apply configuration
Could not insert sample data. SQL statement "INSERT INTO `x2_trigger_logs` (`id`, `flowId`, `tr..." from /home/atlan144/public_html/0001/x2engine/protected/data/dummy_data.sql failed; 23000,1452,Cannot add or update a child row: a foreign key constraint fails (`atlan144_3ew`.`x2_trigger_logs`, CONSTRAINT `x2_trigger_logs_ibfk_1` FOREIGN KEY (`flowId`) REFERENCES `x2_flows` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)

 

I can install x2crm 100% -- BUT when I try to install with sample data - it fails :(

Link to post
Share on other sites

Hey bigbankclub,

 

One solution I would suggest is to go to the line that error is happening and remove the line of code where the row that is trying to be added is failing. This may be a bug on our end that slipped past us in development. Otherwise, I would advise against using dummy data as if you plan to use the app in the future, without using MySQL the dummy data will be hard to remove later on.

 

Edit: This actually is fixed in the newest release, we will be updating the Github soon.

  • Like 2
Link to post
Share on other sites
  • 1 month later...

I have retired since the last post.. still fails.. I have managed to get an older version to work, but I need to comment out a section of X2CRM-6.5/x2engine/protected/modules/users/data/install.sql

/*
ALTER TABLE `x2_calendar_permissions` ADD CONSTRAINT FOREIGN KEY (`userId`) REFERENCES x2_users(`id`) ON UPDATE CASCADE ON DELETE CASCADE;
*/

And the sample data works only on version: 6.5 and older... What gives for the NEW on? I had used the same method, but fails.

Link to post
Share on other sites
  • 3 weeks later...
  • 2 weeks later...
Error installing module "users". SQL statement "ALTER TABLE `x2_calendar_permissions` ADD CONSTRAI..." failed;HY000,1005,Can't create table `seanbrid_crm`.`#sql-58a8_3d53e` (errno: 150 "Foreign key constraint is incorrectly formed")

not sure what to do now...

Link to post
Share on other sites
  • 3 weeks later...

Hello bigbankclub,

 

Regarding the sample data error (from the original post), it appears that some of the sample data may be malformed. Particularly the line beginning with:

 

"INSERT INTO `x2_trigger_logs`..."

 

Please remove this line (and one of the delimiters: /*&*/) from protected/data/dummy_data.sql. This should fix this issue for now. We will be releasing a permanent fix to this in the next release.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...