News:

Looking for documentation? Take a look on our wiki

Main Menu

PHP Fatal error: Class 'JAccess' not found ....

Started by Stas40, September 07, 2013, 20:43:05 PM

Previous topic - Next topic

Stas40

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

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
Lowestoft, Suffolk, UK

Retired from forum life November 2023

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

alatak

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?

Stas40

Quote from: alatak on September 07, 2013, 21:49:48 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.

Quote from: alatak on September 07, 2013, 21:49:48 PM
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

Quote from: Stas40 on September 07, 2013, 22:53:13 PM
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?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

alatak



Stas40

Quote from: Maxim Pishnyak on September 08, 2013, 10:01:49 AM
...
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

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

Stas40

Quote from: alatak on September 08, 2013, 17:30:59 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

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

#11
hi !
ten minutes and vm 2.0.22c work on j 1.5:


comment line 68-70 on wmview.php

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


and add return:
/*
* 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 {

//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

and in vmview.php:
inside function comment all 3 if's
/*
* 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

VM works on Joomla2.5. J1.5 is NOT safe for using on the internet web sites.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

stawebnice

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