News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Some error after Update from VM 3.0.18 to 3.0.19

Started by shturmavik, January 26, 2017, 00:23:15 AM

Previous topic - Next topic

shturmavik

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:

Milbo

#1
Thank you. The problem is somewhere before. Did you really install /1046/com_virtuemart.3.0.19_extract_first.zip ?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

shturmavik

#2
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



P.S.: pegasus-pharma-local.ru it's Akeeba Backup of pegasus-pharma.com on local web-server

Milbo

#3
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
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

#4
/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 :-)
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

shturmavik

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?

Milbo

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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

bma

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?

Milbo

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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

bma

Thanks Milbo for your fast answer.

the others things seems works fine... what's your proposal to solve that without my workaround?

Milbo

find the VmConfig::$jLangCount

and replace it against

VmLanguage::$jLangCount
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

bma