VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Development & Testing => Topic started by: pablojo69 on August 07, 2014, 00:35:51 AM

Title: vm2.9.8a Fatal error: Cannot use object of type JUser as array in /.../askquestion/view.html.php on
Post by: pablojo69 on August 07, 2014, 00:35:51 AM
I have the same error on a page I'm testing, gives me exactly the same error when sending a question I get this error ...

Fatal error: Cannot use object of type JUser as array in /home/parques/public_html/components/com_virtuemart/views/askquestion/view.html.php on line 189

the ad online and have it is this ...

http://great-parks.com/index.php/es/productos/slides-classics/slides-classics-s001b-detail

there they can test sending a question always throws the same error, and probe install again virtuermart on another server and get the same result, I need help, because if I need to ask questions about products, the shop will use as catalog and all this only this is what is not working, thank you very much.

I have installed Joomla 3.3 Virtuemart 2.9.8a, the AIO component is installed but entering throws a 404 error component not found. probe and install it anyway and at the end of the installation but does enter the AIO component gives me that error 404

Joomla 3.3
Virtuemart 2.9.8a
PHP native(5.4)

:-\ :-\
Title: Re: vm2.9.8a Fatal error: Cannot use object of type JUser as array in /.../askquestion/view.html.php
Post by: pablojo69 on August 15, 2014, 21:19:54 PM
someone??!?!  :D
Title: Re: vm2.9.8a Fatal error: Cannot use object of type JUser as array in /.../askquestion/view.html.php
Post by: jenkinhill on August 15, 2014, 23:18:37 PM
Now try with 2.9.9 - from http://dev.virtuemart.net/projects/virtuemart/files
Title: Re: vm2.9.8a Fatal error: Cannot use object of type JUser as array in /.../askquestion/view.html.php
Post by: pablojo69 on September 08, 2014, 22:50:19 PM
still not work :(
Title: Re: vm2.9.8a Fatal error: Cannot use object of type JUser as array in /.../askquestion/view.html.php
Post by: GJC Web Design on September 08, 2014, 23:40:53 PM
with 2.9.9b works fine for me - see http://test.gjcwebdesign.com/j2524/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=61&virtuemart_category_id=4
and the AOI component doesn't now exist - that is why you get a 404 - it's normal..
Title: Re: vm2.9.8a Fatal error: Cannot use object of type JUser as array in /.../askquestion/view.html.php
Post by: siristru on September 16, 2014, 22:40:11 PM
Hi, Guys. Thank you for excellent job you've made so far, releasing VM 2.9.9b
Regarding issue reported here, I also experienced it, with the same error notice.

Fatal error: Cannot use object of type JUser as array in /home/parques/public_html/components/com_virtuemart/views/askquestion/view.html.php on line 189

So I changed in ROOT/components/com_virtuemart/views/askquestion/view.html.php in line 189

from this:

$this->vendorEmail = $this->user['email'];

to this:

$this->vendorEmail = $user['email'];

And in line 192 from this:

$this->vendor->vendor_name = $this->user['name'];

to this:

$this->vendor->vendor_name = $user['name'];

Then in ROOT/components/com_virtuemart/views/askquestion/tmpl/mail_html_question.php in line 53

changed this:

<span style="font-size: 14px; font-weight: bold"><?php echo vmText::sprintf('COM_VIRTUEMART_QUESTION_MAIL_FROM'$this->user['name'], $this->user['email']); ?></span>

with this:

<span style="font-size: 14px; font-weight: bold"><?php echo vmText::sprintf('COM_VIRTUEMART_QUESTION_MAIL_FROM'$user['name'], $this->user['email']); ?></span>

And also found some typos in that file:

Line 75:

<?php if ($this->product->product_sku) echo ' ('vmTextt::_('COM_VIRTUEMART_PRODUCT_SKU').' '.$this->product->product_sku .')' ?>

should be:

<?php if ($this->product->product_sku) echo ' (' vmText::_('COM_VIRTUEMART_PRODUCT_SKU').' '.$this->product->product_sku .')' ?>

And in another file in this folder: ROOT/components/com_virtuemart/views/askquestion/tmpl/mail_confirmed.php

In line 29 is:

<?php echo vmTextt::_('COM_VIRTUEMART_ASK_QUESTION_THANK_YOU'); ?>

should be:

<?php echo vmText::_('COM_VIRTUEMART_ASK_QUESTION_THANK_YOU'); ?>

In line 30 is:

<button onclick="<?php echo $onclick ?>" type="button"><?php echvmTextxt::_('COM_VIRTUEMART_CLOSE'); ?></button>

should be:

<button onclick="<?php echo $onclick ?>" type="button"><?php ech o vmText::_('COM_VIRTUEMART_CLOSE'); ?></button>

After those changes asking about product work as gold :D

Title: Re: vm2.9.8a Fatal error: Cannot use object of type JUser as array in /.../askquestion/view.html.php
Post by: kalibur on September 17, 2014, 12:07:09 PM
Quote from: siristru on September 16, 2014, 22:40:11 PM
Hi, Guys. Thank you for excellent job you've made so far, releasing VM 2.9.9b
Regarding issue reported here, I also experienced it, with the same error notice.

Fatal error: Cannot use object of type JUser as array in /home/parques/public_html/components/com_virtuemart/views/askquestion/view.html.php on line 189

So I changed in ROOT/components/com_virtuemart/views/askquestion/view.html.php in line 189

from this:

$this->vendorEmail = $this->user['email'];

Thank you for your answer!. I solved the problem, but

to this:

$this->vendorEmail = $user['email'];

And in line 192 from this:

$this->vendor->vendor_name = $this->user['name'];

to this:

$this->vendor->vendor_name = $user['name'];

Then in ROOT/components/com_virtuemart/views/askquestion/tmpl/mail_html_question.php in line 53

changed this:

<span style="font-size: 14px; font-weight: bold"><?php echo vmText::sprintf('COM_VIRTUEMART_QUESTION_MAIL_FROM'$this->user['name'], $this->user['email']); ?></span>

with this:

<span style="font-size: 14px; font-weight: bold"><?php echo vmText::sprintf('COM_VIRTUEMART_QUESTION_MAIL_FROM'$user['name'], $this->user['email']); ?></span>

And also found some typos in that file:

Line 75:

<?php if ($this->product->product_sku) echo ' ('vmTextt::_('COM_VIRTUEMART_PRODUCT_SKU').' '.$this->product->product_sku .')' ?>

should be:

<?php if ($this->product->product_sku) echo ' (' vmText::_('COM_VIRTUEMART_PRODUCT_SKU').' '.$this->product->product_sku .')' ?>

And in another file in this folder: ROOT/components/com_virtuemart/views/askquestion/tmpl/mail_confirmed.php

In line 29 is:

<?php echo vmTextt::_('COM_VIRTUEMART_ASK_QUESTION_THANK_YOU'); ?>

should be:

<?php echo vmText::_('COM_VIRTUEMART_ASK_QUESTION_THANK_YOU'); ?>

In line 30 is:

<button onclick="<?php echo $onclick ?>" type="button"><?php echvmTextxt::_('COM_VIRTUEMART_CLOSE'); ?></button>

should be:

<button onclick="<?php echo $onclick ?>" type="button"><?php ech o vmText::_('COM_VIRTUEMART_CLOSE'); ?></button>

After those changes asking about product work as gold :D




I solved the problem, but now, when I get the mail, data not shown me Buyer: "A query was made by ()"

I also two warning messages appear in the email:

"Warning: Attempt to assign property of non-object in /homepages/xxxxxxxxx/htdocs/clickandbuilds/Joomla/administrator/components/com_virtuemart/models/media.php on line 414 "

"Warning: Attempt to assign property of non-object in /homepages/xxxxxxxxx/htdocs/clickandbuilds/Joomla/components/com_virtuemart/views/askquestion/view.html.php on line 192"

Thanks again for the answer  ;D
Title: Re: vm2.9.8a Fatal error: Cannot use object of type JUser as array in /.../askquestion/view.html.php
Post by: Milbo on September 17, 2014, 15:09:07 PM
oh, I am sorry, I did not see this post, worked on it yesterday, fix is in svn
Title: Re: vm2.9.8a Fatal error: Cannot use object of type JUser as array in /.../askquestion/view.html.php
Post by: pablojo69 on September 25, 2014, 00:33:42 AM
Tanks now is working :D
Title: Re: vm2.9.8a Fatal error: Cannot use object of type JUser as array in /.../askquestion/view.html.php
Post by: Milbo on September 27, 2014, 15:23:05 PM
I really wonder how it happened. For me it looks like a copy/replacement error by my IDE.
Title: Re: vm2.9.8a Fatal error: Cannot use object of type JUser as array in /.../askquestion/view.html.php
Post by: fiandeiro on September 28, 2014, 04:53:37 AM
Hi I am getting the same error - I get the mail, data not shown me Buyer: "A query was made by ()"

did you manages to fix this
Title: Re: vm2.9.8a Fatal error: Cannot use object of type JUser as array in /.../askquestion/view.html.php
Post by: pablojo69 on September 30, 2014, 03:22:47 AM
yes i have the same error

A question was asked by  ()

:( :(
Title: Re: vm2.9.8a Fatal error: Cannot use object of type JUser as array in /.../askquestion/view.html.php
Post by: liquid.ideas on October 03, 2014, 08:09:26 AM
Hi Guys,

I have this same error, If I make the changes suggested I still have the error:
Fatal error: Cannot use object of type JUser as array in /home/timespxc/public_html/components/com_virtuemart/views/askquestion/tmpl/mail_html_question.php on line 53

And adds in another error:
Notice: Undefined variable: user in /home/timespxc/public_html/components/com_virtuemart/views/askquestion/tmpl/mail_html_question.php on line 53

Im on Joomla 3.3.3. Virtuemart version 2.9.8 (as far as I can remember)

Any help would be appreciated!
Title: Re: vm2.9.8a Fatal error: Cannot use object of type JUser as array in /.../askquestion/view.html.php
Post by: liquid.ideas on October 03, 2014, 15:09:42 PM
Hi Chaps,

Upgrading to 2.9.9e fixed this issue for me.