text icon indicating copy to clipboard operation
text copied to clipboard

Table cells containing repeated newlines get garbled

Open asmecher opened this issue 1 year ago • 5 comments

Describe the bug When a collective contains a table, and the table cell contains consecutive newlines, the content gets garbled with a save/reload cycle.

To Reproduce Steps to reproduce the behavior:

  1. Create a new page inside a Collective.
  2. Insert a table into it.
  3. Enter content into a cell containing consecutive newlines. image (I entered these by copying a newline from the table and pasting it a couple times.)
  4. Save the page
  5. Load the page. See the changed content: image

The content appears to jump boundaries in the Markdown representation.

I would have filed this in the Nextcloud text editor repo, but I'm not able to reproduce the problem outside of Collectives, oddly!

Expected behavior The text should be unchanged after a save/reload cycle.

Server details:

  • Collectives app version: 2.9.1
  • Nextcloud version: 27.1.3
  • PHP Version: 8.1.25
  • Database: PostgreSQL 15.5

Client details:

  • OS: Ubuntu
  • Browser: Firefox
  • Browser version: 125.0.2
  • Device: Desktop

asmecher avatar May 02 '24 00:05 asmecher

Dear @asmecher, thanks for your report. This most likely is an issue in the Text app, thus I'll transfer the issue there.

mejo- avatar May 02 '24 09:05 mejo-

Thanks, @mejo- -- as I've noted above, I wasn't able to reproduce the issue in the text editor e.g. in Files, but could easily reproduce it in Collectives. Not sure why the difference.

asmecher avatar May 02 '24 19:05 asmecher

I tried to reproduce this with Collectives 2.10.1 on Nextcloud 29 an failed so far. Though there were some Tables related fixes in recent Text versions and you seem to run pretty outdated Nextcloud + Collectives versions. Could you upgrade your instance to Nextcloud 27.1.9 at least (ideally Nextcloud 28.0.5) and Collectives to 2.10.1 and see whether you're still able to reproduce the issue then?

mejo- avatar May 03 '24 11:05 mejo-

I've requested an upgrade, and will confirm the new version and whether the bug is reproducible when we've been able to get to it.

asmecher avatar May 22 '24 18:05 asmecher

I've upgraded to Collectives 2.12.0 and Nextcloud 29.0.2, and I can still reproduce the problem. If it helps, it appears you have to copy/paste multi-line content from a plaintext source, like a programmer's text editor.

https://github.com/nextcloud/text/assets/200411/46a38d58-9ec9-4c8f-8d0b-ec557f231639

asmecher avatar Jun 28 '24 19:06 asmecher

Indeed, still reproducible when pasting block content with newlines into a table cell.

Manually adding newlines in a table cell on the other hand works as expected.

mejo- avatar Sep 04 '24 15:09 mejo-