You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
findBoardId(): Argument #1 ($id) must be of type int, string given when opening file attachment in card — popup freezes #7760
Describe the bug
When opening a file attachment inside a Deck card, the card popup expands to fullscreen and freezes. The UI becomes unresponsive and the card cannot be closed without a page reload.
Steps to reproduce
Open a Deck board
Open a card that has a file attachment
Click on the attachment to open it
Card popup freezes and expands fullscreen
Expected behaviour
The file opens normally without the popup freezing. Actual behaviour
The popup freezes. The following error appears in the Nextcloud log:
TypeError: OCA\Deck\Db\CardMapper::findBoardId(): Argument #1 ($id) must be of type int, string given, called in /var/www/html/nextcloud/apps/deck/lib/Sharing/DeckShareProvider.php on line 984
app: no app in context
Nextcloud version: 33
Deck version: 1.17.0 (latest available for NC 33)
Browser: [Firefox]
OS: macOS
Reacted by pureions, Steve Dinn, Marcel K, miroivo, Martí Oliver, benniekiss, Dennis1993, MhhhxX, fekici, cj2-ruben and 7 more
This is also manifesting in the files app. I guess there is a hook in place to find the card that a file might be attached to when files are moved. This same error is preventing me from moving files around.
#7761 will fix the type error and make attachments movable again.
The popup view inside cards seems not to be related to this however according to my testing. The file view is still shown if the card is opened in the sidebar and not in the big view. So there's a second issue that makes the file view not render correctly.
This also happens when Nextcloud Office Collabora tries to save a document, which is really annoying.
It's invoking this error over Activities and then returning 500 because of the error. Argument #1 ($id) must be of type int, string given
Workaround was to set the incoming string as an int $boardId = $this->cardMapper->findBoardId((int)$cardId);
I'm the reporter of #7419, which hits the same underlying defect via a different call site. Posting here so the two threads are cross-linked — might help with triage since this looks like one defect class, not two separate bugs.
In #7419 (NC 32.0.9.2, Deck 1.16.4), the crash happens via ShareAPIHelper::formatShare():
$boardId = $this->cardMapper->findBoardId($card->getId());
// $boardId can legitimately be null here (per its own ?int contract)// when the card's stack_id points to a hard-deleted stack — but the// result is passed straight into linkToRouteAbsolute() without a check.
I confirmed this against production data: a card whose stack_id pointed to a stack that no longer existed in oc_deck_stacks at all (not soft-deleted, just gone — likely a board deletion that didn't cascade properly). findBoardId() correctly returned null, but nothing downstream checked for that before generating the route, which threw Symfony's InvalidParameterException for an empty boardId.
Here, DeckShareProvider.php:984 calls the same CardMapper::findBoardId() but with strict int typing on the parameter, so a non-int-coercible value throws a TypeError instead — a different exception, but plausibly the same broken card → stack → board chain reaching the same function without a guard.
If that's correct, a fix would need two things in findBoardId()'s callers: (1) treat a null result as "skip this entry" rather than passing it through (relevant to #7419's call site), and (2) make sure the value handed to findBoardId() itself is always a valid int before the call (relevant to this issue's call site). I posted a more detailed writeup with a suggested minimal patch over in #7419 if it's useful context.
Activity
SteveDinn commentedon Mar 17, 2026
This is also manifesting in the files app. I guess there is a hook in place to find the card that a file might be attached to when files are moved. This same error is preventing me from moving files around.
miroivo commentedon Mar 18, 2026
Following the NC33 upgrade, I am seeing the same error on my side. Are there any known workarounds?
grnd-alt commentedon Mar 18, 2026
#7761 will fix the type error and make attachments movable again.
The popup view inside cards seems not to be related to this however according to my testing. The file view is still shown if the card is opened in the sidebar and not in the big view. So there's a second issue that makes the file view not render correctly.
benniekiss commentedon Mar 19, 2026
This sounds related to my issue in #7713 as well
Dennis1993 commentedon Apr 9, 2026
Same here in 33.0.2 with Deck 1.17.0
fekici commentedon Apr 9, 2026
I have the same problem in 33.0.2 with Deck 1.17.0
cj2-ruben commentedon Apr 24, 2026
This also happens when doing a full textsearch index:
Superjamp commentedon May 19, 2026
This also happens when Nextcloud Office Collabora tries to save a document, which is really annoying.
It's invoking this error over Activities and then returning 500 because of the error.
Argument #1 ($id) must be of type int, string givenWorkaround was to set the incoming string as an int
$boardId = $this->cardMapper->findBoardId((int)$cardId);luka-nextcloud commentedon May 25, 2026
Closing this as we already have a separate task for the modal broken issue - #7916
Githopp192 commentedon Jun 20, 2026
Possible same root cause as #7419
I'm the reporter of #7419, which hits the same underlying defect via a different call site. Posting here so the two threads are cross-linked — might help with triage since this looks like one defect class, not two separate bugs.
In #7419 (NC 32.0.9.2, Deck 1.16.4), the crash happens via
ShareAPIHelper::formatShare():I confirmed this against production data: a card whose
stack_idpointed to a stack that no longer existed inoc_deck_stacksat all (not soft-deleted, just gone — likely a board deletion that didn't cascade properly).findBoardId()correctly returnednull, but nothing downstream checked for that before generating the route, which threw Symfony'sInvalidParameterExceptionfor an emptyboardId.Here,
DeckShareProvider.php:984calls the sameCardMapper::findBoardId()but with strictinttyping on the parameter, so a non-int-coercible value throws aTypeErrorinstead — a different exception, but plausibly the same broken card → stack → board chain reaching the same function without a guard.If that's correct, a fix would need two things in
findBoardId()'s callers: (1) treat anullresult as "skip this entry" rather than passing it through (relevant to #7419's call site), and (2) make sure the value handed tofindBoardId()itself is always a validintbefore the call (relevant to this issue's call site). I posted a more detailed writeup with a suggested minimal patch over in #7419 if it's useful context.