Error after upgrade from 1.8.8 to 2.0.0 beta

Phoca Gallery - image gallery extension
zar
Phoca Member
Phoca Member
Posts: 25
Joined: 16 May 2008, 22:15
Contact:

Error after upgrade from 1.8.8 to 2.0.0 beta

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49279
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error after upgrade from 1.8.8 to 2.0.0 beta

Post 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
If you find Phoca extensions useful, please support the project
zar
Phoca Member
Phoca Member
Posts: 25
Joined: 16 May 2008, 22:15
Contact:

Re: Error after upgrade from 1.8.8 to 2.0.0 beta

Post 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
Randal
Phoca Member
Phoca Member
Posts: 25
Joined: 05 Jul 2008, 15:24

Re: Error after upgrade from 1.8.8 to 2.0.0 beta

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49279
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error after upgrade from 1.8.8 to 2.0.0 beta

Post 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
If you find Phoca extensions useful, please support the project
zar
Phoca Member
Phoca Member
Posts: 25
Joined: 16 May 2008, 22:15
Contact:

Re: Error after upgrade from 1.8.8 to 2.0.0 beta

Post by zar »

Hi, I don't test it on 1.8.8
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49279
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error after upgrade from 1.8.8 to 2.0.0 beta

Post 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
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49279
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error after upgrade from 1.8.8 to 2.0.0 beta

Post 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
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49279
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Error after upgrade from 1.8.8 to 2.0.0 beta

Post 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
If you find Phoca extensions useful, please support the project
zar
Phoca Member
Phoca Member
Posts: 25
Joined: 16 May 2008, 22:15
Contact:

Re: Error after upgrade from 1.8.8 to 2.0.0 beta

Post 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
Post Reply