Skip to content

Fix federated null-user read mark lookup for card comments - #8752

Open
mayankm00007 wants to merge 1 commit into
nextcloud:mainfrom
mayankm00007:fix/federated-readmark-null-user
Open

mayankm00007 wants to merge 1 commit into
nextcloud:mainfrom
mayankm00007:fix/federated-readmark-null-user

Conversation

@mayankm00007

Copy link
Copy Markdown

Summary

Avoid calling getReadMark() when the request has no logged-in user, which happens for federated board loads. This prevents the 500 error on stacks with commented cards while preserving unread-comment tracking for real user sessions.

This fix keeps the comment count, but skips the read-mark lookup and unread count calculation when $user === null.

TODO

  • Validate with the project unit test suite in a PHP-enabled environment

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Tests (unit, integration, api and/or acceptance) are included
  • Documentation (manuals or wiki) has been updated or is not required

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

Avoid calling commentsManager::getReadMark() when no local user exists for the request, which caused 500s on federated board stacks with commented cards.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Federated board stacks return 500: getReadMark() called with null user in CardService::enrichCards()

1 participant