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

Embedded form issue: ERROR: undefined method `content_for' for nil:NilClass #727

Open
kitebuggy opened this issue Jul 28, 2014 · 0 comments

Comments

@kitebuggy
Copy link

Using v4.0.0.beta, standard install.

A standalone, simple form works fine on its own. However, embedding this within an existing page (through clicking on the '+' sign -> Reuse Content -> Choose 'Form' -> Select form and add to page. Error appears in preview: "ERROR: undefined method `content_for' for nil:NilClass"

Stack trace shows:
content_for(html_head, , block) called.
CACHE (0.0ms) SELECT cms_dynamic_views.* FROM cms_dynamic_views WHERE cms_dynamic_views.path = 'cms/forms/render' AND cms_dynamic_views.locale = 'en' AND cms_dynamic_views.format = 'html' AND cms_dynamic_views.handler IN ('erb', 'builder', 'raw', 'ruby', 'jbuilder', 'coffee') AND cms_dynamic_views.partial = 0
Rendered cms/forms/render.html.erb (4.4ms)
Error occurred while rendering Cms::Form#4: undefined method content_for' for nil:NilClass /Users/jason_holloway/.rvm/gems/ruby-2.0.0-p481/gems/browsercms-4.0.0.beta/app/models/cms/view_context.rb:43:incontent_for'
/Users/jason_holloway/Dropbox/Dev/quicktest/beta/app/views/cms/forms/render.html.erb:1:in _app_views_cms_forms_render_html_erb___329539016520353584_70290998819760' /Users/jason_holloway/.rvm/gems/ruby-2.0.0-p481/gems/actionpack-4.0.8/lib/action_view/template.rb:143:inblock in render'
/Users/jason_holloway/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.8/lib/active_support/notifications.rb:161:in instrument' /Users/jason_holloway/.rvm/gems/ruby-2.0.0-p481/gems/actionpack-4.0.8/lib/action_view/template.rb:141:inrender'
[....]

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

1 participant