{"record":{"id":"835b4643f09f86bf","repo":"theforeman/foreman","slug":"rendering-failed-no-input-with-name-s-for-in","errorCode":null,"errorMessage":"Rendering failed, no input with name \"%{s}\" for input macro found","messagePattern":"Rendering failed, no input with name \"%(.+?)\" for input macro found","errorType":"exception","errorClass":"UndefinedInput","httpStatus":null,"severity":"error","filePath":"app/services/foreman/renderer/scope/macros/inputs.rb","lineNumber":25,"sourceCode":"          extend ApipieDSL::Module\n\n          apipie :class, 'Macros related to template inputs' do\n            name 'Template Inputs'\n            sections only: %w[all reports provisioning jobs partition_tables]\n          end\n\n          apipie :method, 'Returns the value of template input' do\n            required :name, String, desc: 'name of the template input'\n            raises error: UndefinedInput, desc: 'when there is no input with such name defined for the current template'\n            returns Object, desc: 'The value of template input'\n            example 'input(\"Include Facts\") #=> \"yes\"'\n          end\n          def input(name)\n            input = template.template_inputs&.find_by_name(name)\n            if input\n              preview? ? input.preview(self) : input.value(self)\n            else\n              raise UndefinedInput.new(s: name)\n            end\n          end\n\n          apipie :method, 'Find and returns resource object from the template input value' do\n            required :name, String, desc: 'name of the template input'\n            raises error: UndefinedInput, desc: 'when there is no input with such name defined for the current template'\n            raises error: WrongInputValueType, desc: 'when the input value type is not \"resource\"'\n            returns Object, desc: 'The resource object'\n            example 'input_resource(\"hostgroup\") #=> \"ActiveRecord object\"'\n          end\n          def input_resource(name)\n            @input = template.template_inputs&.find_by_name(name)\n\n            raise UndefinedInput.new(s: name) unless @input\n            raise WrongInputValueType.new(name: name, type: @input.value_type) if @input.value_type != 'resource'\n\n            return resource_klass.new if preview?\n            find_resource","sourceCodeStart":7,"sourceCodeEnd":43,"githubUrl":"https://github.com/theforeman/foreman/blob/6b05625475cfe6aac31a88f8c8ee6e62e4efe620/app/services/foreman/renderer/scope/macros/inputs.rb#L7-L43","documentation":"Error \"Rendering failed, no input with name \"%{s}\" for input macro found\" thrown in theforeman/foreman.","triggerScenarios":"Thrown at app/services/foreman/renderer/scope/macros/inputs.rb:25 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6b05625475cfe6aac31a88f8c8ee6e62e4efe620","analyzedAt":"2026-08-23T17:46:34.094Z","schemaVersion":2},"datasetVersion":"2026-08-23T21:17:23.414Z"}