Using the latest dev, views 3.5, this js error appears on the views edit form for any fullcalendar display.

Error is coming from here

Drupal.fullcalendar.fullcalendar.prototype.submitInit = function (settings) {
  var domId = this.dom_id.replace('.view-dom-id-', '');
  var ajaxView = Drupal.settings.views.ajaxViews['views_dom_id:' + domId];

since Drupal.settings.views has no ajaxViews property (it has an ajax property, but changing that causes problems lower in the method).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

slcp’s picture

Also experiencing this. A result of this is that I am unable to edit the settings of the view with default Views settings, I am currently doing so with Javascript turned off in Views settings. Workable but not what we want!!!

Itangalo’s picture

I had a mysterious error where the entire calendar disappeared, and was replaced by an exposed date filter. After some experimentation, it turned out that the bug was related to ajax being enabled on the view.

My guess is that FullCalendar either requires some elements that are hidden if ajax is used, or that FullCalendar uses some ajax stuff that conflicts with Views' ajax.

Also: This issue *might* be related to #1830610: Weird error after adding a field.

a.milkovsky’s picture

the same problem

a.milkovsky’s picture

Status: Active » Needs review
FileSize
821 bytes

I added try..catch check for ajaxView.
Thih patch fixed issue for me.

manuelBS’s picture

Status: Needs review » Reviewed & tested by the community

+1 the patch works for me, too

diraol’s picture

+1 for the patch! Worked fine here.

manuelBS’s picture

This patch is now addded to the ERPAL distribution untill the patch is committed to fullcalendar.

tim.plunkett’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Needs work
+++ b/js/fullcalendar.ajax.js
@@ -25,7 +25,13 @@ Drupal.fullcalendar.fullcalendar.prototype.dateChange = function (fields) {
+  } catch (e) {
+    return;
+  }

Instead of just catching and hiding the error, can someone debug when it happens?

Alternately, provide steps to reproduce.

brockfanning’s picture

No time to debug, but I can report that this happens when "Auto preview" is enabled while editing a View. To work around this I've unchecked "Automatically update preview on changes" at /admin/structure/views/settings.

mglaman’s picture

Status: Needs work » Needs review
FileSize
2.06 KB

The error is because ajaxViews doesn't exist in admin - since we're in a single View's preview.

This is what is available on the admin side.

Drupal.settings.views.ajax
Object {id: "#views-ajax-body", title: "#views-ajax-title", popup: "#views-ajax-popup", defaultForm: "<div class="message">Click on an item to edit that item's details.</div>"}

Patch attached to check if this is defined. I can't get the calendar to render in admin regardless, so this at least makes it able to be edited.

a.milkovsky’s picture

makes sense, +1 for the patch

klokie’s picture

#10 works for me, thanks!

a.milkovsky’s picture

Status: Needs review » Reviewed & tested by the community
a.milkovsky’s picture

pfrenssen’s picture

Status: Reviewed & tested by the community » Needs work

Can we add a line of documentation to why Drupal.settings.views.ajaxViews might not be available? I.e. because we are previewing the results of a View.

Blanca.Esqueda’s picture

Had the same error, patch #10 works!!!

The patch start/end didn't math the lines of my file, but I applied manually and worked perfectly!