Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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).
Comment | File | Size | Author |
---|---|---|---|
#10 | uncaught_typeerror-1803770-10.patch | 2.06 KB | mglaman |
Comments
Comment #1
slcp CreditAttribution: slcp commentedAlso 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!!!
Comment #2
Itangalo CreditAttribution: Itangalo commentedI 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.
Comment #3
a.milkovskythe same problem
Comment #4
a.milkovskyI added try..catch check for ajaxView.
Thih patch fixed issue for me.
Comment #5
manuelBS CreditAttribution: manuelBS commented+1 the patch works for me, too
Comment #6
diraol CreditAttribution: diraol commented+1 for the patch! Worked fine here.
Comment #7
manuelBS CreditAttribution: manuelBS commentedThis patch is now addded to the ERPAL distribution untill the patch is committed to fullcalendar.
Comment #8
tim.plunkettInstead of just catching and hiding the error, can someone debug when it happens?
Alternately, provide steps to reproduce.
Comment #9
brockfanning CreditAttribution: brockfanning commentedNo 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.
Comment #10
mglamanThe 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.
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.
Comment #11
a.milkovskymakes sense, +1 for the patch
Comment #12
klokie CreditAttribution: klokie commented#10 works for me, thanks!
Comment #13
a.milkovskyComment #14
a.milkovskyComment #15
pfrenssenCan 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.Comment #16
Blanca.Esqueda CreditAttribution: Blanca.Esqueda as a volunteer and at Portage CyberTech commentedHad 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!