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:
- Write some text and add a URL to it
- Click on the option 'Show link preview'
- Notice the function working correctly while still in edit mode
- Save the page, click on done and the preview disappears
- Notice that reloading the page does not fix it
- Notice that returning to edit mode displays the preview again
- 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/):
Snip while in edit mode with "Show link preview" set:
snip after leaving edit mode with "Show link preview" set:
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)
Metadata
Assignees
Labels
Type
Projects
Status
☑️ Done