Jump to content

Oh Noes! Universal Module.


Timothy

Recommended Posts


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.3
2: Enable the universal module
3: Create a product in the universal module. Give it a name and leave all fields blank
4: Create package group
5: 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.php


Configuration settings: I have tested this on two different server setups.
Setup 1:
Freebsd 9.1.
Apache 2.2
PHP 5.3.27 - PHP is run as fastcgi through suexec.
Mariadb 5.3.12
Blesta v3.0.3

Setup 2:
Freebsd 9.1
Nginx 1.4.2
PHP 5.4.19 - PHP is run through php-fpm.
Mariadb 5.3.12
Blesta v3.0.3

I 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.

Link to comment
Share on other sites

Unfortunately, that does not help. I removed the example package and product and then uninstalled the universal module. A repeat of the steps as
outline 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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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(

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...