nextcloud / nextcloud/richdocuments

Inserting file links via the smart picker inserts wrong link text

Open
#5,289 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
453
Forks
147
Avg merge
14h 54m
Merged PRs (30d)
83

Description

Describe the bug
When inserting file links via the Smart Picker in sheets, the first link for the session is entered for all inserted links as text. The real link behind is correct.

Let's say we have two file we want to link, /f/1234 and /f/5678. We insert /f/1234 into the first cell, the cell text and the hyperlink are the same (correct behavior). If we insert /f/5678 now in another cell, /f/1234 is written into the cell's text, the hyperlink however is correct.

This happens for each session, so after opening the document, the first link is always inserted correctly, every link after that has a wrong text.

To Reproduce
Steps to reproduce the behavior:

  1. Go to "Insert" > "Smart Picker"
  2. Select "Files"
  3. Select a file
  4. Select a different cell
  5. repeat 1-3 with a different file

Expected behavior
Every link is inserted with the correct text and hyperlink.

Screenshots

Client details:

  • OS: Linux Mint
  • Browser: 1.17.15b (Firefox 146.0.1) (64-Bit)
  • Device: desktop

Server details

Operating system: AIO manual deploy

Nextcloud version: 32.0.3

Version of the richdocuments app: 9.0.2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue through Insert > Smart Picker > Files in a sheet, then trace the Smart Picker link-insertion entry point and how successive selections supply link text. Done means each selected file produces its own visible text and correct hyperlink, including the second and later files in one session.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.