Author Topic: PHP Fatal error: Class 'JAccess' not found ....  (Read 4157 times)

Stas40

  • Beginner
  • *
  • Posts: 7
    • gidroponika
PHP Fatal error: Class 'JAccess' not found ....
« on: September 07, 2013, 20:43:05 pm »
My config : Joomla 1.5 Php 5.3

After Upgrade from 2.0.18 to current 2.0.22c my site down with fatal error.

PHP Fatal error:  Class 'JAccess' not found in ...\administrator\\components\\com_virtuemart\\helpers\\vmview.php on line 84, referer: /administrator/index.php

Can you help me ?

jenkinhill

  • Global Moderator
  • Super Hero
  • *
  • Posts: 21367
  • Web developer & counsultant
    • Jenkin Hill Internet
Re: PHP Fatal error: Class 'JAccess' not found ....
« Reply #1 on: September 07, 2013, 20:51:20 pm »
I wonder if this is caused by using J1.5  - Joomla 1.5 is no longer supported.  http://virtuemart.net/news/list-all-news/426-end-of-life-for-virtuemart-11-heidelpay-now-in-virtuemart-2012
"We decided to declare now the end of life for VirtueMart 1.1, and that the version 2 of VirtueMart is not any longer maintaining joomla 1.5 compatibility." 4 October 2012
Kelvyn
Jenkin Hill Internet,
Keswick, Lake District

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

IMPORTANT:  VirtueMart versions before 2.6.10 are insecure. Updating is strongly advised.


Currently using VM3.0 on Joomla 2.5.27 PHP 5.4.21

Currently testing VM3.0 on J3.3.6

alatak

  • Development Team
  • Hero Member
  • *
  • Posts: 1821
    • alatak.net
Re: PHP Fatal error: Class 'JAccess' not found ....
« Reply #2 on: September 07, 2013, 21:49:48 pm »
Hello

The reason is that we added ACL (Access Control List) to control the access to the VirtueMart administration pages. This class is only available in Joomla 2.5 , and we are not checking the Joomla version.

But why are you still using J1.5?
www.alatak.net
Extensions approved by the core team: http://extensions.virtuemart.net/

Stas40

  • Beginner
  • *
  • Posts: 7
    • gidroponika
Re: PHP Fatal error: Class 'JAccess' not found ....
« Reply #3 on: September 07, 2013, 22:53:13 pm »
The reason is that we added ACL (Access Control List) to control the access to the VirtueMart administration pages. This class is only available in Joomla 2.5
Is it simply to disable this check of access (php hack) or add this class (or acl function to class JAccess) to j1.5 folder ?
I can do it if it is used only in same php files.

But why are you still using J1.5?
I have old portal with forum and shop (double login - joomla+ phpbb3), many old custom plugins (+ russian pay and delivery cost vmpeyment & shipment plugins) - they all are not works with J2.5  . It will be a hard word to make it work with j2.5 or j3 for me.

Maxim Pishnyak

  • Virtuemart 2 is quite bugfree now
  • Global Moderator
  • Hero Member
  • *
  • Posts: 2669
  • Virtuemart 2 is quite bugfree now
    • Virtuemart Ukraine division
Re: PHP Fatal error: Class 'JAccess' not found ....
« Reply #4 on: September 08, 2013, 10:01:49 am »
I have old portal with forum and shop (double login - joomla+ phpbb3), many old custom plugins (+ russian pay and delivery cost vmpeyment & shipment plugins) - they all are not works with J2.5  . It will be a hard word to make it work with j2.5 or j3 for me.
I would try to disagree with you. What old stuff in your web site actually is NOT present in more fresh extensions?

alatak

  • Development Team
  • Hero Member
  • *
  • Posts: 1821
    • alatak.net
Re: PHP Fatal error: Class 'JAccess' not found ....
« Reply #5 on: September 08, 2013, 12:57:19 pm »
Hello
We will implement a fallback.
www.alatak.net
Extensions approved by the core team: http://extensions.virtuemart.net/

Stas40

  • Beginner
  • *
  • Posts: 7
    • gidroponika
Re: PHP Fatal error: Class 'JAccess' not found ....
« Reply #6 on: September 08, 2013, 17:09:04 pm »
We will implement a fallback.
Thanks.

Stas40

  • Beginner
  • *
  • Posts: 7
    • gidroponika
Re: PHP Fatal error: Class 'JAccess' not found ....
« Reply #7 on: September 08, 2013, 17:15:01 pm »
...
I would try to disagree with you. What old stuff in your web site actually is NOT present in more fresh extensions?
It is custom development plugins. It not need for others sites. - Online grabber picture, temperature, humidity etc... and picture of growing plants online. (Sorry for my english :) )

alatak

  • Development Team
  • Hero Member
  • *
  • Posts: 1821
    • alatak.net
Re: PHP Fatal error: Class 'JAccess' not found ....
« Reply #8 on: September 08, 2013, 17:30:59 pm »
Hello

I looked to see how to implement a fallback.
It is not that easy.

And as mentioned jenkinhill we announced that j1.5 is obsolete, almost a year ago.

Actually the best is that somebody provides a dummy Jaccess file , that will be placed in that folder /libraries/joomla/access
www.alatak.net
Extensions approved by the core team: http://extensions.virtuemart.net/

Stas40

  • Beginner
  • *
  • Posts: 7
    • gidroponika
Re: PHP Fatal error: Class 'JAccess' not found ....
« Reply #9 on: September 09, 2013, 14:43:02 pm »
...
Actually the best is that somebody provides a dummy Jaccess file , that will be placed in that folder /libraries/joomla/access
Thanks, I try to do it.

Stas40

  • Beginner
  • *
  • Posts: 7
    • gidroponika
Re: PHP Fatal error: Class 'JAccess' not found ....
« Reply #10 on: September 09, 2013, 15:57:10 pm »
I think the last version was 2.0.18, which works with j1.5 .
When I add access.php - the next fatal error was JUser::authorise() in .../com_virtuemart/helpers/adminui.php . I add authorise() function to JUser j1.5 class :)
And now I get "JERROR_ALERTNOAUTHOR" in BE (i don't add any permissions to admin in access.php ;) ) and a new hard work with front end :)

I try to go back to last version 2.0.18 . Thanks ta All !

madmarx

  • Beginner
  • *
  • Posts: 2
Re: PHP Fatal error: Class 'JAccess' not found ....
« Reply #11 on: September 22, 2013, 09:24:23 am »
hi !
ten minutes and vm 2.0.22c work on j 1.5:


comment line 68-70 on wmview.php

Code: [Select]
//if (!$this->canDo->get('vm.'.$view)) {
//JFactory::getApplication()->redirect( 'index.php?option=com_virtuemart', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
//}

and add return:
Code: [Select]
/*
* Get the ACL actions
*/
public static function getActions() {
$user<->= JFactory::getUser();
$result>= new JObject;
return $result;


adminui.php line 254 comment: and on next line {
Code: [Select]
//if ($user->authorise('core.admin', 'com_virtuemart') || $user->authorise('vm.'.$link ['view'], 'com_virtuemart') || $target.................
{

now all work

....oops but is not all ....  i not see admin buttons: apply, new ...etc ...... thinking....

madmarx

  • Beginner
  • *
  • Posts: 2
Re: PHP Fatal error: Class 'JAccess' not found ....
« Reply #12 on: September 22, 2013, 10:19:01 am »
and in vmview.php:
inside function comment all 3 if's
Code: [Select]
/*
 * set all commands and options for BE default.php views
* return $list filter_order and
*/
function addStandardDefaultViewCommands($showNew=true, $showDelete=true, $showHelp=true) {
$view = JRequest::getCmd('view', JRequest::getCmd('controller','virtuemart'));

JToolBarHelper::divider();
//if ($this->canDo->get('core.admin') || $this->canDo->get('vm.'.$view.'.edit.state')) {
   JToolBarHelper::publishList();
   JToolBarHelper::unpublishList();
//}
etc ...

and in function addStandardEditViewCommands comment

//if ($this->canDo->get('core.admin') || $this->canDo->get('vm.'.$view.'.edit')) {

and close
//{

all admin function works

Maxim Pishnyak

  • Virtuemart 2 is quite bugfree now
  • Global Moderator
  • Hero Member
  • *
  • Posts: 2669
  • Virtuemart 2 is quite bugfree now
    • Virtuemart Ukraine division
Re: PHP Fatal error: Class 'JAccess' not found ....
« Reply #13 on: September 22, 2013, 11:47:30 am »
VM works on Joomla2.5. J1.5 is NOT safe for using on the internet web sites.

stawebnice

  • Jr. Member
  • **
  • Posts: 71
  • What does not kill you, makes you stronger...
    • StaWEBnice - www stránky, seo optimalizace a copywriting
Re: PHP Fatal error: Class 'JAccess' not found ....
« Reply #14 on: February 10, 2014, 21:20:02 pm »
Hi,

What if I want to migrate from Joomla! 1.5? I installed VM 2.0.18 and migrated, but it did not migrate the parameters...I have eshop with over 3000 items and all of them have 2-3 variants that differ with price and they were not migrated...
I hoped that the latest VM version might include that in the migration script, but I am not able to install it thanks to what was previously said.

Please help. Is there any way to migrate everything from Joomla 1.5.26 to VM 2.0.26d or at least little older?

Thank you!

Petra
Petra Prochazkova

StaWEBnice.com
http://www.stawebnice.com

VirtueMart Forum

Re: PHP Fatal error: Class 'JAccess' not found ....
« Reply #14 on: February 10, 2014, 21:20:02 pm »