Jump to content
X2Community Forums

Failed to get import all data through X2Packager


Recommended Posts

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.

 

 

Link to post
Share on other sites

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.x2crm.com/topic/3232-help-on-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

Link to post
Share on other sites

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!

AdminController.php

post-11036-0-68398700-1492785087_thumb.png

Link to post
Share on other sites

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

Link to post
Share on other sites

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!

 

 

X2Package-x2AdminandACT.zip

post-11036-0-25463700-1493011697_thumb.png

AdminController.php

Link to post
Share on other sites
  • 2 years later...

Hello All,

 

I am facing below issue relating to job, please advise on this.

 

"Job failed with run time error through task scheduler but the same job run successfully when I activate the job manually".

I checked it script level which is a custom session and there is no code related to job, its a simple script to print the data from custom tables and standard tables.

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