Closed (fixed)
Project:
CiviCRM Multiday Event
Version:
7.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 Sep 2012 at 14:50 UTC
Updated:
21 Feb 2013 at 23:10 UTC
When event is dragged and dropped to a new date on Fullcalendar, the Drupal node updates, but the CiviEvent date remains unchanged. Is this expected behavior? Thanks!
Comments
Comment #1
kreynen commentedThe Drupal node is not getting updated... the civicrm_multiday_session field in the field_collection entity is updated. The link to CiviCRM is in the hook_node_presave().
http://drupalcode.org/project/civicrm_multiday_event.git/blob/refs/heads...
I need to add some code to force a node_save when the entity is updated. Will update later today.
Comment #2
bcobin commentedYou rock - thanks.
Comment #3
kreynen commentedThis is actually turning out to be more complicated than I thought because of...
#1275686: FullCalendar drag-and-drop doesn't trigger node_validate()
Comment #4
bcobin commentedAHA! Nice sleuthing..
Even without the drag and drop feature, the module is still cooler thank anything. I will stay tuned... thanks!
Comment #5
kreynen commentedcommitted a fix... http://drupalcode.org/project/civicrm_multiday_event.git/commit/f81eda1
please test
Comment #6
bcobin commentedThanks, Kevin - yes, the date changes... but so does the title! It re-saves the title as per your specified protocol.
So node_save is working at least! Nice work...
Comment #7
kreynen commentedSorry. There is now an option in the config to control how the title updates.
Comment #8
bcobin commentedClient reported the date didn't change, but it checks out fine for me... great work!
You are a true rockstar.
Calendar looks awesome - expect to launch the site Monday and will report back. Have a great weekend!
Comment #9
bcobin commentedDrag and drop is no longer working after beta3 update. Tried clearing caches, all the usual. Drat!
To elaborate: there used to be a .js alert that appears at the top of the screen advising the change had been saved - that no longer appears and the change isn't saved.
Comment #10
kreynen commentedIs there an error in Admin -> Reports -> Recent log messages?
I don't think I'm doing anything that's core version specific, but what version of core, FullCalendar, and FieldCollection are you using?
Comment #11
bcobin commentedYes, actually:
Warning: rename(,/home/[site]/public_html/sites/default/files/civicrm/custom/) [function.rename]: No such file or directory in CRM_Core_BAO_CustomField::formatCustomField() (line 1650 of /home/suffolk/public_html/sites/all/modules/civicrm/CRM/Core/BAO/CustomField.php).
Versions are:
Core 7:15, FullCalendar 7.x-2.0-rc1 (this is a recent update - like yesterday - about when drag and drop stopped working, in fact) and Field collection 7.x-1.0-beta4.
Comment #12
bcobin commentedReviving this after a long hiatus to try to get CCMDE working again - CiviEvent date does not update with latest FullCalendar version. Suggest disabling drag and drop in FullCalendar view settings for admin calendar until this gets sorted.
Comment #13
bcobin commentedGradually sorting out issues here and I'm wondering if this has something to do with custom fields. Same error results when trying to create Drupal nodes via CiviEvent ID as reported at http://drupal.org/node/1856408
Unfortunately, the custom fields I'm using in CiviEvent can't be removed without losing important data, so I can't easily test this. The beat goes on...
Comment #14
kreynen commentedThis is likely a CiviCRM version issue. I made some notes about this in the code.
http://drupalcode.org/project/civicrm_multiday_event.git/blob/refs/heads...
Comment #15
bcobin commentedCurrently running 4.2.4 - do you think an upgrade to 4.2.6 might do the trick? In any event, it's time, although I don't think I can get to it before the weekend. Will report back... thank you eversomuch...
Comment #16
bcobin commentedOK - I did the upgrade to 4.2.6 - no change. Again, here's the error message that arrears in the logs (there's no error indication on the page), this time with the location and referrer:
LOCATION http://[site]/fullcalendar/ajax/update/drop/85
REFERRER http://[site]/admin/civicrm-multiday-events/manage
MESSAGE Warning: rename(,/home/[site]/public_html/sites/default/files/civicrm/custom/) [function.rename]: No such file or directory in CRM_Core_BAO_CustomField::formatCustomField() (line 1650 of /home/[site]/public_html/sites/all/modules/civicrm/CRM/Core/BAO/CustomField.php).
Cleared all caches, etc. Any ideas here? Will disable drag-and-drop for admin calendar for now and will not try to create Drupal nodes from existing CiviEvents... thanks!
Comment #17
bcobin commentedDrag and drop now seems to work with beta4 - great! Setting this to reviewed and tested by the community - thanks much!
Comment #18
coderdan commentedCleaning up the issue queue.