Timothy Posted September 20, 2013 Report Posted September 20, 2013 Hello everybody. I am running into a odd issue with a very basic universal module setup. Attempting to check out with a product that does not have any service options on it fails with a error.Steps to reproduce:1: Do a clean install of v3.0.32: Enable the universal module3: Create a product in the universal module. Give it a name and leave all fields blank4: Create package group5: Create a package using the universal module product and assign it to the package group.6: Create a order form and select the same package group.I left all the options either blank or at default unless otherwise stated. To trigger the error, all you have to do is select the product on the order form. This brings up the following error.Fatal error: Cannot access empty property in <path removed>/public_html/components/modules/universal_module/universal_module.php on line 868 Oh noes!Cannot access empty property on line 868 in <path removed>/public_html/components/modules/universal_module/universal_module.phpConfiguration settings: I have tested this on two different server setups.Setup 1:Freebsd 9.1.Apache 2.2PHP 5.3.27 - PHP is run as fastcgi through suexec.Mariadb 5.3.12Blesta v3.0.3Setup 2:Freebsd 9.1Nginx 1.4.2PHP 5.4.19 - PHP is run through php-fpm.Mariadb 5.3.12Blesta v3.0.3I do not believe I was having this issue with v3.0.1 Other then that, I'm really hoping somebody can tell me what I am missing, or least a pointer in the right direction.
Michael Posted September 20, 2013 Report Posted September 20, 2013 Have you got any packages set up on it? If not I'd un-install it and re-install it to see if that fixes it.
Timothy Posted September 20, 2013 Author Report Posted September 20, 2013 This was brand a new install. I will try doing what you suggested.
Timothy Posted September 20, 2013 Author Report Posted September 20, 2013 Unfortunately, that does not help. I removed the example package and product and then uninstalled the universal module. A repeat of the steps asoutline in my first post brings up the error again.Honestly, I'm really confused as to what could be causing this. Is there any other information I can provide that would help narrow down possible causes?
Paul Posted September 20, 2013 Report Posted September 20, 2013 What happens if you add a single service field that is not required and hidden?
Timothy Posted September 20, 2013 Author Report Posted September 20, 2013 I added a service field with the name and label called 'examplename' and 'examplelabel' and then set it to hidden. This allows me to proceed to step two of the checkout stage without throwing a error. The configurable option still shows with the 'examplelabel' visible. I have also tested this with addon products and have the same error if the addon products do not have service fields. Adding even a single service field to each product does allow checkout to continue. Thank you for your help.
Timothy Posted September 20, 2013 Author Report Posted September 20, 2013 I did a clean install of each of the last 3 versions using setup 2 from my original post. Versions 3.0.1 and 3.0.2 work without error. The 3.0.3 version has the error. Is anybody else able to confirm this?
Tyson Posted September 20, 2013 Report Posted September 20, 2013 Every service option should have a "Name". Did you not enter one?
Timothy Posted September 20, 2013 Author Report Posted September 20, 2013 I did not enter anything in the service option area as there are no service options to the product. Do I need to have service options in v3.0.3? Versions 3.0.1 and 3.0.2 does not show a error with no service options.
Tyson Posted September 20, 2013 Report Posted September 20, 2013 No, you shouldn't be required to have service options set. This is a bug--assigned as CORE-778 and already fixed for v3.0.4. Thanks for taking the time to confirm it was isolated to v3.0.3. To patch yourself, update /components/modules/universal_module/universal_module.php (line 1118): Change for ($j=0, $i=0; $i<count($vars['service_fields']['label']); $i++) { $meta[] = array( To: for ($j=0, $i=0; $i<count($vars['service_fields']['label']); $i++) { if ($vars['service_fields']['name'][$i] == "") continue; $meta[] = array( Michael 1
Recommended Posts