Jump to content

Unable To Create One-Time Package In V3.1.1


Recommended Posts

Posted

Describe the issue you're experiencing.

 

When I submit the form I get this: "SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s) on line 124 in /home/ehansen/public_html/asdev.com/public/lib/model.php"

 

Provide detailed steps necessary to reproduce the issue.

 

I enter a package name, quantity of unlimited, select the module and its package option, select "one-time" for term and enter a price of 123.00 and create a new group.

 

Include the URL the error occurred on, relative to the installation path, ie "/admin/login".

 

/admin/packages/add/

 

Attach screenshots.

 

Done

 

Include your configuration settings, i.e. OS, version of Blesta, version of module/gateway/plugin if applicable, version of PHP & MySQL.

 

OS: Linux (Ubuntu)

Blesta: 3.1.1

PHP: 5.4.9

MySQL: 5.5.35

 

This is on a development machine, my production install (v3.1.0) doesn't cause any issues.

post-4-0-57139700-1392697161_thumb.png

Posted

From what I can gather in the MySQL logs this is the query that gives an error:

 

SELECT `id` FROM `services` WHERE `pricing_id` = ('','onetime','USD','123.00','0.00','0.00')

Posted

Sorry for the spam, but I just tried this on another install as well and I got the same error, Blesta v3.1.1.  The problem is because there's no term, which is making the query pass the empty string ("").

Posted
  On 2/18/2014 at 4:26 PM, secforus_ehansen said:

Not sure either.  It worked in 3.1.0, and it works if you edit a package but not create one.

 

Would you say that you can create a package with a monthly term, edit it, add the one time, and remove the monthly to get past this issue? If so, that may be the way around it until we get a fix out.

Posted
  On 2/18/2014 at 4:33 PM, Paul said:

Would you say that you can create a package with a monthly term, edit it, add the one time, and remove the monthly to get past this issue? If so, that may be the way around it until we get a fix out.

That works.  Don't even need to add the one time, just change the type from monthly to one time and it'll edit just fine as well.

Posted
  On 2/18/2014 at 5:26 PM, Cody said:

 

CORE-1056 has been fixed for 3.1.2.

 

Hotfix below:

/app/models/packages.php

From:

		if ($term != "" || $pricing_id == "")

To:

		if ($term != "" || $pricing_id == "" || !is_numeric($pricing_id))

Thanks mate!  Appreciate the assistance.:D

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