{"record":{"id":"8e4385f2ac926e32","repo":"ViewComponent/view_component","slug":"content-for-slot-slot-name-has-already-been-provid","errorCode":null,"errorMessage":"Content for slot SLOT_NAME has already been provided.","messagePattern":"Content for slot SLOT_NAME has already been provided\\.","errorType":"exception","errorClass":"ViewComponent::ContentAlreadySetForPolymorphicSlotError","httpStatus":null,"severity":"error","filePath":"lib/view_component/slotable.rb","lineNumber":450,"sourceCode":"      end\n\n      @__vc_set_slots ||= {}\n\n      if slot_definition[:collection]\n        @__vc_set_slots[slot_name] ||= []\n        @__vc_set_slots[slot_name].push(slot)\n      else\n        @__vc_set_slots[slot_name] = slot\n      end\n\n      slot\n    end\n\n    def __vc_set_polymorphic_slot(slot_name, poly_type = nil, *args, **kwargs, &block)\n      slot_definition = self.class.registered_slots[slot_name]\n\n      if !slot_definition[:collection] && defined?(@__vc_set_slots) && @__vc_set_slots[slot_name]\n        raise ContentAlreadySetForPolymorphicSlotError.new(slot_name)\n      end\n\n      poly_def = slot_definition[:renderable_hash][poly_type]\n\n      __vc_set_slot(slot_name, poly_def, *args, **kwargs, &block)\n    end\n  end\nend\n","sourceCodeStart":432,"sourceCodeEnd":459,"githubUrl":"https://github.com/ViewComponent/view_component/blob/9f22c36fa7d7b44098a8ed97472e3b4674ae420f/lib/view_component/slotable.rb#L432-L459","documentation":"Error \"Content for slot SLOT_NAME has already been provided.\" thrown in ViewComponent/view_component.","triggerScenarios":"Thrown at lib/view_component/slotable.rb:450 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide content for the slot only once: either set it via `with_SLOT(...)` or supply it in the render block, not both.","Remove the duplicate `with_SLOT` call or the block content that fills the same slot."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9f22c36fa7d7b44098a8ed97472e3b4674ae420f","analyzedAt":"2026-08-23T10:20:47.008Z","schemaVersion":2},"datasetVersion":"2026-08-23T13:39:53.451Z"}