This topic is locked
[SOLVED]

 English.js not found after upload to server

4/1/2015 3:06:07 PM
PHPRunner General questions
I
ISelb author

When I make a build and view in the browser, there are no errors.

With that same build, I upload it to my server, and get this error:



Failed to load resource: the server responded with a status of 404 (Not Found)

http://mysite.com/include/lang/.js
Uncaught TypeError: Cannot read property 'constants' of undefined

RunnerAll.js:389



Miscellaneous Projects settings show Language = English.
I've tried these changes, but result was the same:

  1. Events -> After application initialized, set $_SESSION["language"]="English";
  2. Events -> Menu page: Before process, set $_SESSION["language"]="English";
  3. Events -> Menu page: Before display, set $_SESSION["language"]="English";
    Not sure what's causing this line in menu.php to not pick up the language setting/file:

    Line 78: $pageObject->body["begin"] .= "<script type=\"text/javascript\" src=\"include/lang/".getLangFileName(mlang_getcurrentlang()).".js\"></script>";
    Assistance is most appreciated.

I
ISelb author 4/3/2015

Solution: Apply a really, really big hammer.
Code change to C:\Program Files\PHPRunner7.0\source\include\commonfunctions.php:

function mlang_getcurrentlang()

{

/* -- changes to force English -- */

/*

global $_currentLanguage, $mlang_messages,$mlang_defaultlang;

if(@$_REQUEST["language"])

$_SESSION["language"]=@$_REQUEST["language"];

if(@$_SESSION["language"])

return $_SESSION["language"];

return $mlang_defaultlang;

*/

// Apply the hammer:

$_SESSION["language"] = "English";

return "English";

}