Primefaces: Schedule - Attempting to call a FullCalendar method on an element with no calendar.

Created on 25 Sep 2020  路  5Comments  路  Source: primefaces/primefaces

under Primefaces 6.x works perfectly!

Environment:

  • PF Version: 7.0.16
  • jsf-api version: 2.1.29-11
  • Affected browsers: Chrome, Firefox

To Reproduce
Steps to reproduce the behavior:

  1. switch into site with scheduler first error message:
    Attempting to call a FullCalendar method on an element with no calendar.
  2. when i click on week or day button then following error and rendered content for week or day is empty

Expected behavior
jQuery.Deferred exception: s is undefined o@http://localhost:7001/merlin/ line 2 > injectedScript:7:29229
each@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:2976
each@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:1454
o@http://localhost:7001/merlin/ line 2 > injectedScript:7:29192
o@http://localhost:7001/merlin/ line 2 > injectedScript:7:27945
o@http://localhost:7001/merlin/ line 2 > injectedScript:7:27704
p@http://localhost:7001/merlin/ line 2 > injectedScript:9:26675
f@http://localhost:7001/merlin/ line 2 > injectedScript:11:3097
p@http://localhost:7001/merlin/ line 2 > injectedScript:7:18405
o@http://localhost:7001/merlin/ line 2 > injectedScript:9:23737
r@http://localhost:7001/merlin/ line 2 > injectedScript:9:22357
r@http://localhost:7001/merlin/ line 2 > injectedScript:9:22187
r@http://localhost:7001/merlin/ line 2 > injectedScript:9:21989
p@http://localhost:7001/merlin/ line 2 > injectedScript:7:15532
e@http://localhost:7001/merlin/ line 2 > injectedScript:6:16681
dispatch@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:43107
add/v.handle@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:41091
trigger@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:71530
triggerHandler@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:72209
s@http://localhost:7001/merlin/ line 2 > injectedScript:6:16933
a@http://localhost:7001/merlin/ line 2 > injectedScript:8:4640
a@http://localhost:7001/merlin/ line 2 > injectedScript:8:4033
a@http://localhost:7001/merlin/ line 2 > injectedScript:8:4866
e@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:30005
l/@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:30307
setTimeout handlerl/<@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:30516
c@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:28294
fireWith@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:29039
fire@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:29075
c@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:28294
fireWith@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:29039
Deferred/@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:30940
construct/<@http://localhost:7001/merlin/ line 2 > injectedScript:6:25720
e@http://localhost:7001/merlin/ line 2 > injectedScript:6:16681
i@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:40073
dispatch@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:43107
add/v.handle@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:41091
trigger@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:71530
triggerHandler@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:72209
s@http://localhost:7001/merlin/ line 2 > injectedScript:6:16933
u@http://localhost:7001/merlin/ line 2 > injectedScript:12:1088
u@http://localhost:7001/merlin/ line 2 > injectedScript:12:1022
u@http://localhost:7001/merlin/ line 2 > injectedScript:11:30524
e@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:30005
l/@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:30307
setTimeout handler
l/<@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:30516
c@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:28294
fireWith@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:29039
fire@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:29075
c@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:28294
fireWith@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:29039
Deferred/@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:30940
construct/<@http://localhost:7001/merlin/ line 2 > injectedScript:6:25720
a@http://localhost:7001/merlin/ line 2 > injectedScript:9:19898
handle@http://localhost:7001/merlin/ line 2 > injectedScript:13:3053
doUpdate@http://localhost:7001/merlin/javax.faces.resource/core.js.xhtml?ln=primefaces&v=7.0.16:3:11922
handle@http://localhost:7001/merlin/javax.faces.resource/core.js.xhtml?ln=primefaces&v=7.0.16:3:10373
onsuccess@http://localhost:7001/merlin/ line 2 > injectedScript:13:3010
send/u<@http://localhost:7001/merlin/javax.faces.resource/core.js.xhtml?ln=primefaces&v=7.0.16:3:8064
c@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:28294
fireWith@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:29039
l@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:79817
o/<@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:82271
EventHandlerNonNull*send@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:82457
ajax@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:78240
send@http://localhost:7001/merlin/javax.faces.resource/core.js.xhtml?ln=primefaces&v=7.0.16:3:7725
offer@http://localhost:7001/merlin/javax.faces.resource/core.js.xhtml?ln=primefaces&v=7.0.16:3:2830
handle@http://localhost:7001/merlin/javax.faces.resource/core.js.xhtml?ln=primefaces&v=7.0.16:3:3577
setupEventSource/this.cfg.events@http://localhost:7001/merlin/ line 2 > injectedScript:13:3117
a@http://localhost:7001/merlin/ line 2 > injectedScript:9:19824
construct@http://localhost:7001/merlin/ line 2 > injectedScript:6:25704
a@http://localhost:7001/merlin/ line 2 > injectedScript:9:19795
u@http://localhost:7001/merlin/ line 2 > injectedScript:11:30371
u@http://localhost:7001/merlin/ line 2 > injectedScript:11:30195
f@http://localhost:7001/merlin/ line 2 > injectedScript:11:27613
f@http://localhost:7001/merlin/ line 2 > injectedScript:11:26141
H@http://localhost:7001/merlin/ line 2 > injectedScript:10:14039
p@http://localhost:7001/merlin/ line 2 > injectedScript:7:16648
@http://localhost:7001/merlin/ line 2 > injectedScript:7:26033
a@http://localhost:7001/merlin/ line 2 > injectedScript:8:4813
c@http://localhost:7001/merlin/ line 2 > injectedScript:8:5279
a@http://localhost:7001/merlin/ line 2 > injectedScript:8:5474
e@http://localhost:7001/merlin/ line 2 > injectedScript:6:16681
dispatch@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:43107
add/v.handle@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:41091
trigger@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:71530
triggerHandler@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:72209
s@http://localhost:7001/merlin/ line 2 > injectedScript:6:16933
a@http://localhost:7001/merlin/ line 2 > injectedScript:8:4612
a@http://localhost:7001/merlin/ line 2 > injectedScript:8:4033
p@http://localhost:7001/merlin/ line 2 > injectedScript:7:16454
H@http://localhost:7001/merlin/ line 2 > injectedScript:10:7105
H@http://localhost:7001/merlin/ line 2 > injectedScript:10:2845
undefined

Example XHTML

<h:form>
        <p:schedule id="calendarcontactsSchedule" widgetVar="calendarcontactsSchedule"
                    locale="#{localeController.locale}"
                    value="#{calendarcontactsController.scheduleModel}"
                    resizable="false" clientTimeZone="local"
                    slotLabelFormat="HH:mm" timeFormat="HH:mm">
            <p:ajax event="eventMove" listener="#{calendarcontactsController.onEventMove}"
                    immediate="true" process="@this"
                    update="#{frontendComponentHelper.resolve('kundenkontaktepanel')}
                            #{frontendComponentHelper.resolve('kundenkontakteFilterPanel')}
                            #{frontendComponentHelper.resolve('mitarbeiterkontaktetable')}"/>
            <p:ajax event="eventSelect" listener="#{calendarcontactsController.onSelect}"
                    immediate="true" process="@this"
                    update="#{frontendComponentHelper.resolve('kundenkontaktepanel')}
                            #{frontendComponentHelper.resolve('kundenkontaktescrollpanel')}
                            #{frontendComponentHelper.resolve('kundenkontakteFilterPanel')}
                            #{frontendComponentHelper.resolve('kundeinfo')}
                            #{frontendComponentHelper.resolve('mitarbeiterkontaktetable')}
                            #{frontendComponentHelper.resolve('actionCommands')}
                            #{frontendComponentHelper.resolve('kundeKontakteCreate')}"/>
        </p:schedule>
</h:form>
8.0.4 duplicate

Most helpful comment

well if @StevenHachel creates a Reproducer we will know for sure.

Please follow the issue template or provide an executable example using the PrimeFaces Test project. It is the only way developers can debug your problem to help.

All 5 comments

Can you please check your issue against 9.0-SNAPSHOT?
There had been a good amount of changes in Schedule the last years. With PF 8.0 we updated FullCalendar from 3.x o 4.x With PF 9.0 we updated FullCalendar from 4.x to 5.x. And FullCalender made massive internal changes on it麓s way from 3.x to 5.x. (see https://fullcalendar.io/blog)

I believe the issue is this: https://github.com/primefaces/primefaces/issues/6157

Already fixed in 8.0.4

I posted a workaround here: https://github.com/primefaces/primefaces/issues/6156#issuecomment-662402159 if you can't upgrade to 8.0.4. Just hide a <p:button first thing on your page.

I believe the issue is this: #6157

Already fixed in 8.0.4

I don麓t think so, because i introduced #6157 with 8.0 as part of the FullCalender 3.x --> 4.x - update.

And when we look into his callstack it looks like jquery was loaded. (as expected for 7.x)
triggerHandler@http://localhost:7001/merlin/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&v=7.0.16:2:72209

well if @StevenHachel creates a Reproducer we will know for sure.

Please follow the issue template or provide an executable example using the PrimeFaces Test project. It is the only way developers can debug your problem to help.

Was this page helpful?
0 / 5 - 0 ratings