00cf043e15
no issue - reported in the forum: https://forum.ghost.org/t/publishing-with-a-single-post-request-to-posts/1648 - the defaults are defined in two places 1. on the schema level (defaults for the database) 2. on the ORM (model layer) - the defaults on the db layer are set correctly when inserting a new resource - but if we don't apply all defaults on the model layer, it will happen that model events are emitted without the correct defaults - see comment in code base - it's caused by the fact that knex only returns the inserted resource id (probably caused by the fact knex has to support x databases) - components/modules are listening on model events and expect: 1. a complete set of attributes 2. a complete set of defaults 3. sanitized values e.g. bool, date - this commit fixes: 1. added missing defaults for user & post model 2. sanitize booleans (0|1 => false|true) 3. added tests to ensure this works as expected 4. clarfies the usage of `defaults` Regarding https://forum.ghost.org/t/publishing-with-a-single-post-request-to-posts/1648: - the post event was emitted with the following values {page: undefined, featured: undefined} - the urlservice receives this event and won't match the resource against collection filters correctly - NOTE: the post data in the db were correct |
||
---|---|---|
.github | ||
content | ||
core | ||
.editorconfig | ||
.eslintrc.json | ||
.gitignore | ||
.gitmodules | ||
.npmignore | ||
.travis.yml | ||
Gruntfile.js | ||
index.js | ||
LICENSE | ||
MigratorConfig.js | ||
package.json | ||
PRIVACY.md | ||
README.md | ||
SECURITY.md | ||
yarn.lock |
The project is maintained by a non-profit organisation called the Ghost Foundation, along with an amazing group of independent contributors. We're trying to make publishing software that changes the shape of online journalism.
- Ghost.org
- Supported Node Versions
- Latest Release
- Help & Support
- Theme Docs
- API Docs
- Contributing Guide
- Developer Blog
- Self-hoster Docs
NOTE: If you’re stuck, can’t get something working or need some help, please head on over and join our forum rather than opening an issue.
Hosting a live Ghost site
The easiest way to deploy Ghost is with our official Ghost(Pro) managed service. You can have a fresh instance up and running in a couple of clicks with a worldwide CDN, backups, security and maintenance all done for you.
Not only will it save you hours of maintenance per month, but all revenue goes to the Ghost Foundation, which funds the maintenance and further development of Ghost itself. So you’ll be supporting open source software and getting a great service at the same time! Talk about win/win. 🏆
Self-Hosters
Other options are also available if you prefer playing around with servers by yourself, of course. The freedom of choice is in your hands.
Theme Developers
If you are developing a Ghost theme for your own site or creating themes for others to use we recommend installing Ghost on your own local machine. Luckily we have a brand new Ghost CLI to make this really easy 😄
Contributors & Advanced Developers
For anyone wishing to contribute to Ghost or to hack/customise core files we recommend following our development setup guides:
Staying Up to Date
When a new version of Ghost comes out, you'll want to look over these upgrade instructions for what to do next.
You can talk to other Ghost users and developers in our forum (it's pretty awesome).
New releases are announced on the dev blog. You can subscribe by email or follow @TryGhost_Dev on Twitter, if you prefer your updates bite-sized and facetious. 🎷🐢
Copyright & License
Copyright (c) 2013-2018 Ghost Foundation - Released under the MIT license. Ghost and the Ghost Logo are trademarks of Ghost Foundation Ltd. Please see our trademark policy for info on acceptable usage.