pitaj / nodebb-plugin-calendar

Fully-featured calendar plugin for NodeBB
42 stars 34 forks source link

Cannot read property 'pid' of null #108

Closed tom-rade closed 5 years ago

tom-rade commented 5 years ago

When visiting my calendar after deleting topics with events, I get this error:

Cannot read property 'pid' of null

I don't see any events anymore.

Alongside with this in the console:

nodebb_1  | (node:58) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'repeats' of null
nodebb_1  |     at repeats (/usr/src/app/node_modules/nodebb-plugin-calendar/src/lib/event.js:48:25)
nodebb_1  |     at process._tickCallback (internal/process/next_tick.js:68:7)
nodebb_1  | (node:58) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
nodebb_1  | (node:58) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
pitaj commented 5 years ago

So let me get this right: you deleted a topic in which the main post had an event, and after doing so the calendar view stopped working?

I'll look into it and see if I can reproduce.

tom-rade commented 5 years ago

@pitaj Yes, with the error: Cannot read property 'pid' of null

No events get loaded. Just an empty calendar appears.

tom-rade commented 5 years ago

@pitaj I tried it again, and yes, that is the case.

pitaj commented 5 years ago

I'm having trouble reproducing this. Was the topic or post purged? Can you grab the whole client-side error including the stack trace? Thanks.

pitaj commented 5 years ago

I've done what I can to try to remedy these issues. Try nodebb-plugin-calendar@1.0.0-alpha.45. Also, try editing and saving any posts with events in them, that may fix the problems you're seeing.