Author Topic: Multi-variant error "scalar"  (Read 8153 times)

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9997
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Multi-variant error "scalar"
« Reply #15 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
 
Code: [Select]

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


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

escapezone

  • Beginner
  • *
  • Posts: 24
Re: Multi-variant error "scalar"
« Reply #16 on: November 14, 2016, 11:17:21 am »
Seems we found it, ...

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

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


replace by
Code: [Select]
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9997
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Multi-variant error "scalar"
« Reply #17 on: November 14, 2016, 14:59:07 pm »
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)
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

dslove

  • Jr. Member
  • **
  • Posts: 88
Re: Multi-variant error "scalar"
« Reply #18 on: November 15, 2016, 11:22:50 am »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9997
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Multi-variant error "scalar"
« Reply #19 on: November 15, 2016, 12:22:46 pm »
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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

dslove

  • Jr. Member
  • **
  • Posts: 88
Re: Multi-variant error "scalar"
« Reply #20 on: November 15, 2016, 12:25:26 pm »
This happens when I try to save the changes to an already existing parent product.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9997
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Multi-variant error "scalar"
« Reply #21 on: November 15, 2016, 14:03:43 pm »
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
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

dslove

  • Jr. Member
  • **
  • Posts: 88
Re: Multi-variant error "scalar"
« Reply #22 on: November 15, 2016, 19:25:33 pm »
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.

  • Beginner
  • *
  • Posts: 1
  • A beginner
  • Skype Name: guidoquadrini@hotmail.com
Re: Multi-variant error "scalar"
« Reply #23 on: December 05, 2016, 21:23:30 pm »
I have the same problem. please help.

dslove

  • Jr. Member
  • **
  • Posts: 88
Re: Multi-variant error "scalar"
« Reply #24 on: December 06, 2016, 07:49:01 am »
I have the same problem. please help.

Doesn't the above solution work for you Guido?

bookplates

  • Beginner
  • *
  • Posts: 2
  • A beginner
Re: Multi-variant error "scalar"
« Reply #25 on: December 10, 2016, 18:29:03 pm »
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

  • Beginner
  • *
  • Posts: 2
  • A beginner
Re: Multi-variant error "scalar"
« Reply #26 on: December 10, 2016, 20:37:53 pm »
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.