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

Receive server error when Label information isn't entered #2225

Closed
brent-hoover opened this issue May 9, 2017 · 14 comments
Closed

Receive server error when Label information isn't entered #2225

brent-hoover opened this issue May 9, 2017 · 14 comments
Assignees
Labels
bug For issues that describe a defect or regression in the released software

Comments

@brent-hoover
Copy link
Collaborator

Expected behavior

Some validation should be performed if you don't enter fields that are required to create the record

Actual Behavior

Receive a server error and "There are no changes to publish".

Steps to Reproduce the Behavior

  1. Create product
  2. Bypass "Variant Details" and create options.
  3. Publish
  4. Observe server error
Exception while invoking method 'revisions/publish' Error: Label is required
    at getErrorObject (packages/aldeed_collection2-core.js:480:15)
    at [object Object].doValidate (packages/aldeed_collection2-core.js:462:13)
    at [object Object].Mongo.Collection.(anonymous function) (packages/aldeed_collection2-core.js:214:25)
    at [object Object].Mongo.Collection.(anonymous function) [as update] (packages/dispatch_run-as-user.js:325:19)
    at [object Object].Meteor.methods.revisions/publish (imports/plugins/core/revisions/server/methods.js:142:38)
    at packages/check.js:130:16
    at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
    at Object.exports.Match._failIfArgumentsAreNotAllChecked (packages/check.js:129:41)
    at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1734:18)
    at packages/ddp-server/livedata_server.js:719:19
    at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
    at packages/ddp-server/livedata_server.js:717:40
    at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
    at packages/ddp-server/livedata_server.js:715:46
    at [object Object]._.extend.protocol_handlers.method (packages/ddp-server/livedata_server.js:689:23)
    at packages/ddp-server/livedata_server.js:559:43

Versions

Node: 7.10.0
NPM: 4.2.0
Meteor Node: 4.8.2
Meteor NPM: 4.5.0
Reaction CLI: 0.8.1
Reaction: 1.1.1
Reaction branch: development
Docker: 17.03.1-ce
@brent-hoover brent-hoover added the bug For issues that describe a defect or regression in the released software label May 10, 2017
@spencern
Copy link
Contributor

I'm seeing this error as well. It happens when you don't fill in the title on the product, the label on a variant, or the label on a option.

Shows the "No changes to publish" alert to the user, even though there are icons indicating changes need to be published.

Same error as @zenweasel on the server

image

@michael-alade michael-alade self-assigned this May 12, 2017
@michael-alade
Copy link

michael-alade commented May 16, 2017

@brent @spencern Also the Label is required error happens when you don't add a label on the variant details panel. As for the toast message, I think an actual validation error toast should replace the no changes to publish.

@spencern
Copy link
Contributor

@michael-alade - there is a case where there are multiple validation errors. I agree that there should be a toast alert letting the user know that there are validation errors, but i don't think that's enough. We also need error states on any form field that is not valid and should expand and highlight any accordion that has invalid information as well. I feel that the accordion headers should have invalid states and styles as well.

@rymorgan any thoughts on this?

@brent-hoover
Copy link
Collaborator Author

@spencern The question is if we want to hold up this fix while we wait for design or just revisit separately.

@spencern
Copy link
Contributor

If we've got a fix done, ship it and make a new issue for the validation I'd say, but it's a high priority issue for me either way.

@brent-hoover
Copy link
Collaborator Author

Right, the issue is the one we created yesterday. #2276

@spencern
Copy link
Contributor

👍

@brent-hoover
Copy link
Collaborator Author

Closed via PR #2276 (not the ticket of the same name)

@aaronjudd
Copy link
Contributor

@zenweasel @michael-alade I've re-opened this issue because while we should not see server errors here, the client should validate and should also ideally open contextually and highlight error source. While having error alerts (which I think is what #2276 added) -> was a step in the right direction, it is still not a satisfactory solution for the user experience. If the outcome of this is to create a new issue with @rymorgan's feedback, that'd be ok, but it's a real usability issue as it stands now.

@rymorgan
Copy link
Contributor

@zenweasel @aaronjudd @michael-alade -- I pulled this issue into the design project and will get to it later this week.

@brent-hoover
Copy link
Collaborator Author

I am pretty sure I already created a separate issue for PDP validation.

@brent-hoover
Copy link
Collaborator Author

#2274

@rymorgan
Copy link
Contributor

@zenweasel gotcha 👍

@aaronjudd
Copy link
Contributor

Close in favor of #2274

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For issues that describe a defect or regression in the released software
Projects
None yet
Development

No branches or pull requests

5 participants