Opened 5 years ago

Closed 4 weeks ago

#13125 closed Bug Report - General (Trac EOL)

Categories are wrong if $_SESSION['language'] does not match Xmltv language

Reported by: Francois Gouget <fgouget@…> Owned by: Stuart Auchterlonie
Priority: minor Milestone: needs_triage
Component: Plugin - MythWeb Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no


So I was wondering why the categories on the 'Listings' page were all wrong. After quite a bit of digging through the code I realized that this is because my session language was set to 'English' while the program data I get comes from a French grabber so that all the categories in the MythTV database are in French.

The link is that, in modules/tv/handler.php, MythWeb uses $_SESSIONlanguage? to decide which .cat file to load. So in my case it was loading 'mythweb/modules/_shared/lang/':

if (file_exists(modules_path.'/_shared/lang/'.$_SESSIONlanguage?.'.cat'))


However the category names and regular exceptions in that file obviously don't match the French names of the categories stored in the program.category field of the MythTV database.

This resulted in category_class() returning the wrong css_class in mythweb/includes/css.php so that the 'Listings' entries were all the wrong color.

So the first bug is that MYthWeb should not assume that the user interface language is the same as that of the data in the MythTV database.

The second bug that MythTV does not store the category language in the MythTV program table (and the similar programgenres table). That's unless there is some clever way to recover some sort of global xmltv language in which case one could consider that to be sufficient. Note that all the xmltv grabbers I know of provide a language property for each entry(*). For instance:

<category lang="fr">documentaire</category>

(*) So in theory each value could be in a different language but it's likely reasonable to assume they are all in the same language.

Change History (2)

comment:1 Changed 5 years ago by sphery

Component: MythTV - Web FrontendPlugin - MythWeb
Owner: changed from stuartm to Stuart Auchterlonie

comment:2 Changed 4 weeks ago by Stuart Auchterlonie

Resolution: Trac EOL
Status: newclosed

We have moved all bug tracking to github [1]

If you continue to have this issue, please open a new issue at github, referencing this ticket.

[1] -

Note: See TracTickets for help on using tickets.