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

Error when too much text is entered in order status change notes #629

Closed
lukeholder opened this issue Jan 15, 2019 · 3 comments
Closed

Error when too much text is entered in order status change notes #629

lukeholder opened this issue Jan 15, 2019 · 3 comments
Assignees
Labels

Comments

@lukeholder
Copy link
Member

If we enter too much text in the 'note' field when we update the status of an order, the "Update" status button isn't working anymore and results in a 500 error.

If we enter a short text, like 200 characters, all is good and the status gets updated, but if we enter a longer text, like 400+ characters, clicking on the update button does nothing. In the Chrome inspector we can see it gets a 500 status and it throws the following error:

Uncaught TypeError: Cannot read property 'success' of null
CommerceOrderEdit.js:133

@lukeholder lukeholder added the bug label Mar 13, 2019
@nfourtythree
Copy link
Contributor

@lukeholder I was only able to replicate this based on a huge character limit, which actually then caused an SQL error due to the column type of the message attribute. I couldn't replicate it with a lower character count like 400, that worked perfectly fine.

My only thoughts on this would be to potentially have a large max character limit on the message attribute in the Order element. This would at least stop any 500 errors.

We would need to look into how we deal with the validation messages, especially as you can change multiple statuses in one go

@lukeholder
Copy link
Member Author

lukeholder commented Aug 22, 2019

Let's bump the message char limit on the order and orderhistories DB tables, and then add a front-end javascript (or html5 input maxlength?) limit to match.

@lukeholder
Copy link
Member Author

lukeholder commented Aug 22, 2019

Reminder, Commerce 3 alpha the status change message is in the order edit vue app, so need to change input validation there also.

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

2 participants