{"record":{"id":"472102600e04de57","repo":"refinery/refinerycms","slug":"a-plugin-must-have-a-name-plugin-inspect","errorCode":null,"errorMessage":"A plugin MUST have a name!: #{plugin.inspect}","messagePattern":"A plugin MUST have a name!: #(.+?)","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"core/lib/refinery/plugin.rb","lineNumber":11,"sourceCode":"module Refinery\n  class Plugin\n\n    attr_accessor :name, :class_name, :controller, :directory, :url,\n                  :always_allow_access, :menu_match, :hide_from_menu,\n                  :pathname\n\n    def self.register(&_block)\n      yield(plugin = new)\n\n      raise ArgumentError, \"A plugin MUST have a name!: #{plugin.inspect}\" if plugin.name.blank?\n\n      # Set defaults.\n      plugin.menu_match ||= %r{refinery/#{plugin.name}(/.+?)?$}\n      plugin.always_allow_access ||= false\n      plugin.class_name ||= plugin.name.camelize\n\n      # add the new plugin to the collection of registered plugins\n      ::Refinery::Plugins.registered.unshift(plugin).uniq!(&:name)\n    end\n\n    # Returns the internationalized version of the title\n    def title\n      ::I18n.translate(['refinery', 'plugins', name, 'title'].join('.'))\n    end\n\n    # Returns the internationalized version of the description\n    def description\n      ::I18n.translate(['refinery', 'plugins', name, 'description'].join('.'))","sourceCodeStart":1,"sourceCodeEnd":29,"githubUrl":"https://github.com/refinery/refinerycms/blob/34438aae76d087246039cd24755187844d796737/core/lib/refinery/plugin.rb#L1-L29","documentation":"Error \"A plugin MUST have a name!: #{plugin.inspect}\" thrown in refinery/refinerycms.","triggerScenarios":"Thrown at core/lib/refinery/plugin.rb:11 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":"34438aae76d087246039cd24755187844d796737","analyzedAt":"2026-08-23T06:03:41.094Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}