Bug 1510783

Summary: wrong <title> on http://sat630.example.com/apidoc/v2.<some langs>.html - contains html tag
Product: Red Hat Satellite Reporter: Jan Hutař <jhutar>
Component: APIAssignee: Martin Bacovsky <mbacovsk>
Status: CLOSED ERRATA QA Contact: Bruno Rocha <rochacbruno>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: akarsale, bbuckingham, bkearney, inecas, mbacovsk, mhulan, pcreech, rochacbruno, sabnave, tstrachota, zhunting
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:54:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Hutař 2017-11-08 08:57:35 UTC
Description of problem:
There is wrong <title> on http://sat630.example.com/apidoc/v2.<lang>.html - contains html tag


Version-Release number of selected component (if applicable):
satellite-6.3.0-21.0.beta.el7sat.noarch (snap 24)


How reproducible:
always


Steps to Reproduce:
1. Go to http://sat630.example.com/apidoc/ and check page title ("<html><head><title>..." tag content).
2. Now click at "v2" in the header and check title again:
   http://sat630.example.com/apidoc/v2.html
3. Now click at "en_GB" and check title again:
   http://sat630.example.com/apidoc/v2.en_GB.html
   or:
   http://sat630.example.com/apidoc/v2.fr.html


Actual results:
In step 1. and 2., title is "<title>API documentation</title>"
In step 3., title is "<title><span class="translation_missing" title="translation missing: en-GB.apipie.api_documentation">Api Documentation</span></title>" which is incorrect - looks broken in browsers heading


Expected results:
There should be no HTML tags

Comment 3 Ivan Necas 2017-11-09 16:07:55 UTC
I would recommend Martin (put on cc) and I think API is the right component.

Comment 4 Martin Bacovsky 2017-11-12 20:51:50 UTC
Created redmine issue http://projects.theforeman.org/issues/21637 from this bug

Comment 5 Martin Bacovsky 2017-11-12 20:56:41 UTC
This is issue in apipie-rails. It ships translations only for some languages:
# rpm -ql tfm-rubygem-apipie-rails|grep locales\/
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.4/config/locales/de.yml
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.4/config/locales/en.yml
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.4/config/locales/es.yml
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.4/config/locales/it.yml
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.4/config/locales/ja.yml
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.4/config/locales/pl.yml
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.4/config/locales/pt-BR.yml
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.4/config/locales/ru.yml
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.4/config/locales/tr.yml
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.4/config/locales/zh-CN.yml
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.4/config/locales/zh-TW.yml

The strings that have missing translations are wrapped in the <span> element by default by rails.

Comment 6 Satellite Program 2017-11-30 09:27:15 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21637 has been resolved.

Comment 7 Patrick Creech 2017-12-07 15:36:05 UTC
Moving back to post untill apipie-rails 0.5.6 lands upstream

Comment 8 Bruno Rocha 2017-12-18 18:30:32 UTC
using: satellite-6.3.0-23.0.el7sat.noarch

No HTML tags showed on title of /apidoc/v2 neither on any other languages.

Comment 9 Satellite Program 2018-02-21 16:54:37 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> > 
> > For information on the advisory, and where to find the updated files, follow the link below.
> > 
> > If the solution does not work for you, open a new bug report.
> > 
> > https://access.redhat.com/errata/RHSA-2018:0336