Jump to content


Photo

Unable to install sample data

sampledata install sql

  • Please log in to reply
9 replies to this topic

#1 bigbankclub

bigbankclub

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 08 January 2018 - 08:34 AM

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 :(



#2 bigbankclub

bigbankclub

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 08 January 2018 - 08:56 AM

I should have mentioned.

 

This is on the NEW version. 6.9

 

 



#3 X2Isaiah

X2Isaiah

    Advanced Member

  • Moderators
  • 256 posts

Posted 08 January 2018 - 09:48 AM

Hey bigbankclub,

 

Would you mind informing me of your OS, PHP version, and if this is with specifically 6.9 or with our newest version 6.9.3?


Isaiah Solomon

Software Engineer

X2Engine Inc.


#4 bigbankclub

bigbankclub

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 08 January 2018 - 10:02 AM

Current: PHP 5.6

 

OS: Linux

 

6.9 download. 



#5 X2Isaiah

X2Isaiah

    Advanced Member

  • Moderators
  • 256 posts

Posted 08 January 2018 - 10:20 AM

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.


Isaiah Solomon

Software Engineer

X2Engine Inc.


#6 bigbankclub

bigbankclub

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 08 January 2018 - 10:31 AM

Thank you :)



#7 bigbankclub

bigbankclub

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 20 February 2018 - 08:54 AM

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.



#8 asadali3210

asadali3210

    Member

  • Members
  • PipPip
  • 17 posts

Posted 11 March 2018 - 11:20 AM

Hi All, 

 

As a help to fix this issue, see this youtube video... 

 


X2CRM Engineer @ ROIGap LLC.


#9 bigbankclub

bigbankclub

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 20 March 2018 - 03:08 AM

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...



#10 X2Peter

X2Peter

    Advanced Member

  • Administrators
  • 62 posts

Posted 04 April 2018 - 03:27 PM

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.







Also tagged with one or more of these keywords: sampledata, install, sql

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users