SQL Error on details page

herbo4

New Member
Hi there fellow Fabriknauts, I'm a new iser to the forum but I've been using Fabrik for about a month. It has been AMAZING for all of my needs, but today something funny happened. I created a new list, and when I go to view the details of an entry the details don't show up. Completely empty. What's more, I just made a join between the new list and an old list; the old list's details where visible prior to the join, but now they aren't. And I'm getting a wall of text error from SQL when viewing the join list's details, posted below:

Code:
You have an error in your SQL syntax; check the manual that corresponds to your
 MySQL server version for the right syntax to use near 'ID = '1' ORDER BY 
`aed_orders`.`TICKET ID` ASC,`aed_orders`.`TICKET ID` ASC' at line 58 SQL=SELECT
 SQL_CALC_FOUND_ROWS DISTINCT `aed_orders`.`TICKET ID` AS 
`aed_orders___TICKET ID`, `aed_orders`.`TICKET ID` AS `aed_orders___TICKET 
ID_raw`, `aed_orders`.`Client` AS `aed_orders___Client`, `aed_orders`.`Client` AS 
`aed_orders___Client_raw`, `aed_orders`.`UPC` AS `aed_orders___UPC`, 
`aed_orders`.`UPC` AS `aed_orders___UPC_raw`, `aed_customers`.`Client` AS 
`aed_customers___Client`, `aed_customers`.`Client` AS 
`aed_customers___Client_raw`, `aed_customers`.`Address` AS 
`aed_customers___Address`, `aed_customers`.`Address` AS 
`aed_customers___Address_raw`, `aed_customers`.`Street1` AS 
`aed_customers___Street1`, `aed_customers`.`Street1` AS 
`aed_customers___Street1_raw`, `aed_customers`.`Street2` AS 
`aed_customers___Street2`, `aed_customers`.`Street2` AS 
`aed_customers___Street2_raw`, `aed_customers`.`City` AS `aed_customers___City`,
 `aed_customers`.`City` AS `aed_customers___City_raw`, `aed_customers`.`State` AS
 `aed_customers___State`, `aed_customers`.`State` AS 
`aed_customers___State_raw`, `aed_customers`.`Zip` AS `aed_customers___Zip`, 
`aed_customers`.`Zip` AS `aed_customers___Zip_raw`, `aed_customers`.`Contact` AS
 `aed_customers___Contact`, `aed_customers`.`Contact` AS 
`aed_customers___Contact_raw`, `aed_customers`.`Phone` AS 
`aed_customers___Phone`, `aed_customers`.`Phone` AS 
`aed_customers___Phone_raw`, `aed_customers`.`Email` AS `aed_customers___Email`, 
`aed_customers`.`Email` AS `aed_customers___Email_raw`, `aed_customers`.`PO` AS 
`aed_customers___PO`, `aed_customers`.`PO` AS `aed_customers___PO_raw`, 
`aed_inventory`.`Barcode` AS `aed_inventory___Barcode`, `aed_inventory`.`Barcode` 
AS `aed_inventory___Barcode_raw`, `aed_inventory`.`Manufacturer` AS 
`aed_inventory___Manufacturer`, `aed_inventory`.`Manufacturer` AS 
`aed_inventory___Manufacturer_raw`, `aed_inventory`.`Product` AS 
`aed_inventory___Product`, `aed_inventory`.`Product` AS 
`aed_inventory___Product_raw`, `aed_inventory`.`Item` AS `aed_inventory___Item`, 
`aed_inventory`.`Item` AS `aed_inventory___Item_raw`, 
`aed_inventory`.`Part_Number` AS `aed_inventory___Part_Number`,
`aed_inventory`.`Part_Number` AS `aed_inventory___Part_Number_raw`, 
`aed_inventory`.`Aisle` AS `aed_inventory___Aisle`, `aed_inventory`.`Aisle` AS 
`aed_inventory___Aisle_raw`, `aed_inventory`.`Section` AS 
`aed_inventory___Section`, `aed_inventory`.`Section` AS 
`aed_inventory___Section_raw`, `aed_inventory`.`Shelf` AS `aed_inventory___Shelf`, 
`aed_inventory`.`Shelf` AS `aed_inventory___Shelf_raw`, 
`aed_inventory`.`Quantity_Warning` AS `aed_inventory___Quantity_Warning`, 
`aed_inventory`.`Quantity_Warning` AS `aed_inventory___Quantity_Warning_raw`, 
`aed_inventory`.`Reorder Point` AS `aed_inventory___Reorder Point`, 
`aed_inventory`.`Reorder Point` AS `aed_inventory___Reorder Point_raw`, 
`aed_inventory`.`Exp Date` AS `aed_inventory___Exp Date`, `aed_inventory`.`Exp 
Date` AS `aed_inventory___Exp Date_raw`, `aed_inventory`.`Notes` AS 
`aed_inventory___Notes`, `aed_inventory`.`Notes` AS `aed_inventory___Notes_raw`, 
`aed_orders`.`TICKET ID` AS slug , `aed_orders`.`TICKET ID` AS `__pk_val` FROM 
`aed_orders` LEFT JOIN `aed_customers` AS `aed_customers` ON 
`aed_customers`.`Client` = `aed_orders`.`Client` RIGHT JOIN `aed_inventory` AS 
`aed_inventory` ON `aed_inventory`.`Barcode` = `aed_orders`.`UPC` WHERE 
aed_orders.TICKET ID = '1' ORDER BY `aed_orders`.`TICKET ID` 
ASC,`aed_orders`.`TICKET ID` ASC

I've set all the access levels on the forms, elements, and lists, and I've made sure all elements are published. Anyone who can solve this one will make a paid subscriber out of me, I've tried everything I can think of.
 
I have a stored procedure in SQL Server with try catch. What I want to do in the catch loop is to call my own Stored procedure for logging with all the error variables, like so:

BEGIN TRY
-- Generate a divide-by-zero error.
SELECT 1/0;
END TRY
BEGIN CATCH
exec log.LogError ERROR_NUMBER(), ERROR_SEVERITY(), ERROR_MESSAGE();
END CATCH;
 
Not sure...

I have a stored procedure in SQL Server with try catch. What I want to do in the catch loop is to call my own Stored procedure for logging with all the error variables, like so:

BEGIN TRY
-- Generate a divide-by-zero error.
SELECT 1/0;
END TRY
BEGIN CATCH
exec log.LogError ERROR_NUMBER(), ERROR_SEVERITY(), ERROR_MESSAGE();
END CATCH;

Thanks for the response, but I'm not sure how this will work to help solve my issue. Are you simply asking me to insert a try-catch around the query generating the error? If so, I'm not quite sure how to edit the queries Fabrik executes to generate lists, but if you give me a file name I can easily edit it.
 
Update, the SQL error I received was my fault, accidentally left auto-increment on a text field. I'm still getting a problem displaying any newly created list's details. I'e tried making all new lists and menu items, and every new list I make shows fine as a table/list. I just want to see a details view of the individual rows on the lists, but when the details view is generated, the list is empty. I inspected the element and it seems that it isn't just empty, but fabrik labels it as an empty fabrik field, the difference there being the elements aren't just blanks, they appear in the HTML as:

<li style="clear:both;width:100%;" class="fabrikElementContainer textarea fabrikDataEmpty">

This would make my day guys, can someone find an answer?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top