cowyo icon indicating copy to clipboard operation
cowyo copied to clipboard

Unable to render tables in pages?

Open vendion opened this issue 8 years ago • 4 comments

cowyo version: v2.1.0 OS: Arch Linux

I'm trying to create a page that contains a fairly long table, I formatted the data outside of Cowyo, using vim, and tested the syntax with Black Friday and that properly renders the HTML table structure. Feeling fairly certain that my syntax is good I copy and paste the data into a new Cowyo page giving it a few seconds to save just in case then I click "View" and there is no table in the rendered page. When I click "Edit" the data I previously pasted is also missing.

Oddly if I check the JSON file for the page I can see that the data is there just not in the "RenderedPage" section.

MissingTable.json TestMeters.txt

GitHub won't let me upload the JSON file with a .json extension so I renamed it to .txt but it is the actual file written by Cowyo.

vendion avatar May 08 '17 18:05 vendion

Because I use this as a public server I have a clause for preventing insertion of too much text (which might be abuse): https://github.com/schollz/cowyo/blob/master/handlers.go#L188-L191.

Since your table is so large, I expect that your table is not actually saving (does it say "Saved" after you wait a couple of seconds, or "Too much"?).

Are you running this locally? If so, I can add in a flag to remove this check for too much text.

schollz avatar May 08 '17 18:05 schollz

It says "Saved" before I attempt to click the view tab/btn I am running this on a local system 2017-05-08-150739_694x355_scrot

That does seem like it could be possible that I'm hitting that limit. Some kind of indicator would be nice as well.

vendion avatar May 08 '17 19:05 vendion

I wonder if the reason why I didn't trip the "Too much" status is because I copied and pasted the whole table at once, there for some how tricking whatever triggers the save.

vendion avatar May 09 '17 14:05 vendion

Hm, I am confused. I will try disabling the length check to see if I can save it at all.

schollz avatar May 10 '17 14:05 schollz