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

contentRendered always null #734

Closed
pflannery opened this issue Dec 11, 2013 · 5 comments
Closed

contentRendered always null #734

pflannery opened this issue Dec 11, 2013 · 5 comments

Comments

@pflannery
Copy link
Contributor

When I tried to update my plugin docpad-plugin-combiner to docpad@6.57.1 the tests started to fail. I found that it's because contentRendered is always null. This is the line that is failing

I've tried to find where the tests started to break and I've found that it started since docpad@6.55

Is this because there was a change I don't know or a bug in docpad?

My only workaround atm is to limit my plugin to docpad@6.54.10

@pflannery
Copy link
Contributor Author

I have found where the problem is happening.

Its filtering out files based on this line https://github.com/bevry/docpad/blob/23bdd85ba0a0a1b903e2d34a841c437ac99a41a2/src/lib/docpad.coffee#L3571

However this prevents files that have the render: true from being rendered.

Can I propose we either amend this filter to also check that render isn't enabled

file.get('dynamic') or (file.get('write') is false and !(file.get('render') is true))

or add a new flag that prevents rejection for a file.

@balupton
Copy link
Member

I wonder whether we can get rid of the file.get('write') is false check completly

@pflannery
Copy link
Contributor Author

that would do the trick for me

balupton added a commit that referenced this issue Dec 16, 2013
- v6.58.0 December 16, 2013
	- Deprecated and removed the `parseBefore` and `parseAfter` events
		- Files are now parsed as they are loaded in, rather than only when
they reach the generation cycle
		- See [issue #736](#736) for
discussion and upgrade options
	- Dynamic documents now have access to templateData that plugins have
extended (regression since always)
		- Dynamic documents now go through the standard generation process
		- Thanks to [Steve McArthur](https://github.com/SteveMcArthur),
[Marcus Stong](https://github.com/stongo) for
[docpad/docpad-plugin-feedr#5](https://github.com/docpad/docpad-plugin-f
eedr/issues/5)
	- Documents that want to be rendered, but not written, are now
rendered (possible regression since v6.55.0)
		- Thanks to [pflannery](https://github.com/pflannery) for [issue
#734](#734)
	- Moved the missing layout error check from contextualize step to
render step, as the layout may not be there if we are still loading
documents
@balupton
Copy link
Member

Fixed with DocPad v6.58

@balupton balupton reopened this Dec 16, 2013
@pflannery
Copy link
Contributor Author

great! thanks for your work ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants