Jump to content


Move an event between calendars, how?

staff response

  • Please log in to reply
3 replies to this topic

#1 aris



  • Members
  • Pip
  • 2 posts

Posted 16 April 2017 - 02:37 PM



Very new to X2CRM.


How do you move an event from one calendar to another?


Using the UI, not the API.



#2 X2Raymond


    Advanced Member

  • Administrators
  • 972 posts
  • LocationSanta Cruz, CA

Posted 20 April 2017 - 10:21 AM

To move an event between calendars with the current UI, you'll need to get to the full edit page for that action. This is easy to do if your Calendar Event is associated with another record, as you'll be able to navigate to the full edit page after bringing up the initial edit dialog. If it is not associated with a record, retrieve it's Action id, then update the URL in your address bar to the path "index.php/actions/update/id/3410", replacing 3410 with your Action id.


For anyone who lands here and would like to use the API, you'll want to set the Actions' calendarId to the ID of your target Calendar.

#3 aris



  • Members
  • Pip
  • 2 posts

Posted 24 April 2017 - 10:52 AM

Hello again,


Thanks for the feedback. I tested moving Actions between calendars using the full edit and that works. Great.


However, I ran into a problem trying to edit a regular Calendar Event not associated with a record.


To retrieve the event id, I looked at the event pop-up dialog HTML and the div had the id="#dialog-content_14". Using id 14 with the action update URL you suggested brought up the correct event. I changed the calendar and hit "Save". Good so far.


Then one strange thing happened. The event pop-up dialog (comes up when you click on an event on the calendar) now had an extra button: "None". I admit, I cannot remember if I clicked on it or not.


Then another strange thing happened: each time I would create or edit an Action that would use this calendar, on "Save" I would get the following error:


Error 500

It looks like the application ran into an unexpected error.

We apologize for the inconvenience and would like to do our best to fix this issue. If you would like to make a post on our forums we can actively interact with you in getting this resolved. If not, simply sending the error report helps us immensely and will only improve the quality of the software. Thanks!

Send Error Report


Here's a quick list of what will be included in the report:


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 (`myalbino_x2307`.`x2_actions`, CONSTRAINT `calendarId` FOREIGN KEY (`calendarId`) REFERENCES `x2_calendars` (`id`) ON DELETE SET NULL ON UPDATE CASCADE)
Stack Trace: [click to toggle display]
X2Engine Version: 6.5.2
PHP Version: 5.6.30



I can still create regular calendar events on the affected calendar but can no longer create Actions that get added to the affected calendar. Other calendars can be successfully used for Actions, no error.


I hit "Send Error Report" and your system logged it with bug ID 6012


What do you think made the calendar un-relatable to Actions?

Do you think there is a way I can fix the calendar so it can be used for Actions again?



#4 X2Raymond


    Advanced Member

  • Administrators
  • 972 posts
  • LocationSanta Cruz, CA

Posted 24 April 2017 - 11:53 AM

Ah yes, this appears to be due to a different bug that was patched early in this release cycle. Please see my answer here for a description of the fix: http://community.x2c...ser/#entry12612. This patch fixes an issue in associating the calendar with that dropdown, which previously could have selected a non-existent calendar. Once you've applied the patch, please retest associating an event to the affected calendar.




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