Closed
Bug 875430
Opened 11 years ago
Closed 11 years ago
Thimble crashes when publishing
Categories
(Webmaker Graveyard :: Thimble, defect)
Webmaker Graveyard
Thimble
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jon, Assigned: michiel)
Details
(Whiteboard: s=2013w21 p=1)
Attachments
(1 file)
When visiting http://thimble-node.mofostaging.net/remix/14/edit , if you attempt to publish the project the server will crash with the following error: TypeError: Cannot call method 'updateAttributes' of null at module.exports.databaseAPI.update.updateProject (/var/www/thimble/lib/database.js:66:17) at EventEmitter.emit (events.js:96:17) at module.exports.queryAndEmit (/var/www/thimble/node_modules/sequelize/lib/query-interface.js:291:17) at EventEmitter.emit (events.js:126:20) at module.exports.Query.run (/var/www/thimble/node_modules/sequelize/lib/dialects/mysql/query.js:32:14) at Query.Sequence.end (/var/www/thimble/node_modules/mysql/lib/protocol/sequences/Sequence.js:66:24) at Query._handleFinalResultPacket (/var/www/thimble/node_modules/mysql/lib/protocol/sequences/Query.js:139:8) at Query.EofPacket (/var/www/thimble/node_modules/mysql/lib/protocol/sequences/Query.js:123:8) at Protocol._parsePacket (/var/www/thimble/node_modules/mysql/lib/protocol/Protocol.js:169:24) at Parser.write (/var/www/thimble/node_modules/mysql/lib/protocol/Parser.js:62:12)
Updated•11 years ago
|
Summary: Popcorn Maker crashes when → Thimble crashes when publishing
Reporter | ||
Comment 1•11 years ago
|
||
Alright, after looking at the database record for id=14, I saw that the creator of that project was scott, not jacob. Evidently the logic here for updating vs creating a new project isn't working correctly
I cannot reproduce this error in the same way, but there's definitely something weird going on. Trying publish locks up thimble-node.mofostaging.net for me instead (resulting in a 503).
reproduced locally. It appears we're missing the step that verifies the originalURL is actually "owned" by the currently logged in user. An extra middleware step is required.
extended the originalURL middleware function so it only adds that property if the currently logged in user owns the original page. Otherwise this should actually be a new page when published.
Attachment #754496 -
Flags: review?(scott)
Comment 5•11 years ago
|
||
Comment on attachment 754496 [details] [review] https://github.com/mozilla/thimble.webmaker.org/pull/79 Worked. I left a nit in the pull request, but I'm not sure it matters. You can consider it, your call.
Attachment #754496 -
Flags: review?(scott) → review+
landed.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in
before you can comment on or make changes to this bug.
Description
•