Cannot read property 'footprint' of undefined
melask opened this issue ยท 13 comments
I've not tried to use this with an electron app before, was it ever working for you?
Yes. Until electron 7 was working perfect!
please help me
Have you updated your version of fullcalendar
at the same time?
In my demo repo, I am using version 3.9.0
and I don't have this issue.
I have the same problem, at some point the full calendar stopped working, I will try to use version 3.9.0 you mention to solve it
@BrockReece I have updated fullcalendar
to version 3.9.0
and still th same issue. I will look further and inform you if I find anything which solves this.
Current version:
"vue-full-calendar": {
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/vue-full-calendar/-/vue-full-calendar-2.8.0.tgz",
"integrity": "sha512-+yYEuuolSG6TzBO50e1eae7UB+rjIc/vFXOrH43JwWQ2pX3EAMSY2xE+EtWvBE0N49MJv3xROgY3I2t7OQPV4w==",
"requires": {
"babel-plugin-transform-runtime": "^6.23.0",
"fullcalendar": "3.10.1",
"lodash.defaultsdeep": "^4.6.0"
},
"dependencies": {
"fullcalendar": {
"version": "3.10.1",
"resolved": "https://registry.npmjs.org/fullcalendar/-/fullcalendar-3.10.1.tgz",
"integrity": "sha512-E0ioaHVmwdS4es8pNTUNva7505wPkUMFdn9JGFLYo+J12ARhN3zDBwoPj2DfB8rL7Yc1sSve+FqDHC3s2SZ7Fw=="
}
}
},
When dragining i get this error: app.js:130181 Uncaught TypeError: Cannot read property 'footprint' of undefined.
Well the calendar "works" but i cannot see visual, if anything is happening. Except if I go to next collumn.
I also tryed to use my previous version which was working fine, but it does not show the callendar anymore and i get the following warning:
[Vue warn]: Error in mounted hook: "TypeError: cal.fullCalendar is not a function"
"vue-full-calendar": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/vue-full-calendar/-/vue-full-calendar-2.7.0.tgz",
"integrity": "sha512-H6qrox4UwHXdIMuKeb9CjtbZFHYmL8AMU+DFtLbS4/qW3mqktNcKESqkduQfeu8+xw1szdatJsXLrBt3zbqZzA==",
"requires": {
"babel-plugin-transform-runtime": "^6.23.0",
"fullcalendar": "^3.4.0",
"lodash.defaultsdeep": "^4.6.0"
}
},
My fix, which is temporary at the moment:
"node-modules/vue-full-calendar/node_modules/dist/fullcalendar.js"
EventRenderer.prototype.renderFgSegEls = function (segs, disableResizing) {
var _this = this;
if (disableResizing === void 0) { disableResizing = false; }
var hasEventRenderHandlers = this.view.hasPublicHandlers('eventRender');
var html = '';
var renderedSegs = [];
var i;
if (segs.length) { // don't build an empty html string
// build a large concatenation of event segment HTML
for (i = 0; i < segs.length; i++) {
this.beforeFgSegHtml(segs[i]);
html += this.fgSegHtml(segs[i], disableResizing);
}
// Grab individual elements from the combined HTML string. Use each as the default rendering.
// Then, compute the 'el' for each segment. An el might be null if the eventRender callback returned false.
$(html).each(function (i, node) {
var seg = segs[i];
var el = $(node);
if (seg !== undefined) {
if (hasEventRenderHandlers) { // optimization
el = _this.filterEventRenderEl(seg.footprint, el);
}
if (el) {
el.data('fc-seg', seg); // used by handlers
seg.el = el;
renderedSegs.push(seg);
}
}
});
}
return renderedSegs;
};
i added if (seg !== undefined)
, i just fixed it to prepare for a presentation.
Will propably implement official fullcalendar/fullcalendar-vue package when I have time.
Check jQuery version in your node_modules packages.
I noticed if jquery version is 3.5.1 then this package doesn't work anymore.
If I manually copy/revert jquery to version 3.4.1 it works fine.
I guess the fix would be to change fullcalendar depandancy from version 3.10.1 to 3.10.2 which adds support for jquery 3.5.1:
https://github.com/fullcalendar/fullcalendar/releases/tag/v3.10.2
It works just add in your package.json: "jquery": "3.4.1",
and "vue-full-calendar": "^2.8.0",
. If you use ^ at jquery it updates to a new version and does not work anymore.
@BenySLO I have released vue-full-calendar@2.8.1-0
that fixes the jquery
version to 3.4.1
as you suggested.
It works just add in your package.json:
"jquery": "3.4.1",
and"vue-full-calendar": "^2.8.0",
. If you use ^ at jquery it updates to a new version and does not work anymore.
To anybody coming to this page, this is what solved my issue of Cannot read property 'footprint' of undefined
@BenySLO I have released
vue-full-calendar@2.8.1-0
that fixes thejquery
version to3.4.1
as you suggested.
In my package.json: "vue-full-calendar": "^2.8.1-0"
and everything works perfect now. Thank you all !
My versions:
- vue-cli: 4.54
- electron: 10.1.1
- ue-cli-plugin-electron-builder: 2.0.0-rc.4
p.s: have tested it also with electron 7 and 9