Bug 1045184 - "publican install_book" creates incorrect language redirect for Romanian language (ro-RO)
Summary: "publican install_book" creates incorrect language redirect for Romanian lang...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: publican
Version: 18
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Ruediger Landmann
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 998327
TreeView+ depends on / blocked
 
Reported: 2013-12-19 19:55 UTC by Pete Travis
Modified: 2014-02-07 01:25 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 998327
Environment:
Last Closed: 2014-02-05 22:36:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Pete Travis 2013-12-19 19:55:26 UTC
+++ This bug was initially created as a clone of Bug #998327 +++

Document URL:
http://docs.fedoraproject.org/ 

Section Number and Name: 
http://docs.fedoraproject.org/

Describe the issue:
If I put Romanian ([ro-RO] and/or [ro]) at the top of preferred
languages in firefox-23.0-1.fc19.x86_64, the web page doesn't work. The
page is loaded then the browser seems to be redirected to the same page
over and over.

Suggestions for improvement: 

Additional information:
Visiting http://docs.fedoraproject.org/en-US/index.html directly works
fine.
Visiting http://docs.fedoraproject.org/xx-XX/index.html (literaly)
starts a loop.

I don't necessarily want the website translated into Romanian, I just
want it to work even if it's in English.

--- Additional comment from Pete Travis on 2013-08-19 00:39:45 EDT ---

I've confirmed the symptoms can be recreated by invoking `LANG=ro_RO firefox` under a clean user account.

--- Additional comment from Cristian Ciupitu on 2013-08-19 01:44:51 EDT ---

Some additional information: the / page has "ro" in the list of
(supported) locales[1] even if the possible URLs for the Romanian
language[2][3] don't work.

I also looked at the git repository for the website and I noticed that
there's no `index.html` under the ro subdirectory[4] like for other
languages, e.g. de-DE[5] and fr-FR[6].  By the way, while looking at the
rest of the languages I noticed that the index file is missing from
ia[7] too, so I tested with Interlingua and the looping issue occurred
again.

[1]: https://git.fedorahosted.org/cgit/docs/web.git/tree/public_html/index.html#n19 <!-- not sure if that's the source of what I get in browser -->
[2]: http://docs.fedoraproject.org/ro/index.html
[3]: http://docs.fedoraproject.org/ro-RO/index.html
[4]: https://git.fedorahosted.org/cgit/docs/web.git/tree/public_html/ro
[5]: https://git.fedorahosted.org/cgit/docs/web.git/tree/public_html/de-DE
[6]: https://git.fedorahosted.org/cgit/docs/web.git/tree/public_html/fr-FR
[7]: https://git.fedorahosted.org/cgit/docs/web.git/tree/public_html/ia

--- Additional comment from Eric Christensen on 2013-11-25 10:54:50 EST ---

I'm not able to reproduce the website not redirecting you to en-US language pages.  In fact, that's all I can get it to do.  Looking at the source I can confirm that *some* of the files are translated into Romanian for the website but, like you found, there is no index.html for the language.  

I'll continue to troubleshoot this and see what I can do.  I'd like to see the site available in Romanian (especially if the source is already translated).  

Sorry for the delay on this ticket.

--- Additional comment from Ruediger Landmann on 2013-11-25 21:23:54 EST ---

Thanks for the heads-up Sparks -- I'll see if I can get to the bottom of this...

--- Additional comment from Pete Travis on 2013-12-17 23:01:15 EST ---

I've done a little poking on this, republishing docsite-publican.  I found that publishing an ro-RO translation results in "ro" in the "locales" variable that gets iterated over for the redirect. For now, I'm manually changing web.git/public_html/index.html to "ro-RO", which redirects to the ro-RO content that seems to be in the correct path.

--- Additional comment from Cristian Ciupitu on 2013-12-18 09:31:02 EST ---

Right now I'm being redirected to http://docs.fedoraproject.org/ro-RO/index.html and I see some English documentation in the right frame/panel, but the left side seems to be stuck in an infinite loop.

--- Additional comment from Pete Travis on 2013-12-19 14:51:40 EST ---

(In reply to Cristian Ciupitu from comment #6)
> Right now I'm being redirected to
> http://docs.fedoraproject.org/ro-RO/index.html and I see some English
> documentation in the right frame/panel, but the left side seems to be stuck
> in an infinite loop.

The left pane is redirected based via cookie; can you clear cookies for the site and test?

Comment 1 Pete Travis 2013-12-19 19:58:50 UTC
Using publican-2.8-4.fc18.noarch, installing any book to Fedora's web.git results in a primary index.html with the following:

var locales = ["as-IN","bg-BG","bn-IN","bs-BA","ca-ES","cs-CZ","da-DK","de-DE","el-GR","en-US","es-ES","fa-IR","fi-FI","fr-FR","gu-IN","he-IL","hi-IN","hu-HU","ia","id-ID","it-IT","ja-JP","kn-IN","ko-KR","lt-LT","ml-IN","mr-IN","nb-NO","nl-NL","or-IN","pa-IN","pl-PL","pt-BR","pt-PT","ro","ru-RU","sk-SK","sr-Latn-RS","sr-RS","sv-SE","ta-IN","te-IN","uk-UA","zh-CN","zh-TW"];

ro language users are redirected to public_html/ro/index.html per this table, but publican installs the actual content to public_html/ro-RO/

Comment 2 Cristian Ciupitu 2013-12-20 02:24:02 UTC
This publican bug is blocking the ro-RO redirect bug, not vice-versa :-)

Comment 3 Fedora End Of Life 2013-12-21 14:50:12 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Fedora End Of Life 2014-02-05 22:36:42 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 5 Pete Travis 2014-02-07 01:25:07 UTC
For future readers, we found that the issue was caused by a book in the database published as "ro" where all others were using "ro-RO" for Romanian. 

The problem book was found in fedoradocs.db by using:
$ sqlite3 site.db
> select * from books where "language" = "ro";

Removing using `publican remove_book` should clean up similar issues.


Note You need to log in before you can comment on or make changes to this bug.