The Active Docs are no longer rendering in SaaS

Solution Verified - Updated -

Environment

  • Red Had 3scale SaaS

Issue

  • The Active Docs are no longer rendering in SaaS, how can we fix this?

Resolution

In case you are still using an older version of Active Docs, version 1.0, please follow the steps to fix the rendering issue:

  1. Download the application_files.zip attachment from this Knowledge Solution.
  2. Upload the 2 files application.js and application.css in the in the location specified in the following snippet or in any other location of your choice:
    {{ '/Assets/application.js' | javascript_include_tag }}
    {{ content_of.javascripts | html_safe }}
    {{ '/Assets/application.css' | stylesheet_link_tag }}
    {{ content_of.stylesheets | html_safe }}
  1. Remove the lines:
<script src="/active_docs/application.js" ></script>
<link href="/active_docs/application.css" media="screen" rel="stylesheet" /> 
  1. Include the snipped from step 1 in the Active Doc template so it will look like as following:
<!DOCTYPE html>
<html lang="en">
  <head>
    {% include "html_document_head" %}
    {% csrf %}

    {{ '/Assets/application.js' | javascript_include_tag }}
    {{ content_of.javascripts | html_safe }}
    {{ '/Assets/application.css' | stylesheet_link_tag }}
    {{ content_of.stylesheets | html_safe }}

(...)

Root Cause

There was a migration of the servers which had the files missing. The new servers doesn't have the files available, they were deprecated some years ago and there were maintained as legacy until the migration.

Attachments

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.