Page 1 of 4

Error after upgrade from 1.8.8 to 2.0.0 beta

Posted: 06 Sep 2008, 15:09
by zar
Hi Jan,
after upgrade everything works fine. But if I login at the frontend as an user i get this error massage after clicking a gallery:
Fatal error: Call to a member function load() on a non-object in /is/htdocs/.../libraries/joomla/user/user.php on line 598

If I not login everything is fine...
Can you help me please? I use Joomla! 1.5.6

thx.
zar

Re: Error after upgrade from 1.8.8 to 2.0.0 beta

Posted: 07 Sep 2008, 21:33
by Jan
Hi, it seems like there is some problem outside Phoca Gallery on your joomla installation ? user.php is a file from joomla framework ? :(

Code: Select all

// Load the JUserModel object based on the user id or throw a warning.
 if(!$table->load($id)) {
   JError::raiseWarning( 'SOME_ERROR_CODE', 'JUser::_load: Unable to load user with id: '.$id );
  return false;
}
something like there is a problem with loading user table data from database ??? :(

Jan

Re: Error after upgrade from 1.8.8 to 2.0.0 beta

Posted: 13 Sep 2008, 23:19
by zar
Hi Jan,
I isolate the error. The error appears only if the "VirtueMart Settings" in phoca is on.
If I switch off in the global stettings, everything is fine.
But I like this feature. What can I do?

On my Joomla! works VirtueMart 1.1.2 stable

cu
zar

Re: Error after upgrade from 1.8.8 to 2.0.0 beta

Posted: 14 Sep 2008, 11:37
by Randal
Yes, I agree problem is in connection VM 1.1.2 + Phoca 2 (also stable version) and this is BUG

If I enable one of Virtuemart modules on the same page where is Gallery i have:

Fatal error: Call to a member function load() on a non-object in ....\libraries\joomla\user\user.php on line 597

I also try to reinstall Virtuemart component but this doesn't give any positive change. Any sugestion? Oh .. last information. Problem is only appear when user is log in.
Apache 2.0.63
PHP 5.2.6
Mysql 5.0.51b
Joomla 1.5.7

Re: Error after upgrade from 1.8.8 to 2.0.0 beta

Posted: 14 Sep 2008, 17:04
by Jan
hi, there were no changes in this area (1.8.8 - 2.0.0) do you get this error in 1.8.8 too?

I take a look at it if I will be on my PC

Jan

Re: Error after upgrade from 1.8.8 to 2.0.0 beta

Posted: 14 Sep 2008, 17:12
by zar
Hi, I don't test it on 1.8.8

Re: Error after upgrade from 1.8.8 to 2.0.0 beta

Posted: 15 Sep 2008, 17:40
by Jan
Hi, the problem is, it is not caused by enabling VM settings in Phoca Gallery, I get this error in case I don't have enabled the settings in global configuration nor in parameters component and in case I click on galleries link (where no VM code is enabled) :-(

the problem is caused by load data from user table which is not loaded :( no idea who calls this method... I will try to find it, Jan

Re: Error after upgrade from 1.8.8 to 2.0.0 beta

Posted: 15 Sep 2008, 18:09
by Jan
EDIT : the code is not called by Phoca Gallery but by modules , if I disable the modules (VM), the gallery is displayed... so it means there is some conflict between VM and Phoca Gallery but I cannot find where becasue it is not called by Phoca Gallery :(

Jan

Re: Error after upgrade from 1.8.8 to 2.0.0 beta

Posted: 15 Sep 2008, 18:32
by Jan
I found from where the error code is called:

components\com_virtuemart\virtuemart_parser.php

If I will display some code before code which calls "load" method, then everything is ok:
line 54 +

Code: Select all

if( !defined( '_JLEGACY' ) ) {
  echo "displaying some code before following 'load' code - no error, all OK";exit;
  $GLOBALS['my']->load( $tmpuser->get('id'));
  echo "displaying some code after this 'load' code - after error this code will be not displayed";exit;
  $GLOBALS['my']->set('gid', $tmpuser->get('gid'));
} else {
  $GLOBALS['my']->gid = $tmpuser->get('gid');
}
then I get:
displaying some code before following 'load' code - no error, all OK

if I comment this code, so no exit will be applied and the code will run again:

Code: Select all

if( !defined( '_JLEGACY' ) ) {
  // echo "displaying some code before following 'load' code - no error, all OK";exit;
  $GLOBALS['my']->load( $tmpuser->get('id'));
  echo "displaying some code after this 'load' code - after error this code will be not displayed";exit;
  $GLOBALS['my']->set('gid', $tmpuser->get('gid'));
} else {
  $GLOBALS['my']->gid = $tmpuser->get('gid');
}
then I get:
Fatal error: Call to a member function load() on a non-object in D:\www\J157VM\libraries\joomla\user\user.php on line 597
So the error will be rendered before echo

This method in VirtueMart:
$GLOBALS['my']->load( $tmpuser->get('id'));
call the user load method where this error comes ... :(

BTW: it doesn't depend on Phoca Gallery version nor on if VM settings are enabled or not in Phoca Gallery :-(


Jan

Re: Error after upgrade from 1.8.8 to 2.0.0 beta

Posted: 15 Sep 2008, 19:51
by zar
Hi Jan,
thx for your work.
What exactly have I to do in the virtuemart_parser.php, to solve the problem?
I'm not a coder only a late-beta tester. :wink:

Or ist there no solution?
I think ist's important for phoca to solve this. Because the most shopper have to register in virtuemart before they can give an order. But if you registered - you get the error message. :?
I configured my virtuemart that you have not to register, if you like to order a picture... but this is not the solution.

cu zar