Skip to content

URL Previews break randomly #1231

Closed
nextcloud/text
#5834

Description

Describe the bug
When changing a URL preview to "Show link preview" and exiting edit mode, the link disappears entirely, leaving unformatted text and removing linebreaks afterwards. Reentering edit mode causes the preview to again be rendered correctly.
This is caused by the newest collectives version and the changes to the URL preview functionality.

To Reproduce
Steps to reproduce the behavior:

  1. Write some text and add a URL to it
  2. Click on the option 'Show link preview'
  3. Notice the function working correctly while still in edit mode
  4. Save the page, click on done and the preview disappears
  5. Notice that reloading the page does not fix it
  6. Notice that returning to edit mode displays the preview again
  7. Notice also that switching back to "Text only" causes the original text with the URL behind it to be displayed correctly

Expected behavior
The URL preview should always be rendered correctly.

Screenshots
Snip while in edit mode with the text and the URL while "Text only" is set (example link: https://www.myhighlands.de/tipps/annreise/anreise-mit-der-fahre/):
image

Snip while in edit mode with "Show link preview" set:
image

snip after leaving edit mode with "Show link preview" set:
image

Server details:

  • Installation type: Nextcloud AIO (Docker, Raspberry Pi 5)
  • Collectives app version: 2.10.1
  • Nextcloud version: 29.0.0
  • PHP Version: 8.2.18
  • Database: pgsql 15.6

Client details:

  • OS: Windows 11
  • Browser: Firefox
  • Browser version: 125.0.2
  • Device: Desktop
Logs

Nextcloud log (data/nextcloud.log)

No relevant log entries

Browser log

Insert your browser log here, this could for example include:

a) No javascript log entries
b) All network logs green (200)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

  • Status

    ☑️ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions