zammad icon indicating copy to clipboard operation
zammad copied to clipboard

KB custom domain url: cannot open internal articles from agents perspective

Open roy008 opened this issue 4 years ago • 1 comments

Infos:

  • Used Zammad version: 5.0.3
  • Installation method (source, package, ..): package
  • Operating system: debian 10
  • Database + version: PostgreSQL 11.14
  • Elasticsearch version: 7.16.1
  • Browser + version: Chrome 96.0.4664.110, FireFox 95.0.2

Expected behavior:

Agents can view internal KB articles when KB is set to another domain.

Actual behavior:

Agents cannot view internal KB articles, the opened KB says “Page not found”.

Steps to reproduce the behavior:

Zammad is running under the domain like “zammad.example.com”. Set up a custom domain for the Knowledge Base (KB) like “kb.example.com”. An agent login zammad.example.com, edits an answer and then clicks the button circled in red in the below figure to view/check the real page before publish the page, the KB page opens but says “Page not found. The page you were looking for does not exist.”.

38af52a130e1103607dba7a21a2bd5e04dd93198_2_690x108

If we set up KB custom url like “zammad.example.com/kb”, no such issue.

For detailed explanation on this bug, please see https://community.zammad.org/t/kb-custom-domain-url-cannot-open-internal-articles-from-from-agents-perspective/8175

Yes I'm sure this is a bug and no feature request or a general question.

roy008 avatar Feb 28 '22 09:02 roy008

The problem is that user session is not valid on the other domain. Possible solutions:

**A: Forward with an object-specifc token attached to URL **

Advantages:

  • easy to implement basic support

Disadvantages:

  • needs changes to support loading inline images
  • won't work with links to other objects, e.g. next/previous answers. Or needs many changes to keep the token in URL

B: Use user-specific one-time token to create a user session on the other domain

Advantages:

  • all functionality works out-of-box

Disadvantages:

  • logging out is tricky. Either needs an additional widget(?) or session must be super-short

C: Use local path even if custom domain is configured

Advantages:

  • no changes needed

Disadvantages:

  • breaks workflow for people using preview button to copy the public link
  • will break when clicking on internal links since they link to the configured domain

mantas avatar Dec 09 '22 14:12 mantas