Skip to content

[stable30] fix(comments): use showFile route to reference files with a matching … - #54828

Merged
AndyScherzinger merged 1 commit into
stable30from
backport/54826/stable30
Sep 3, 2025
Merged

[stable30] fix(comments): use showFile route to reference files with a matching …#54828
AndyScherzinger merged 1 commit into
stable30from
backport/54826/stable30

Conversation

@backportbot

@backportbotbackportbotBot commented Sep 3, 2025

Copy link
Copy Markdown

Backport of #54826

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@kesselb

kesselb commented Sep 3, 2025

Copy link
Copy Markdown
Contributor

Conflicts: Psalm baseline (we are less strict in stable30 hence the deprecations are missing).

@kesselb
kesselb marked this pull request as ready for review September 3, 2025 10:04
return new SearchResultEntry(
$link = $this->urlGenerator->linkToRoute(
'files.View.showFile',
['fileid' => $result->fileId]

Check notice

Code scanning / Psalm

DeprecatedProperty Note

OCA\Comments\Search\Result::$fileId is marked deprecated
Comment threadapps/comments/lib/Search/CommentsSearchProvider.php Fixed
$this->authorName = $authorName;
$this->fileName = basename($path);
$this->path = $this->getVisiblePath($path);
$this->fileId = $fileId;

Check notice

Code scanning / Psalm

DeprecatedProperty Note

OCA\Comments\Search\Result::$fileId is marked deprecated
…comment
The files.view.index route with dir and scrollto is deprecated and
opening the actual does not work anymore.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb
kesselbforce-pushed the backport/54826/stable30 branch from 362f9cd to e390c82CompareSeptember 3, 2025 10:16
'',
true
);
$searchResultEntry->addAttribute('fileId', (string) $result->fileId);

Check notice

Code scanning / Psalm

DeprecatedProperty Note

OCA\Comments\Search\Result::$fileId is marked deprecated
@AndyScherzinger
AndyScherzinger merged commit 9771be2 into stable30Sep 3, 2025
185 of 188 checks passed
@AndyScherzinger
AndyScherzinger deleted the backport/54826/stable30 branch September 3, 2025 11:37
@nextcloud-botnextcloud-bot mentioned this pull request Sep 4, 2025
5 tasks
@nextcloud-botnextcloud-bot mentioned this pull request Sep 18, 2025
@nextcloud-botnextcloud-bot mentioned this pull request Sep 25, 2025
2 tasks
@blizzzblizzz mentioned this pull request Oct 14, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@kesselb@AndyScherzinger@provokateurin@github-advanced-security