{"record":{"id":"880bf6835292bbd8","repo":"forem/forem","slug":"tags-option-requires-at-least-one-tag-name","errorCode":null,"errorMessage":"Tags option requires at least one tag name","messagePattern":"Tags option requires at least one tag name","errorType":"exception","errorClass":"StandardError","httpStatus":null,"severity":"error","filePath":"app/liquid_tags/feed_tag.rb","lineNumber":65,"sourceCode":"  end\n\n  def validate_source\n    raise StandardError, I18n.t(\"liquid_tags.feed_tag.missing_source\") if @org_slug.nil? && @tag_names.empty?\n  end\n\n  def parse_org(value)\n    @org_slug = value\n    @organization = Organization.find_by_slug_or_legacy(@org_slug)\n    raise StandardError, I18n.t(\"liquid_tags.feed_tag.invalid_org\", slug: @org_slug) unless @organization\n  end\n\n  def parse_tag(value)\n    @tag_names = [value]\n  end\n\n  def parse_tags(value)\n    names = value.split(\",\").map(&:strip).reject(&:empty?)\n    raise StandardError, I18n.t(\"liquid_tags.feed_tag.invalid_tags\") if names.empty?\n\n    @tag_names = names\n  end\n\n  def parse_limit(value)\n    @limit = Integer(value, exception: false)\n    unless @limit && @limit >= 1 && @limit <= MAX_LIMIT\n      raise StandardError, I18n.t(\"liquid_tags.feed_tag.invalid_limit\")\n    end\n  end\n\n  def parse_sort(value)\n    unless VALID_SORTS.include?(value)\n      raise StandardError, I18n.t(\"liquid_tags.feed_tag.invalid_sort\")\n    end\n\n    @sort = value\n  end","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/forem/forem/blob/f354c376a7c5d1330dc40d66f150be8d1289020d/app/liquid_tags/feed_tag.rb#L47-L83","documentation":"The tags= option of the feed tag accepts a comma-separated list. parse_tags splits on commas, strips whitespace, rejects empty strings, and raises when the resulting array is empty. This guards against a tags= key that carries no usable tag name. Note that a list with at least one non-empty entry is fine — only lists that are empty after cleaning raise.","triggerScenarios":"{% feed tags=,,, %}; {% feed tags=, , %} (only commas and spaces); {% feed tags=%} where the value got dropped by the option regexp; a paste artifact that leaves only separators.","commonSituations":"Author deletes the last tag name but leaves the trailing commas; author thinks tags= with no value disables the option; option formatting confused with tag= (single) vs tags= (list).","solutions":["Provide at least one tag name: {% feed tags=ruby,rails %}.","If you only need one tag, use the singular form {% feed tag=ruby %} which cannot hit this error.","Remove the tags= token entirely if you meant to source from an org only ({% feed org=<slug> %})."],"exampleFix":"// before\n{% feed tags=,, %}\n// after\n{% feed tags=javascript,ruby %}","handlingStrategy":"validation","validationCode":"value = input[/\\btags=([^\\s]+)/, 1]\nvalid = value.nil? || value.split(',').map(&:strip).reject(&:empty?).any?","typeGuard":"def feed_tags_present?(input)\n  value = input[/\\btags=([^\\s]+)/, 1]\n  value.nil? || value.split(',').any? { |n| n.strip.match?(/\\S/) }\nend","tryCatchPattern":"begin\n  FeedTag.new(\"feed\", input, Liquid::ParseContext.new)\nrescue StandardError => e\n  flash.now[:error] = e.message # re-show the editor\nend","preventionTips":["Trim trailing commas when generating tags= lists programmatically.","Prefer tag= for single-tag feeds.","Preview-render drafts before publishing."],"tags":["liquid","forem","feed-tag","validation","authoring"],"backgroundTag":"missing-required-parameter","analyzedSha":"f354c376a7c5d1330dc40d66f150be8d1289020d","analyzedAt":"2026-08-21T12:43:44.428Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}