velaware Posted February 18, 2014 Report Posted February 18, 2014 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.
velaware Posted February 18, 2014 Author Report Posted February 18, 2014 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')
velaware Posted February 18, 2014 Author Report Posted February 18, 2014 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 ("").
Paul Posted February 18, 2014 Report Posted February 18, 2014 Thanks for the report, not sure what's going on there. I've assigned this to CORE-1056 and we'll be taking a look at it shortly. Michael 1
velaware Posted February 18, 2014 Author Report Posted February 18, 2014 Not sure either. It worked in 3.1.0, and it works if you edit a package but not create one.
Paul Posted February 18, 2014 Report Posted February 18, 2014 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.
velaware Posted February 18, 2014 Author Report Posted February 18, 2014 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.
Cody Posted February 18, 2014 Report Posted February 18, 2014 CORE-1056 has been fixed for 3.1.2. Hotfix below:/app/models/packages.phpFrom: if ($term != "" || $pricing_id == "") To: if ($term != "" || $pricing_id == "" || !is_numeric($pricing_id)) Michael 1
velaware Posted February 18, 2014 Author Report Posted February 18, 2014 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.
Recommended Posts