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

Cannot create property 'path' on string 'required' #2245

Closed
bharatpareek opened this issue Feb 26, 2019 · 4 comments
Closed

Cannot create property 'path' on string 'required' #2245

bharatpareek opened this issue Feb 26, 2019 · 4 comments
Labels
Milestone

Comments

@bharatpareek
Copy link

bharatpareek commented Feb 26, 2019

⚠️ CORE TEAM EDIT ⚠️ This was temporarily patched in 0.6.5, but is awaiting the issue to be fixed in mongoose directly. Once fixed there, we can remove the patch.

Expected Behaviour

Course should be created on clicking save button.

Actual Behaviour

Getting the following error while saving the course

"Something went wrong while saving your data.
Please try again."

Terminal Output:

TypeError: Cannot create property 'path' on string 'required'
    at /home/ubuntu/adapt_authoring/node_modules/mongoose/lib/schematype.js:948:30
    at Array.forEach (<anonymous>)
    at SchemaString.SchemaType.doValidate (/home/ubuntu/adapt_authoring/node_modules/mongoose/lib/schematype.js:939:19)
    at /home/ubuntu/adapt_authoring/node_modules/mongoose/lib/document.js:1936:9
    at process._tickCallback (internal/process/next_tick.js:61:11)

Versions

  • Authoring Tool Version: 0.6.4
  • Framework Version: v4
  • Node.js Version: v10.15.1
  • MongoDB Version: v4.0.6
  • Operating System: Ubuntu 18.04
  • Browser: Chrome Beta
@tomgreenfield
Copy link
Contributor

tomgreenfield commented Feb 26, 2019

Update: looks to be an issue introduced in mongoose@5.4.15.

Works fine for me if I downgrade to 5.4.14.

Cheers to @samumist for the hint.

@tomgreenfield tomgreenfield added T: bug I: critical High impact bugs, breaking functionality for the end-user - should be fixed ASAP labels Feb 26, 2019
@taylortom taylortom added this to the 0.6.5 milestone Feb 26, 2019
@taylortom taylortom added the S: merged Completed, reviewed, and merged issues label Feb 26, 2019
@tomgreenfield tomgreenfield removed their assignment Feb 28, 2019
@tomgreenfield
Copy link
Contributor

Code change which causes this error: Automattic/mongoose@1e473c6#diff-4584a5389a42c94f452f336cc75def60R39.

@taylortom taylortom removed this from the 0.6.5 milestone Feb 28, 2019
@taylortom taylortom removed S: merged Completed, reviewed, and merged issues I: critical High impact bugs, breaking functionality for the end-user - should be fixed ASAP labels Feb 28, 2019
@tomgreenfield
Copy link
Contributor

Update: this has now been fixed in mongoose@5.5.7.

@canstudios-nicolaw
Copy link
Contributor

@tomgreenfield I think this can be closed?

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

4 participants