News:

Looking for documentation? Take a look on our wiki

Main Menu

Multi-variant error "scalar"

Started by alesalva86, September 27, 2016, 21:40:59 PM

Previous topic - Next topic

Milbo

Seems we found it, ...

open /administrator/components/com_virtuemart/models/customfields.php around line 409 (function displayProductCustomfieldBE, case 'C'), search for



$field->options = (object)$field->options;



replace by

if(!empty($field->options) and is_array($field->options)){
$field->options = (object)$field->options;
}
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

escapezone

Quote from: Milbo on November 13, 2016, 08:57:14 AM
Seems we found it, ...

open /administrator/components/com_virtuemart/models/customfields.php around line 409 (function displayProductCustomfieldBE, case 'C'), search for



$field->options = (object)$field->options;



replace by

if(!empty($field->options) and is_array($field->options)){
$field->options = (object)$field->options;
}


Fixed !

Thank you Milbo ;)

Joomla! Version 3.6.4 Stable
Virtuemart Version   3.0.18
PHP Version    7.0.12

Milbo

Also fixed in this new version http://dev.virtuemart.net/attachments/download/1028/com_virtuemart.3.0.18.3_extract_first.zip

Which should also "heal" already broken ones (just open the product, check the form and store)
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

dslove

Hi Milbo, thanks for the solution & patch but unfortunately I still get an error:

Error
   
vmError: VmTable #__virtuemart_products_el_gr Check not passed. Neither slug nor obligatory value at product_name for auto slug creation is given 0
   
vmError: You are not an administrator or the correct vendor, storing of product cancelled

(I have installed the 3.0.18.3 patch & AIO)

Milbo

This is another error. You cannot create a child, when the parent is not stored already. The child needs a name, which is derived from the parent one.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

dslove

This happens when I try to save the changes to an already existing parent product.

Milbo

I got the error myself now and the reason is that you create a new product and directly add the mv. I add some fixes and reupped it. You can see that the version changed, because the admin menu on the left shows now also the codename and svn version.
http://dev.virtuemart.net/attachments/download/1029/com_virtuemart.3.0.18.3_extract_first.zip
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

dslove

It seems to be ok now Milbo, thank you.
I will apply the latest version of the fix to the rest of the websites & post here if I discover any further issues.

Best regards,

Guido Q.

I have the same problem. please help.

dslove

Quote from: Guido Q. on December 05, 2016, 21:23:30 PM
I have the same problem. please help.

Doesn't the above solution work for you Guido?

bookplates

I was having similar issues, then updated to "VirtueMart 3.0.18.5 Blue Corvus 9390." Now I can add a product with category, and multivarient custom field on the admin side, and no errors. But when I try to add a ramification to the multivar, the front end gives "page can't be found" and "0 Cannot use object of type stdClass as array." Then any category listed with that product also reports page not found. Is there perhaps a trick to adding a ramification, or a bug in Virtuemart?

bookplates

Turns out it was a problem with my Multivarient custom field. I somehow had "Internal variable" set to "Yes," but with no internal variable assigned. I put it back to "No" -- which the hover tooltip recommends -- and works.