Jump to content


Photo

Error when Create Action

Create Action bug staff response

  • Please log in to reply
8 replies to this topic

#1 Paolo

Paolo

    Member

  • Members
  • PipPip
  • 13 posts

Posted 14 February 2017 - 05:39 AM

there is a bug when you create an action and you try to add to a calendar.
this is the returned error
 

Error Code: 500
Error Message: CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`x2crmnems`.`x2_actions`, CONSTRAINT `calendarId` FOREIGN KEY (`calendarId`) REFERENCES `x2_calendars` (`id`) ON DELETE SET NULL ON UPDATE CASCADE)
Stack Trace: 
X2Engine Version: 6.5.2
PHP Version: 5.6.30-0+deb8u1




#2 X2Raymond

X2Raymond

    Advanced Member

  • Administrators
  • 898 posts
  • LocationSanta Cruz, CA

Posted 20 February 2017 - 10:59 AM

Hello Paolo,

 

This sounds like it is due to a bug in calendar association that was patched for the next release. Please see the answer in another thread here for more information and patch instructions: http://community.x2c...ser/#entry12612

 

Raymond



#3 Paolo

Paolo

    Member

  • Members
  • PipPip
  • 13 posts

Posted 20 February 2017 - 11:26 AM

Hello Raymond,

I am sorry but I have not the credential to see that thread.



#4 X2Raymond

X2Raymond

    Advanced Member

  • Administrators
  • 898 posts
  • LocationSanta Cruz, CA

Posted 20 February 2017 - 11:37 AM

Hello Paolo,

 

Please find the answer pasted below:

 

Following up on the calendar issue: this issue is caused due to the use of an arrray_merge instead of the plus operator, which in turn squashes the keys of the associative array. You can patch your instance by updating both protected/modules/actions/views/actions/_actionForm.php and protected/modules/actions/views/actions/_form.php, around lines 82 and 307 respectively, to use the plus operator. After modifying, the code in question should read:

            $editableCalendars =
                array('' => Yii::t('actions', 'None')) +
                X2CalendarPermissions::getEditableUserCalendarNames();


#5 Paolo

Paolo

    Member

  • Members
  • PipPip
  • 13 posts

Posted 21 February 2017 - 02:55 AM

Hello Raymond,
I applied the patch and now the action is associated with the calendar without the previous error.
But I found another problem when the associated calendar is a Google calendar.
In this case the action is present locally in the calendar but not in the Google calendar.


#6 X2Raymond

X2Raymond

    Advanced Member

  • Administrators
  • 898 posts
  • LocationSanta Cruz, CA

Posted 21 February 2017 - 09:50 AM

Hello Paolo,

 

Excellent, that's good to hear!

 

Regarding the calendar sync, are you able to see remote Google Calendar events in your X2 calendar? When you visit the calendar edit page, can you confirm that the remote calendar you chose is still associated to the calendar? What about your web server error log, or the X2 error log at protected/runtime/errors.log? Do either contain an error message or stack trace for that request?

 

Raymond



#7 Paolo

Paolo

    Member

  • Members
  • PipPip
  • 13 posts

Posted 22 February 2017 - 02:13 AM

Hello Raymond,

I confirm that calendar sync works, I can view in the X2crm calendar section all the remote Google calendar records.
I am able to create/modify etc.. event in the X2crm calendar page and the record appears in the remote Google calendar (and vice versa).
The problem is when I create an action and I select a calendar that is associated to a Google calendar. The record is presented locally (in the X2crm calendar page) but no synchronization is performed.
In the error log file no new line is written.


#8 X2Raymond

X2Raymond

    Advanced Member

  • Administrators
  • 898 posts
  • LocationSanta Cruz, CA

Posted 23 February 2017 - 10:58 AM

I can confirm there is a bug present when syncing Actions created from the action create screen and not the calendar. This was due to Actions with an empty type being excluded from syncing. This has been resolved for the next release, thanks for reporting this issue!



#9 Paolo

Paolo

    Member

  • Members
  • PipPip
  • 13 posts

Posted 23 February 2017 - 02:05 PM

Hello Raymond,
my compliments for the great system your team developed and for the efficent technical support.
I will continue to utilize/analize the crm, if I find other problems I will open a new thread.
 
paolo 






Also tagged with one or more of these keywords: Create Action bug, staff response

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users