I have some error after update.
Website https://pegasus-pharma.com
But I was doing all the work on Open Server.
PHP 5.6, Joomla 3.6.5. Multilanguage: En, Lv, Ru
The Error on public:
Fatal error: Call to a member function load() on a non-object in C:\OpenServer\domains\pegasus-pharma-local.ru\administrator\components\com_virtuemart\helpers\vmlanguage.php on line 214
Code:
if($tag!='en-GB' and VmConfig::get('enableEnglish', true) ){
$testpath = $basePath.'/language/en-GB/en-GB.'.$name.'.ini';
if(!file_exists($testpath)){
if($site){
$epath = VMPATH_ROOT;
} else {
$epath = VMPATH_ADMINISTRATOR;
}
} else {
$epath = $path;
}
self::$languages[$tag]->load($name, $epath, 'en-GB', true, false); //string 214
}
Screenshot:
(http://f5.s.qip.ru/~KhHNrc6n.png) (http://shot.qip.ru/00RUl3-5KhHNrc6n/)
Thank you. The problem is somewhere before. Did you really install /1046/com_virtuemart.3.0.19_extract_first.zip ?
I just installed again but the problem persists.
VirtueMart 3.0.19 Blue Corvus 9430
Joomla! 3.6.5
White page with errors:
Notice: Undefined offset: 0 in C:\OpenServer\domains\pegasus-pharma-local.ru\administrator\components\com_virtuemart\helpers\vmlanguage.php on line 214
Fatal error: Call to a member function load() on a non-object in C:\OpenServer\domains\pegasus-pharma-local.ru\administrator\components\com_virtuemart\helpers\vmlanguage.php on line 214
(http://f3.s.qip.ru/~KhHNrc6o.png) (http://shot.qip.ru/00RUl3-3KhHNrc6o/)
P.S.: pegasus-pharma-local.ru it's Akeeba Backup of pegasus-pharma.com on local web-server
Please try /1048/com_virtuemart.3.0.19.2_extract_first.zip
But to find the reason, I need a trace, The error just means, that the language got not set. But the question is why. Most time a 3rd party which does not initialise vm correctly.
You may use this extension to get a trace https://www.rupostel.com/utilities-for-joomla/extensions/fatal-catcher-plugin
/1049/com_virtuemart.3.0.19.2_extract_first.zip
You may try that one. At least when you have the trace, we get the same lines :-)
VirtueMart 3.0.19.2 Blue Corvus 9435
Fatal error: Call to a member function load() on null in C:\OpenServer\domains\pegasus-pharma-local.ru\administrator\components\com_virtuemart\helpers\vmlanguage.php on line 214
Maybe I will send you backup of website with error?
Fatal error: Call to a member function load() on null in C:\OpenServer\domains\pegasus-pharma-local.ru\administrator\components\com_virtuemart\helpers\vmlanguage.php on line 214
This is the symptom, not the reason. The reason is, that the language is not loaded correctly.
On upgrade from 3.0.18 to 3.0.19.3 I have this error:
[01-Feb-2017 07:22:36 UTC] PHP Fatal error: Access to undeclared static property: VmConfig::$jLangCount in E:\xampp\htdocs\mysite\plugins\system\sunfw\includes\overwrite\j3x\components\com_virtuemart\helpers\vmview.php on line 162
I fixed that adding that:
public static $jLangCount = 1;
on E:\xampp\htdocs\mysite\administrator\components\com_virtuemart\helpers\config.php
Do I made somethings wrong during the upgrade?
No, it is wrong that your code tries to access this variable there
E:\xampp\htdocs\mysite\plugins\system\sunfw\includes\overwrite\j3x\components\com_virtuemart\helpers\vmview.php on line 162
Very strange path! Looks like a plugin called sunfw is doing strange stuff.
the code in line 136 should be if(VmLanguage::$jLangCount>1 and !empty(VmConfig::$vmlangSef)){
For whatever reason, you have there a quite old vmview.php.
Thanks Milbo for your fast answer.
the others things seems works fine... what's your proposal to solve that without my workaround?
find the VmConfig::$jLangCount
and replace it against
VmLanguage::$jLangCount
thanks a lot
best regards