Error while using Knowledgebase

  • Used Zammad version:
    Dies ist die Zammad Version 5.1.x

  • Used Zammad installation type: (source, package, docker-compose, …)
    docker-compose

  • Operating system of Server:
    Debian 11

  • Operating system of Client:
    Ubuntu 2204

  • Browser + version:
    Firefox 111.0 / Version 111.0.5563.64 (Official Build) snap (64-bit)

Expected behavior:

  • Save the new Knowledgebase

Actual behavior:

  • Error 500 …

Steps to reproduce the behavior:

  • work with knowledge base entries…

Error log:
I, [2023-03-20T12:56:40.630588 #1-43890760] INFO – : Completed 500 Internal Server Error in 4175ms (ActiveRecord: 1183.0ms | Allocations: 1643513)
F, [2023-03-20T12:56:40.642503 #1-43890760] FATAL – :
[56dee855-ee19-4d0c-880a-283dff33567b] SystemStackError (stack level too deep):
[56dee855-ee19-4d0c-880a-283dff33567b]
[56dee855-ee19-4d0c-880a-283dff33567b] app/models/knowledge_base/answer.rb:30:in attributes_with_association_ids' [56dee855-ee19-4d0c-880a-283dff33567b] app/models/application_model/can_assets.rb:32:in assets’
[56dee855-ee19-4d0c-880a-283dff33567b] app/models/knowledge_base/answer.rb:46:in assets' [56dee855-ee19-4d0c-880a-283dff33567b] app/models/application_model/can_assets.rb:204:in block in reduce’
[56dee855-ee19-4d0c-880a-283dff33567b] app/models/application_model/can_assets.rb:197:in reduce' [56dee855-ee19-4d0c-880a-283dff33567b] app/models/application_model/can_assets.rb:197:in reduce’
[56dee855-ee19-4d0c-880a-283dff33567b] app/models/knowledge_base/answer.rb:50:in `assets’

** The follwoing lines are repeating about 413 times **
[56dee855-ee19-4d0c-880a-283dff33567b] app/models/application_model/can_assets.rb:204:in block in reduce' [56dee855-ee19-4d0c-880a-283dff33567b] app/models/application_model/can_assets.rb:197:in reduce’
[56dee855-ee19-4d0c-880a-283dff33567b] app/models/application_model/can_assets.rb:197:in reduce' [56dee855-ee19-4d0c-880a-283dff33567b] app/models/knowledge_base/answer.rb:50:in assets’

then
[65e0e9e0-4ef9-4599-8c31-1213159e6945] app/controllers/knowledge_base/answers_controller.rb:20:in show' [65e0e9e0-4ef9-4599-8c31-1213159e6945] app/controllers/application_controller/has_download.rb:21:in block (4 levels) in module:HasDownload
[65e0e9e0-4ef9-4599-8c31-1213159e6945] app/controllers/application_controller/has_download.rb:20:in block (3 levels) in <module:HasDownload>' [65e0e9e0-4ef9-4599-8c31-1213159e6945] app/controllers/application_controller/has_download.rb:19:in block (2 levels) in module:HasDownload
[65e0e9e0-4ef9-4599-8c31-1213159e6945] app/controllers/application_controller/handles_transitions.rb:16:in `handle_transaction’

please advice.

A new knowledge base entry will be generated but with every click on it the Browser console outputs:

application-9530b484b49883eac29fa72d4d9af4f79043bdd3185b262a5d5b8b572494d007.js:3 GET https://localdomain/api/v1/knowledge_bases/1/answers/501?full=1&include_contents=501&_=1679386560467 500 (Internal Server Error)

Any pointers are very appreciated in the moment. (I cannot retrace the doings of the people having created these KB entries…)

For an unknown reason an “copy & paste” entry in the knowledgebase was formatted in a way that it corrupted the complete category. The solution was to delete from the newest entry backwards until the error vanished.

The entries havebeen created with copy paste from old OTRS entries.
I carfully suggest that this is an QA issue…
Have an nice day.

The most interesting question would be “what was the content” because usually Zammad should sanitize evil stuff. But without knowing the actual content it’s hard to tell and correct whatever happened.

Sorry for the late answer. Unfortunately this is not available. The user probably just did ctrl-a,c,v and deleted content he did want to see. I have no idea what exactly that was, but it came from an older OTRS system.