Tags issue in knowledge base when custom KB url is set

Infos:

  • Used Zammad version: 5.1.0
  • Used Zammad installation type: package
  • Operating system: Debian 10
  • Browser + version: Chrome latest

Expected behavior:

  • Clicking on tag label shows the list of knowledge base answers having that tag.

Actual behavior:

  • Page shows “500: We’re sorry, but something went wrong.”

Steps to reproduce the behavior:

I, [2022-03-22T08:51:53.442888 #424-181640] INFO – : Started GET “/help/en-us/tag/diagnostics” for 183.195.11.14 at 2022-03-22 08:51:53 +0000
I, [2022-03-22T08:51:53.447051 #424-181640] INFO – : Processing by KnowledgeBase::Public::TagsController#show as HTML
I, [2022-03-22T08:51:53.447093 #424-181640] INFO – : Parameters: {“locale”=>“en-us”, “tag”=>“diagnostics”}
I, [2022-03-22T08:51:53.457925 #424-181640] INFO – : Rendering knowledge_base/public/tags/show.html.erb within layouts/knowledge_base
I, [2022-03-22T08:51:53.458083 #424-181640] INFO – : Rendered knowledge_base/public/_icon_native.html.erb (Duration: 0.0ms | Allocations: 8)
I, [2022-03-22T08:51:53.462640 #424-181640] INFO – : Rendered knowledge_base/public/_icon_native.html.erb (Duration: 0.0ms | Allocations: 7)
I, [2022-03-22T08:51:53.462787 #424-181640] INFO – : Rendered knowledge_base/public/categories/_answer.html.erb (Duration: 2.1ms | Allocations: 1042)
I, [2022-03-22T08:51:53.464360 #424-181640] INFO – : Rendered knowledge_base/public/_icon_native.html.erb (Duration: 0.0ms | Allocations: 7)
I, [2022-03-22T08:51:53.464494 #424-181640] INFO – : Rendered knowledge_base/public/categories/_answer.html.erb (Duration: 1.6ms | Allocations: 1011)
I, [2022-03-22T08:51:53.465638 #424-181640] INFO – : Rendered knowledge_base/public/_icon_native.html.erb (Duration: 0.0ms | Allocations: 7)
I, [2022-03-22T08:51:53.465765 #424-181640] INFO – : Rendered knowledge_base/public/categories/_answer.html.erb (Duration: 1.2ms | Allocations: 945)
I, [2022-03-22T08:51:53.467305 #424-181640] INFO – : Rendered knowledge_base/public/_icon_native.html.erb (Duration: 0.0ms | Allocations: 7)
I, [2022-03-22T08:51:53.467452 #424-181640] INFO – : Rendered knowledge_base/public/categories/_answer.html.erb (Duration: 1.6ms | Allocations: 1011)
I, [2022-03-22T08:51:53.468660 #424-181640] INFO – : Rendered knowledge_base/public/_icon_native.html.erb (Duration: 0.0ms | Allocations: 7)
I, [2022-03-22T08:51:53.468788 #424-181640] INFO – : Rendered knowledge_base/public/categories/_answer.html.erb (Duration: 1.3ms | Allocations: 945)
I, [2022-03-22T08:51:53.469998 #424-181640] INFO – : Rendered knowledge_base/public/_icon_native.html.erb (Duration: 0.0ms | Allocations: 7)
I, [2022-03-22T08:51:53.470133 #424-181640] INFO – : Rendered knowledge_base/public/categories/_answer.html.erb (Duration: 1.3ms | Allocations: 945)
I, [2022-03-22T08:51:53.471343 #424-181640] INFO – : Rendered knowledge_base/public/_icon_native.html.erb (Duration: 0.0ms | Allocations: 7)
I, [2022-03-22T08:51:53.471503 #424-181640] INFO – : Rendered knowledge_base/public/categories/_answer.html.erb (Duration: 1.3ms | Allocations: 945)
I, [2022-03-22T08:51:53.471551 #424-181640] INFO – : Rendered knowledge_base/public/tags/show.html.erb within layouts/knowledge_base (Duration: 13.6ms | Allocations: 8381)
I, [2022-03-22T08:51:53.473335 #424-181640] INFO – : Rendered knowledge_base/public/_inline_stylesheet.html.erb (Duration: 0.1ms | Allocations: 20)
I, [2022-03-22T08:51:53.474979 #424-181640] INFO – : Rendered knowledge_base/public/_icon_native.html.erb (Duration: 0.0ms | Allocations: 7)
I, [2022-03-22T08:51:53.476527 #424-181640] INFO – : Rendered knowledge_base/public/_icon_native.html.erb (Duration: 0.0ms | Allocations: 7)
I, [2022-03-22T08:51:53.477744 #424-181640] INFO – : Rendered knowledge_base/public/_breadcrumb.html.erb (Duration: 1.5ms | Allocations: 1107)
E, [2022-03-22T08:51:53.477900 #424-181640] ERROR – : undefined method gsub' for nil:NilClass (ActionView::Template::Error) app/models/knowledge_base.rb:112:in custom_address_path’
app/helpers/knowledge_base_helper.rb:16:in custom_path_if_needed' app/views/knowledge_base/public/_breadcrumb.html.erb:4 app/views/knowledge_base/public/_breadcrumb.html.erb:3:in each’
app/views/knowledge_base/public/_breadcrumb.html.erb:3
app/helpers/knowledge_base_breadcrumb_helper.rb:13:in render_breadcrumb_if_needed' app/views/layouts/knowledge_base.html.erb:45 app/controllers/application_controller/has_download.rb:21:in block (4 levels) in module:HasDownload
app/controllers/application_controller/has_download.rb:20:in block (3 levels) in <module:HasDownload>' app/controllers/application_controller/has_download.rb:19:in block (2 levels) in module:HasDownload
app/controllers/application_controller/handles_transitions.rb:16:in handle_transaction' E, [2022-03-22T08:51:53.478948 #424-181640] ERROR -- : Error ID l6njkH5T: undefined method gsub’ for nil:NilClass
I, [2022-03-22T08:51:53.479712 #424-181640] INFO – : Rendering inline template
I, [2022-03-22T08:51:53.486207 #424-181640] INFO – : Rendered inline template (Duration: 6.4ms | Allocations: 243)
I, [2022-03-22T08:51:53.486375 #424-181640] INFO – : Completed 500 Internal Server Error in 39ms (Views: 6.9ms | ActiveRecord: 4.6ms | Allocations: 18798)

  • So I see the error “undefined method ‘gsub’ for nil:NilClass”. How can I fix it? Thank you all.

Can you please update and retry?
If the problem persists, please create a issue on Github (GitHub - zammad/zammad: Zammad is a web based open source helpdesk/customer support system) and mention this thread.

I updated zammad to the latest version 5.1.1 (updated on 2022-06-01), but the problem still exists. I have created an issue on Github KB custom domain url: cannot open tag pages · Issue #4111 · zammad/zammad · GitHub.
Thank you for your attention.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.