Actions
Bug #22411
closedUnattendedController does not render global methods defined in plugins
Description
UnattendedController includes Foreman::Renderer while TemplatesController includes UnattendedHelper (which itself includes Foreman::Renderer).
This can cause issues because the plugin macro extend_template_helpers extends UnattendedHelper and the methods aren't available in UnattendedController.
Updated by Timo Goebel almost 7 years ago
- Subject changed from Foreman::Renderer vs to Foreman::Renderer vs UnattendedHelper
Updated by The Foreman Bot almost 7 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/5210 added
Updated by Timo Goebel almost 7 years ago
- Subject changed from Foreman::Renderer vs UnattendedHelper to UnattendedController does not render global methods defined in plugins
The issue, I see is the following. I (properly) defined template macro from a plugin (transpile_container_linux_config) works fine in preview but not when a template is rendered via the unattended controller. Instead, it gives this error:
ActionView::Template::Error: undefined method `transpile_container_linux_config' for #<#<Class:0x00007f9ee7fa5b30>:0x00007f9ef0398028>
13:41:38 rails.1 | | Kickstart default clone:2:in `render_safe'
13:41:38 rails.1 | | /Users/f0218175/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/erb.rb:885:in `eval'
13:41:38 rails.1 | | /Users/f0218175/.rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/erb.rb:885:in `result'
13:41:38 rails.1 | | /Users/f0218175/foremandev/foreman/lib/foreman/renderer.rb:98:in `render_safe'
13:41:38 rails.1 | | /Users/f0218175/foremandev/foreman/lib/foreman/renderer.rb:205:in `unattended_render'
13:41:38 rails.1 | | inline template:1:in `_187d7febb380e19c2aad384a2281b7db'
Updated by Lukas Zapletal almost 7 years ago
- Translation missing: en.field_release set to 330
Updated by Timo Goebel almost 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 4fb3d7c3cd95fd3032b8874bd35122e852e7c260.
Updated by Lukas Zapletal almost 7 years ago
- Related to Bug #22615: Root password does not render with develop added
Actions