Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG REPORT] "save as draft" breaks if you paste content from ChatGPT #859

Open
rolandixor opened this issue Jan 23, 2025 · 5 comments
Open
Labels

Comments

@rolandixor
Copy link

Describe the bug
When you create a new draft and save it, you get thrown back to the drafts but no draft is created.

To Reproduce

  • Create draft.
  • Save draft.

Expected behavior
The draft is saved.

Screenshots/Errors
If applicable, add screenshots and/or error messages to help explain your problem. You may need to check your webserver's error logs.

HTMLy Version
Please list the exact version you are using (can be found on /admin/update next to "Installed Version").

Server Info (please complete the following information):

  • OS: Ubuntu 22.04.5
  • Webserver: Apache 2.4

Link to installation (optional, but usually helpful)

Additional context
Not sure if this only occurs in I create from drafts or create from add new post.

@rolandixor rolandixor added the bug label Jan 23, 2025
@rolandixor
Copy link
Author

rolandixor commented Jan 23, 2025

Further info, I've still not tracked the cause, but if I add nonsense like a single character in input, then it works. If I copy and paste a bunch of tags, post content, and the title, it comes up blank. It seems to be either the title or the slug that causes this bug.

EDIT: Been able to trigger the bug consistently by pasting the title from ChatGPT so far. Now I need to test if just pasting the title in general causes this.

@rolandixor rolandixor changed the title [BUG REPORT] "save as draft" not working [BUG REPORT] "save as draft" breaks if you paste content from ChatGPT Jan 23, 2025
@danpros
Copy link
Owner

danpros commented Jan 23, 2025

How long is this title? or tags? htmly save the slug (taken from the title) or tags as filename so it is possible that the filename exceeds that allowed by the OS.

Edit: Next release we will limit the max slug length generated by it.

@rolandixor
Copy link
Author

Not excessively long. I typed them manually and there was no issue. But, if I paste and then save the draft, it doesn't create the draft. I have to ensure to paste all the content for everything elsewhere before hitting save, just in case.

@rolandixor
Copy link
Author

Here are the tags (copied and pasted from ChatGPT):

CapCut, open-source, video editing, Kdenlive, Shotcut, OpenShot, editing tools, free editors, content creation, TikTok, privacy, alternatives, free video editors, video editing software.

@danpros
Copy link
Owner

danpros commented Jan 23, 2025

Try to copy and paste with shorter title or tags, during copy paste sometimes we include other char/words so it reached the OS character limit for filename.

2024-01-25-15-35-45_tag1,tag2_my-post-slug.md

See: https://docs.htmly.com/tips-trick/online-or-offline-writing

The current htmly limitation is limited to the characters allowed by the OS for a filename. If the slug is too long or has too many tags, it can exceed that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
@rolandixor @danpros and others