Project

General

Profile

Actions

Bug #12198

open

Adding template helpers from plugin not always working

Added by Stephen Benjamin almost 9 years ago. Updated almost 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Plugin integration
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Katello uses this to add the "subscription_manager_configuration_url" helper: https://github.com/theforeman/foreman/blob/develop/app/services/foreman/plugin.rb#L227

For some reason, we get an error when using the host group templates:

There was an error rendering the Unnamed template: The snippet
'subscription_manager_registration' threw an error: Safemode
doesn't allow to access 'subscription_manager_configuration_url' on
#<Safemode::ScopeObject>

It doesn't appear to be deterministic, is there something odd with how the constant is redefined?

Adding the helper to the Hostgroup::Jail works consistently.

Actions

Also available in: Atom PDF