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

Titles over 256 chars prevent post submission #93

Open
tobias-g1 opened this issue Dec 8, 2018 · 1 comment
Open

Titles over 256 chars prevent post submission #93

tobias-g1 opened this issue Dec 8, 2018 · 1 comment

Comments

@tobias-g1
Copy link

Expected behavior

Upon creating a new post the front end should show that the title has a max length or it should be sliced upon submission via Steem connect.

Actual Behaviour

Upon creating a post if the title is greater than 256 characters, an error will be thrown by SteemConnect.

Steps to reproduce

  1. Go to https://alpha.1ramp.io/feed/
  2. Sign in using your Steem Account
  3. Click the floating menu option shown in the bottom right, select article
  4. Create a title with over 256 for example "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, s"
  5. Enter the body as "This is the body", the category as "Fashion" and the tag as "test".
  6. Submit the post to blockchain and note error.

Environment

  • Browser: Google Chrome (Version 70.0.3538.110 (Official Build) (64-bit))
  • Device: MacBook Pro (Retina, 15-inch, Late 2013)
  • Operating system: MacOS Mojave Version 10.14.1

Issue & Resolution

Upon submitting the post the blockchain the following error is shown for SteemConnect:

{"error":"server_error","error_description":"title.size() < 256: Title larger than size limit"}

using the following request:

{"operations":[["comment",{"parent_author":"","parent_permlink":"hapramp","author":"votezilla","permlink":"lorem-ipsum-dolor-sit-amet-consectetuer-adipiscing-elit-aenean-commodo-ligula-eget-dolor-aenean-massa-cum-sociis-natoque","title":"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, s","body":"<p>test</p>\n\n  <div id=\"1ramp-footer\" />\n  <hr>\n  <center>\n    <h4>\n      <a href=\"https://1ramp.io\">\n        <img src=\"https://ipfs.busy.org/ipfs/QmTFN4mf55SRZkP8Ug7jXVP3sXAmH7sd35zMNwLFpgGqNU\"/>\n      </a>\n      <br>\n      See this post on <a href=\"https://play.google.com/store/apps/details?id=com.hapramp\">1Ramp Android</a> and <a href=\"https://alpha.1ramp.io/@votezilla/lorem-ipsum-dolor-sit-amet-consectetuer-adipiscing-elit-aenean-commodo-ligula-eget-dolor-aenean-massa-cum-sociis-natoque\">Web</a>.\n    </h4>\n  </center>","json_metadata":"{\"tags\":[\"hapramp\",\"hapramp-photography\",\"photography\"],\"app\":\"hapramp/0.0.18\"}"}]]}

The title should be set have validation rules that only allow a user to enter 256 characters, alternatively a temporary quick resolution would be to .slice(0,255) the title and permlink prior to submission to the blockchain.

@singhpratyush
Copy link
Member

Thanks again for reporting and also providing an applicable solution :)

I will fix this soon as I can.

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

No branches or pull requests

2 participants