vm2.9.8a Fatal error: Cannot use object of type JUser as array in /.../askquestion/view.html.php on

Started by pablojo69, August 07, 2014, 00:35:51 AM

Previous topic - Next topic

pablojo69

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)

:-\ :-\


jenkinhill

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


GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

siristru

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

Само слога Славjанa спашава - Свуда пођи, својој кући дођи.

kalibur

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

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/


Milbo

I really wonder how it happened. For me it looks like a copy/replacement error by my IDE.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

fiandeiro

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


liquid.ideas

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!