[From nobody Tue May 26 11:27:10 2026
Received: (at submit) by bugs.debian.org; 8 Sep 2022 17:50:06 +0000
X-Spam-Checker-Version: SpamAssassin 3.4.2-bugs.debian.org_2005_01_02
 (2018-09-13) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-17.0 required=4.0 tests=BAYES_00, FOURLA, HAS_PACKAGE,
 MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP,
 T_SCC_BODY_TEXT_LINE,XMAILER_REPORTBUG autolearn=ham
 autolearn_force=no version=3.4.2-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 34; hammy, 131; neutral, 33; spammy,
 0. spammytokens: hammytokens:0.000-+--H*M:reportbug,
 0.000-+--H*MI:reportbug, 0.000-+--H*x:reportbug,
 0.000-+--H*UA:reportbug, 0.000-+--gitlab
Return-path: &lt;m@steiny.biz&gt;
Received: from relay01.alfahosting-server.de ([109.237.142.236]:13375)
 by buxtehude.debian.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from &lt;m@steiny.biz&gt;) id 1oWLfC-0007LI-Ct
 for submit@bugs.debian.org; Thu, 08 Sep 2022 17:50:06 +0000
Received: by relay01.alfahosting-server.de (Postfix, from userid 1001)
 id ECD9D32CB8F2; Thu,  8 Sep 2022 19:50:01 +0200 (CEST)
Received: from alfa3045.alfahosting-server.de (alfa3045.alfahosting-server.de
 [109.237.138.22])
 by relay01.alfahosting-server.de (Postfix) with ESMTPS id 2806C32C3208
 for &lt;submit@bugs.debian.org&gt;; Thu,  8 Sep 2022 19:49:59 +0200 (CEST)
Received: from [127.0.1.1] (p548b1d17.dip0.t-ipconnect.de [84.139.29.23])
 by alfa3045.alfahosting-server.de (Postfix) with ESMTPSA id F3E13637EC2A;
 Thu,  8 Sep 2022 19:49:58 +0200 (CEST)
Content-Type: text/plain; charset=&quot;us-ascii&quot;
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Maximilian Stein &lt;m@steiny.biz&gt;
To: Debian Bug Tracking System &lt;submit@bugs.debian.org&gt;
Subject: gitlab: failed to fetch comments in issue (500 Internal Server Error)
Message-ID: &lt;166264947193.2127985.9589335439957480207.reportbug@mia&gt;
X-Mailer: reportbug 11.5.1
Date: Thu, 08 Sep 2022 17:04:31 +0200
Delivered-To: submit@bugs.debian.org

Package: gitlab
Version: 15.3.2+ds1-1~fto11+1
Severity: normal
Tags: patch

Dear Maintainer,

After upgrading Gitlab, issue comments failed to fetch. I got the
following log entries:

    Completed 500 Internal Server Error in 234ms (ActiveRecord: 154.4ms | Elasticsearch: 0.0ms | Allocations: 66512)

    NoMethodError (undefined method `h' for LabelsHelper:Module):

    app/helpers/labels_helper.rb:250:in `render_label_text'
    app/helpers/labels_helper.rb:61:in `render_colored_label'
    lib/banzai/filter/references/label_reference_filter.rb:120:in `object_link_text'


To me, this seemed like a typo, so I simply removed &quot;h &quot; in
labels_helper.rb:250. This fixed the issue for me, as far as I can
tell.

Best,
Maximilian


---

--- a/usr/share/gitlab/app/helpers/labels_helper.rb
+++ b/usr/share/gitlab/app/helpers/labels_helper.rb
@@ -247,7 +247,7 @@
         class=&quot;#{css_class}&quot;
         data-container=&quot;body&quot;
         data-html=&quot;true&quot;
-        #{&quot;style=\&quot;background-color: #{h bg_color}\&quot;&quot; if bg_color}
+        #{&quot;style=\&quot;background-color: #{bg_color}\&quot;&quot; if bg_color}
       &gt;#{ERB::Util.html_escape_once(name)}#{suffix}&lt;/span&gt;
     HTML
   end
]