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.
Hi,
I just created a view as instructed on the project page. Everything seems to work fine on the live views preview, but when I create a page display and go to the path it displays all nodes in a list and not a calendar...
Is it a bug or am I missing something?
Thanks
Comments
Comment #1
jwhat CreditAttribution: jwhat commentedMake sure that in your view you add a Page and then set the following:
Style: FullCalendar
Row style: Node - FullCalendar
Path: a relative URL of your choice
Comment #2
gorgo CreditAttribution: gorgo commentedThe page display was using the default and I also double checked and tried overriding the defaults and manually choose Style: FullCalendar and Row style: Node - FullCalendar, and again on the views live preview it works great but on the the page.
It must do something because the result I get is:
[node-title] : [From-date] to [To-date]
and all nodes are wrapped in div class: fullcalendar_event
but they render one on top of the other, not as a calendar...
Comment #3
gorgo CreditAttribution: gorgo commentedComment #4
tim.plunkettCan you please post screenshots?
Comment #5
gorgo CreditAttribution: gorgo commentedI was gonna make some screen shots when I realized this might be a theme issue, so I switched to garland and it does fix the problem! so it's definitely something to do with my theme.
Does anybody have any idea what could cause this?
Both the views UI and the view path use the same basic page.tpl.php, so I'm really not sure why it would work on the views UI but not the view page....
Comment #6
gorgo CreditAttribution: gorgo commentedOK...
It turns out I had a conflict with a JS file in my theme.
Sorry for bothering everybody with this dumb error and thanks for the help!
Changing this to fixed.
Comment #7
ithacaindy CreditAttribution: ithacaindy commentedgorgo: what JS file was conflicting? I'm using the OpenPublish theme and have the same problem (inside views perfect, outside just a list.)
Comment #8
gorgo CreditAttribution: gorgo commentedI'm using a custom theme and it my own JS file.
I can have another look at the function that was causing the problem if you think it will help you, but will only be able to do it tomorrow...
Comment #9
nicholasThompsonThe problem appears to be if the page template puts the
$script
at the bottom. I moved it (in my custom theme) to the<HEAD>
and it worked fine.The issue is in
views-view-fullcalendar.tpl.php
-$(document)
doesn't exist if JQuery isn't loaded yet.Personally I think this is a pretty big problem as a lot of themes put
$script
at the bottom (for performance reasons). Maybe View settings should get pushed into the JS Settings array (using drupal_add_js)?Comment #10
jwhat CreditAttribution: jwhat commentedYet another bug that I fixed when working on #906112: handle drag and drop: creating events, rescheduling events. I replaced the $(document) notation with the proper Drupal behavior syntax: Drupal.behaviors.fullCalendar. Please see the patch on that issue for more info.
Comment #11
tim.plunkettAs much as I'd like to split up #906112: handle drag and drop: creating events, rescheduling events into all of the issues it addresses, we're so close with that issue that it's not worth it.