-
Notifications
You must be signed in to change notification settings - Fork 104
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
model.setMetaDefaults
should be model.setDefaults
#40
Conversation
model.setMetaDefaults does not exist and causes a render error
Actually in looking at the code, I see that file.coffee does have a setMetaDefaults method, so I am not sure why that doesn't work, but it is easy to see the error if one does: docpad generate --env static outputs the error
Just doing docpad run seems to hang without showing the error, so that's how I discovered it with the static |
So actually maybe setMetaDefaults itself is broken?? |
I had updated my previous comment with the error:
So that might help in finding the issue |
Definitely was a bug in DocPad, will be fixed in the next release. |
…werver - Fixed virtual documents firing duplicated events - Added `cloneModel(model)` to properly handle events when cloning (`model.clone()` will no longer clone events) - Fixed `Object #<Model> has no method 'setDefaults'` error (bug since v6.46.3) - Moved `FileModel::setDefaults` back into `Base::setDefaults` - Thanks to [Jeff Barczewski](https://github.com/jeffbski) for [docpad-archive/documentation#40](https://github.com/bevry/docpad-document ation/pull/40) - Fixed the 500 middleware not working - Added ability to do `getCollection('database')` to get the global database - Added `render` alias for documents directory - Added `static` alias for files directory - The `documents` collection is now defiend by `render:true, write:true` rather than being paths and `isDocument:true` based - The `files` collection is now defiend by `render:false, write:true` rather than being paths and `isFile:true` based - The `html` collection is now checks for `write:true` instead of `isDocument:true` or `isFile:true` - The `stylesheet` collection is now checks for `write:true` instead of `isDocument:true` or `isFile:true` - Re-added `DocPad::parseDocumentDirectory` and `parseFileDirectory` (removed from v6.46.0) which wraps around the new ways of doing things - Added `DocPad::createModel(attrs,opts)` and updated `DocPad::createDocument` and `DocPad::createFile` to use it - Added `DocPad::ensureModel(attrs,opts)` and updated `DocPad::ensureDocument`, `DocPad::ensurefile`, and `DocPad::ensureFileOrDocument` to use it - Added `DocPad::attachModelEvents(model)` to attach the required docpad events to a model
Great! Well once it is released we can close this pull request since it won't be needed. Thanks for the quick work of finding that. I have just learned about this project and thus far am really enjoying using it! |
Should be fixed in the just released v6.46.4 - closing, happy to re-open if it is still an issue :) - thanks 👍 |
- v6.46.4 July 27, 2013 - Fixes - Fixed virtual documents firing duplicated events - Plugins should now use `DocPad::cloneModel(model)` instead of `model.clone()` as the latter can't bind events correctly - Fixed `Object #<Model> has no method 'setDefaults'` error (bug since v6.46.3) - Moved `FileModel::setDefaults` back into `Base::setDefaults` - Thanks to [Jeff Barczewski](https://github.com/jeffbski) for [docpad-archive/documentation#40](https://github.com/bevry/docpad-document ation/pull/40) - Fixed the 500 middleware not working - Changes - The `documents` collection is now defined by `render:true, write:true` rather than being paths and `isDocument:true` based - The `files` collection is now defined by `render:false, write:true` rather than being paths and `isFile:true` based - The `html` collection now checks for `write:true` instead of `isDocument:true` or `isFile:true` - The `stylesheet` collection now checks for `write:true` instead of `isDocument:true` or `isFile:true` - Additions - Added ability to do `getCollection('database')` to get the global database - Added naming to collections to easily identify which collection we are in when debugging - Added `render` alias for documents directory - Added `static` alias for files directory - Added logging for event emits - Re-added `DocPad::parseDocumentDirectory` and `parseFileDirectory` (removed from v6.46.0) which wraps around the new ways of doing things - Added `DocPad::createModel(attrs,opts)` and updated `DocPad::createDocument` and `DocPad::createFile` to use it - Added `DocPad::ensureModel(attrs,opts)` and updated `DocPad::ensureDocument`, `DocPad::ensurefile`, and `DocPad::ensureFileOrDocument` to use it - Added `DocPad::attachModelEvents(model)` to attach the required docpad events to a model
Thanks! yes that codefix worked and now the setMetaDefault works like it was documented. |
…werver - Fixed virtual documents firing duplicated events - Added `cloneModel(model)` to properly handle events when cloning (`model.clone()` will no longer clone events) - Fixed `Object #<Model> has no method 'setDefaults'` error (bug since v6.46.3) - Moved `FileModel::setDefaults` back into `Base::setDefaults` - Thanks to [Jeff Barczewski](https://github.com/jeffbski) for [docpad-archive/documentation#40](https://github.com/bevry/docpad-document ation/pull/40) - Fixed the 500 middleware not working - Added ability to do `getCollection('database')` to get the global database - Added `render` alias for documents directory - Added `static` alias for files directory - The `documents` collection is now defiend by `render:true, write:true` rather than being paths and `isDocument:true` based - The `files` collection is now defiend by `render:false, write:true` rather than being paths and `isFile:true` based - The `html` collection is now checks for `write:true` instead of `isDocument:true` or `isFile:true` - The `stylesheet` collection is now checks for `write:true` instead of `isDocument:true` or `isFile:true` - Re-added `DocPad::parseDocumentDirectory` and `parseFileDirectory` (removed from v6.46.0) which wraps around the new ways of doing things - Added `DocPad::createModel(attrs,opts)` and updated `DocPad::createDocument` and `DocPad::createFile` to use it - Added `DocPad::ensureModel(attrs,opts)` and updated `DocPad::ensureDocument`, `DocPad::ensurefile`, and `DocPad::ensureFileOrDocument` to use it - Added `DocPad::attachModelEvents(model)` to attach the required docpad events to a model
- v6.46.4 July 27, 2013 - Fixes - Fixed virtual documents firing duplicated events - Plugins should now use `DocPad::cloneModel(model)` instead of `model.clone()` as the latter can't bind events correctly - Fixed `Object #<Model> has no method 'setDefaults'` error (bug since v6.46.3) - Moved `FileModel::setDefaults` back into `Base::setDefaults` - Thanks to [Jeff Barczewski](https://github.com/jeffbski) for [docpad-archive/documentation#40](https://github.com/bevry/docpad-document ation/pull/40) - Fixed the 500 middleware not working - Changes - The `documents` collection is now defined by `render:true, write:true` rather than being paths and `isDocument:true` based - The `files` collection is now defined by `render:false, write:true` rather than being paths and `isFile:true` based - The `html` collection now checks for `write:true` instead of `isDocument:true` or `isFile:true` - The `stylesheet` collection now checks for `write:true` instead of `isDocument:true` or `isFile:true` - Additions - Added ability to do `getCollection('database')` to get the global database - Added naming to collections to easily identify which collection we are in when debugging - Added `render` alias for documents directory - Added `static` alias for files directory - Added logging for event emits - Re-added `DocPad::parseDocumentDirectory` and `parseFileDirectory` (removed from v6.46.0) which wraps around the new ways of doing things - Added `DocPad::createModel(attrs,opts)` and updated `DocPad::createDocument` and `DocPad::createFile` to use it - Added `DocPad::ensureModel(attrs,opts)` and updated `DocPad::ensureDocument`, `DocPad::ensurefile`, and `DocPad::ensureFileOrDocument` to use it - Added `DocPad::attachModelEvents(model)` to attach the required docpad events to a model
model.setMetaDefaults does not exist and causes a render error