VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: Outdoorsman on January 24, 2012, 06:33:43 AM

Title: Fatal error: Access level to JElementSpacer::$_name must be public
Post by: Outdoorsman on January 24, 2012, 06:33:43 AM
Ok I have VM 2 installed, I then installed the aio package. No payment methods existed so I went to create a new one.
Choose paypal and now when I go to edit that option I get
Fatal error: Access level to JElementSpacer::$_name must be public (as in class JElement) in /home/xxxx/public_html/libraries/joomla/html/parameter/element/spacer.php on line 54

the page is white background, no css styling at all and it defaults left and shows the main VM navigation options
According to reviews, everyone is talking about the lack of payment options in 2.0 and I am on a J 1.7 system so have I wasted my time installing VM2 and importing over 200 products? I have 18,000 products waiting on a shopping cart and 2.0 so far is looking like its gonna be a problem.
Title: Re: Fatal error: Access level to JElementSpacer::$_name must be public
Post by: jenkinhill on January 24, 2012, 09:44:05 AM
 JElementSpacer is related to Joomla 1.7's access control. Not seen that before, and nobody has described it here until now. Are you using ACL or is everything set to public? I don't know a simple solution as I do not understand how ACL works at a code level.

Paypal is functional in VM2 and already used in some of the live VM2 shops, and works OK with sandbox on my test/development sites.
Title: Re: Fatal error: Access level to JElementSpacer::$_name must be public
Post by: Outdoorsman on January 25, 2012, 04:55:55 AM
Nope not using ACL here. Ill go through my settings and see if I can find something that might be causing this.
The only difference ive made on the site recently is the template system which uses the JAT3 framework but surely that wont cause it.

Allow me to ask this, once installing the aio plugin setup, should the payment systems be shown and readily available or does one have to create them new via the "new" button? This is what I had to do as there was nothing listed in the payment options page.
Title: Re: Fatal error: Access level to JElementSpacer::$_name must be public
Post by: Outdoorsman on January 25, 2012, 05:37:13 AM
Ive checked everything I can think of, don't see anything that is not set to public. This seems to only be affecting the VM2 admin and nothing on the front end is affected.

FYI: I did install VM then imported my products, tinkered with it some, then installed the aio plugin, is there a possibility that putting in the products prior to the aio plugin messed something up?  I have 200 products in there now, hate to remove and do a fresh install but will if thats a necessary step
Title: Re: Fatal error: Access level to JElementSpacer::$_name must be public
Post by: jenkinhill on January 25, 2012, 10:48:59 AM
The aio plugin should be installed immediately after the main component. After that you start the configuration, preferably using the sample data so everything can be tested. The make a backup using Akeeba so there is always a functional clean installation to go back to.

Then delete the sample data & add a few of your own categories & products. Test again. If OK add more products or install CSVI4 (http://www.csvimproved.com/) to assist in product maintenance.
Title: Re: Fatal error: Access level to JElementSpacer::$_name must be public
Post by: Outdoorsman on January 25, 2012, 21:47:22 PM
I was hoping it wouldnt come to this but, I will do a re install, I am going to try using the tool to reset all tables and do a fresh install, if that doesn't work ill just remove the component and go from there with a new install. I will post back here with updates.
Title: Re: Fatal error: Access level to JElementSpacer::$_name must be public
Post by: Outdoorsman on January 25, 2012, 22:50:00 PM
Update:
Removed all components and plug ins, did a fresh install, immediately installed the AIO plug in then went to the payment options, no options existed, so attempted to create one and the same problem described in the OP still exists.

Now I decided to start checking plug ins and guess what? VM2 is having a conflict with the JAT3 framework so if you use a template with the JAT3 framework, you wont be able to use Virtuemart until you find a way to fix this ...... UNLESS ... you can configure the payment options, then reactivate the JAT3 plug in and go from there, about to test that theory

This seems to be a bug and maybe needs to be passed to the dev team
Title: Re: Fatal error: Access level to JElementSpacer::$_name must be public
Post by: Milbo on January 26, 2012, 03:22:54 AM
Fatal error: Access level to JElementSpacer::$_name must be public (as in class JElement) in /home/xxxx/public_html/libraries/joomla/html/parameter/element/spacer.php on line 54

I cant see how this error message is related to vm2
Title: Re: Fatal error: Access level to JElementSpacer::$_name must be public
Post by: Outdoorsman on January 26, 2012, 04:43:24 AM
Milbo, I explained it to you in the PM or at least thought I did. VM2 has a conflict with the JAT3 plugin, that is what causes this error, when you turn the JAT3 plug in off then all works fine. Now the issue is to find out why the conflict. So far I cant resolve the issue.