VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: macsgv on January 17, 2013, 14:18:16 PM

Title: Notice: Use of undefined constant VMLANG - assumed 'VMLANG' in
Post by: macsgv on January 17, 2013, 14:18:16 PM
Hello I use virtuemart v2.0.18a with joomla v2.5.8 and PHP 5.3x

get this error in the debug mode in joomla front-end com in the back-end


Notice: Use of undefined constant VMLANG - assumed 'VMLANG' in /home/xxxxx/public_html/components/com_virtuemart/router.php on line 691

--------------------------------------------------------------------------------------------------------

Notice: Use of undefined constant VMLANG - assumed 'VMLANG' in
/home/xxxxx/public_html/components/com_virtuemart/router.php on line 717


---------------------------------------------------------------------------------------------------------

Notice: Use of undefined constant VMLANG - assumed 'VMLANG' in /home/xxxxx/public_html/administrator/components/com_virtuemart/helpers/config.php on line 1082




any clues to solve this problem, of course thanks
Title: Re: Notice: Use of undefined constant VMLANG - assumed 'VMLANG' in
Post by: macsgv on January 18, 2013, 12:52:30 PM

Notice: Use of undefined constant VMLANG - assumed 'VMLANG' in

/home/xxxxx/public_html/components/com_virtuemart/router.php on line 691



solution:
I added single quotes to VMLANG constant in 1381 and worked the line was misspelled syntax must be enclosed in single quotes enter
Title: Re: Notice: Use of undefined constant VMLANG - assumed 'VMLANG' in
Post by: macsgv on January 18, 2013, 13:08:43 PM
Notice: Use of undefined constant VMLANG - assumed 'VMLANG' in

/home/xxxxx/public_html/administrator/components/com_virtuemart/helpers/config.php on line 1082



solution:
will add single quotes to the constant line VMLANG in line 1089 and worked VMLANG constant must be enclosed in single quotes enter


Fix:
$jsVars .= "vmLang = '&lang=" . substr ('VMLANG', 0, 2) . "' ;\n";


before:
$jsVars .= "vmLang = '&lang=" . substr (VMLANG, 0, 2) . "' ;\n";