Jump to content


Photo

Failed to get import all data through X2Packager

staff response

  • Please log in to reply
4 replies to this topic

#1 Member

Member

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 20 April 2017 - 04:58 AM

Hi,

 

i'm new X2CRM. when i try to import all Custom/Flows/Modules. i'm getting below error. can  someone please help on this.

 

Failed to apply package! CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'PRIMARY'

 

whereas the same when i try to export the roles alone and import it is getting imported successfully.

 

 



#2 X2Raymond

X2Raymond

    Advanced Member

  • Administrators
  • 898 posts
  • LocationSanta Cruz, CA

Posted 20 April 2017 - 10:28 AM

Hello,

 

Another user recently encountered a similar issue which I believe is due to the IDs of the exported records being inadvertently included, please see their thread here: http://community.x2c...packager-video/. I've followed up in a private message with a pending patch. Please let me know if this alleviates your packager issues or if you experience any other issue that may be related.

 

Thanks,

Raymond



#3 Member

Member

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 21 April 2017 - 06:13 AM

Hi Ray,

 

Attaching the file in which i have updated the patch. after a new installation of x2crm i just applied the patch file and logged into instances then i went to admin->Customize tools->x2Packager.

 

when i click on import button. i'm getting Integrity Constraint Error. PFA.

 

correct me if i'm wrong with the Above Execution steps. Please let me know how to fix this issue.

 

Thanks in Advance!

Attached Files



#4 X2Raymond

X2Raymond

    Advanced Member

  • Administrators
  • 898 posts
  • LocationSanta Cruz, CA

Posted 21 April 2017 - 01:54 PM

Yes, that is the proper ordering of steps, thanks for confirming. Ahhh yes, we'll need to also ensure the Fields model will include IDs when importing to satisfy the relation between the Role to permission mapping and the Field. Please try adding 'Fields' to the $readIdFields array in AdminController.importPackageRecords() and retest the import. Please let me know how this goes and we can continue exploring the appropriate stability fixes. Would you mind also forwarding me a copy of your exported package? Feel free to send it in a PM or email if you'd prefer.

 

Thanks!

Raymond



#5 Member

Member

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 23 April 2017 - 09:31 PM

Hi Ray,

 

     Sorry for the late reply! and Thanks for your continuous support :)

 

As you suggest i have updated the' Fields' value in AdminController.importPackageRecords(). however, i'm getting SQL error. PFA

 

i have also attached the package which i'm trying to import it.

 

Seeking your help in fixing this issue.

 

 

Thanks in Advance!

 

 

Attached Files







Also tagged with one or more of these keywords: staff response

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users