Currently we're using hook_fullcalendar_options_submit wrong, and it can occasionally break exported views.
In this case, it should be part of hook_fullcalendar_options_pre_view.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim.plunkett’s picture

Status: Active » Needs review
FileSize
8.06 KB

A large portion of this rewriting was done for #1206742: Contextual filters break Ajax views: Ajax date arguments should be replaced with hidden exposed filters but isn't related to it at all.

aspilicious’s picture

+++ b/includes/views/plugins/fullcalendar_plugin_style_fullcalendar.incundefined
@@ -87,10 +87,9 @@ class fullcalendar_plugin_style_fullcalendar extends views_plugin_style {
-    // If the options are from before the plugin system, update them.
+    // Move Colorbox settings into their own array.
     $options = $this->options;
-    if (!isset($options['fullcalendar'])) {
-      // Move Colorbox settings into their own array.
+    if (isset($options['colorbox']) && !is_array($options['colorbox'])) {
       $colorbox = array();

Can you explain this?

+++ b/includes/views/plugins/fullcalendar_plugin_style_fullcalendar.incundefined
@@ -99,10 +98,6 @@ class fullcalendar_plugin_style_fullcalendar extends views_plugin_style {
-
-      // Process the old values.
-      fullcalendar_include_api();
-      fullcalendar_process_options($options);
       $this->unpack_options($this->options, $options);

And this?

I didn't test it, but if colorbox still works and the options work than I don't see any problems.

tim.plunkett’s picture

The first hunk was running every time, it was supposed to be a way to detect legacy settings but it wasn't working, so I switched it.

The second part isn't needed, because I removed the fullcalendar_process_options() function altogether and moved it's code into fullcalendar_fullcalendar_options_pre_view().

aspilicious’s picture

Status: Needs review » Reviewed & tested by the community

Sounds good, didn't test it.

tim.plunkett’s picture

Status: Reviewed & tested by the community » Fixed
tim.plunkett’s picture

Status: Fixed » Needs review
FileSize
907 bytes

Hm, I seemed to have missed one thing, that the values hidden with dependency that are blank by default are getting values.
In this case, it's only the custom rewriting fields, so here's a patch that adds back hook_fullcalendar_options_submit for them.

tim.plunkett’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.