Opened 8 years ago

Closed 8 years ago

#11603 closed Patch - Bug Fix (Fixed)

NoTrans causes by includes/defines.php after includes/database.php

Reported by: pmhahn@… Owned by: Rob Smith
Priority: minor Milestone: 0.26.1
Component: Plugin - MythWeb Version: 0.26-fixes
Severity: medium Keywords: NoTrans
Cc: Ticket locked: no


I compiles mythtv 0.26.0~master.20130526.7150d64 myself and since then MythWeb was no longer working properly: Each string was prefixed by "NoTrans?: " indicating a problem with loading the German translation.

After some debug "print" sprinkling I tracked it down to "includes/database.php" triggering an output of an translated message, which seems to load "classes/Translate.php" before "includes/defines.php" was loaded. This lead to load_translation() using modules_path uninitialized.

<!-- PMH: language=German --> <!-- PMH: path=modules_path/_shared/lang/English.lang --> <!-- PMH: path=modules_path/_shared/lang/English.lang --> <!-- PMH: file= -->

Moving "inclues/defines.php" before "includes/databases.php" in "includes/init.php" resolved the issue for me:

diff --git a/includes/init.php b/includes/init.php index 337b05d..6e5f899 100644 --- a/includes/init.php +++ b/includes/init.php @@ -36,6 +36,9 @@

require_once 'includes/errors.php'; require_once 'includes/errordisplay.php';

+ Define some common stuff + require_once 'includes/defines.php'; +

Setup the database

require_once 'includes/database.php';

@@ -45,9 +48,6 @@

Load the session handler routines

require_once 'includes/session.php';

- Define some common stuff

  • require_once 'includes/defines.php';


Load the translation routines so the modules can translate their descriptions

require_once 'includes/translate.php';

The patch looks right for me, so please have a look and apply it if necessary.

Attachments (1)

mythtv-mythweb-11603.diff (679 bytes) - added by pmhahn@… 8 years ago.
Reorder defines.php before database.php

Download all attachments as: .zip

Change History (2)

Changed 8 years ago by pmhahn@…

Attachment: mythtv-mythweb-11603.diff added

Reorder defines.php before database.php

comment:1 Changed 8 years ago by jpoet

Resolution: Fixed
Status: newclosed
Note: See TracTickets for help on using tickets.