Modal not opening -> js error #50

Closed
opened 2026-02-04 16:48:02 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @caplod on GitHub (Dec 11, 2020).

If you click on a card that has a comment from a deleted user, the modal doesnt open and there is a black page.

react-dom.production.min.js:216 TypeError: Cannot read property 'ref' of null

I think its this line:

export const actionsForCurrentCardSelector = createSelector(
  orm,
  (state) => pathSelector(state).cardId,
  (state) => currentUserIdSelector(state),
  ({ Card }, id, currentUserId) => {
    if (!id) {
      return id;
    }

    const cardModel = Card.withId(id);

    if (!cardModel) {
      return cardModel;
    }

    return cardModel
      .getOrderedInCardActionsQuerySet()
      .toModelArray()
      .map((actionModel) => ({
        ...actionModel.ref,
        isPersisted: !isLocalId(actionModel.id),
        user: {
          ...actionModel.user.ref, // <- here is the error because user is null
          isCurrent: actionModel.user.id === currentUserId,
        },
      }));
  },
);
Originally created by @caplod on GitHub (Dec 11, 2020). If you click on a card that has a comment from a deleted user, the modal doesnt open and there is a black page. `react-dom.production.min.js:216 TypeError: Cannot read property 'ref' of null` I think its this line: ``` export const actionsForCurrentCardSelector = createSelector( orm, (state) => pathSelector(state).cardId, (state) => currentUserIdSelector(state), ({ Card }, id, currentUserId) => { if (!id) { return id; } const cardModel = Card.withId(id); if (!cardModel) { return cardModel; } return cardModel .getOrderedInCardActionsQuerySet() .toModelArray() .map((actionModel) => ({ ...actionModel.ref, isPersisted: !isLocalId(actionModel.id), user: { ...actionModel.user.ref, // <- here is the error because user is null isCurrent: actionModel.user.id === currentUserId, }, })); }, ); ```
OVERLORD added the bug label 2026-02-04 16:48:02 +03:00
Author
Owner

@nickbe commented on GitHub (Dec 11, 2020):

Actually if you delete a user then his cards should be deleted with him OR the user might be only marked as deleted as long as there are other members on his boards.

This will be something to investigate in the new version though. And I don't think the follow up to user deletion is already fully implemented.

@nickbe commented on GitHub (Dec 11, 2020): Actually if you delete a user then his cards should be deleted with him OR the user might be only marked as deleted as long as there are other members on his boards. This will be something to investigate in the new version though. And I don't think the follow up to user deletion is already fully implemented.
Author
Owner

@caplod commented on GitHub (Dec 11, 2020):

Just to make things clear.
Not the owner of the card was deleted, only the user that made the comment on the card.

@caplod commented on GitHub (Dec 11, 2020): Just to make things clear. Not the owner of the card was deleted, only the user that made the comment on the card.
Author
Owner

@meltyshev commented on GitHub (Dec 13, 2020):

This is definitely a bug. Thank you for reporting. Already working on a fix.

@meltyshev commented on GitHub (Dec 13, 2020): This is definitely a bug. Thank you for reporting. Already working on a fix.
Author
Owner

@meltyshev commented on GitHub (Dec 13, 2020):

Fixed. Please check it out! Docker image will be available a bit later because it takes ~4 hours on my PC to build for all architectures.

@meltyshev commented on GitHub (Dec 13, 2020): Fixed. Please check it out! Docker image will be available a bit later because it takes ~4 hours on my PC to build for all architectures.
Author
Owner

@caplod commented on GitHub (Dec 17, 2020):

Hi, I just checked on hub.docker.com. When are you planning to release a new version?

@caplod commented on GitHub (Dec 17, 2020): Hi, I just checked on hub.docker.com. When are you planning to release a new version?
Author
Owner

@meltyshev commented on GitHub (Dec 17, 2020):

Oops, I forgot to start a build. Starting now...

@meltyshev commented on GitHub (Dec 17, 2020): Oops, I forgot to start a build. Starting now...
Author
Owner

@caplod commented on GitHub (Dec 20, 2020):

I just pulled the latest update.
Can confirm the bug was fixed ;-)

@caplod commented on GitHub (Dec 20, 2020): I just pulled the latest update. Can confirm the bug was fixed ;-)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#50