Reto Cossalter
2018-11-22T10:34:35Z
Just a quick heads up:
If you delete a product type property value make sure beforehand if this value is assigned to a product, otherwise you could run into problems:

https://github.com/Hotca...commerce-core/issues/187 
Will Strohl
2018-12-19T19:22:24Z
Thanks for posting this! 🙂
Will Strohl, Upendo Ventures
Hotcakes Cloud  | Get Support  | Code Support 
Official Cloud & Support provider for Hotcakes
Reto Cossalter
2019-02-08T16:52:09Z
DISCLAIMER:
As Will correctly states below: Executing SQL Statements directly to the database will nullify any support or maintenance contract. Please contact your HCC Partner!


The problem above affects Hotcakes Category Viewer when using DrillDown-View.
It will stop working with a nasty error message

If you run into this problem you can fix it using this the statement below:

1) Create a DB Backup
2) Make sure DB Backup is correctly created
3) Make sure you followed step 1) and 2)
4) This is tested with HCC 3.1.0 on DNN 8.0.4

Quote:


SELECT ppv.id
FROM hcc_ProductPropertyValue ppv
LEFT JOIN hcc_ProductPropertyChoice ppc
ON ppv.PropertyValue = ppc.Id
WHERE ppv.PropertyId IN
(
SELECT ID
FROM hcc_ProductProperty
WHERE TypeCode = 2
)
AND ppc.Id IS NULL



if this returns one or more rows you can execute the following statement to delete the orphan references:

Quote:


DELETE FROM
hcc_ProductPropertyValue
WHERE id IN
(
SELECT ppv.id
FROM hcc_ProductPropertyValue ppv
LEFT JOIN hcc_ProductPropertyChoice ppc
ON ppv.PropertyValue = ppc.Id
WHERE ppv.PropertyId IN
(
SELECT ID
FROM hcc_ProductProperty
WHERE TypeCode = 2
)
AND ppc.Id IS NULL
)



Now DrillDown View should work again.
Hope that helps.
Reto
Will Strohl
2019-02-08T19:47:19Z
So... Should we trust your SQL snippet, or not? 😃

For all: Just so you know, I realize that everyone tends to run SQL against various solutions out there. It's always worth noting, though, that it's rare that any solution supports any kind of direct SQL access and in most cases running SQL is nullify any support or maintenance contract you might have. 🙂
Will Strohl, Upendo Ventures
Hotcakes Cloud  | Get Support  | Code Support 
Official Cloud & Support provider for Hotcakes
Reto Cossalter
2019-02-11T06:36:35Z
Hi Will

You are correct, I updated my post above to make aware of the problem with executing SQL statements against the db but left the statements in there.
If you think they should be removed (not sure about that) please PM
Will Strohl
2019-02-11T19:14:44Z
No, it's all good. This stuff lives online, so it's important to remind people that might simply look at and copy/paste of the risks of running SQL. Thanks for your participation! 🙂
Will Strohl, Upendo Ventures
Hotcakes Cloud  | Get Support  | Code Support 
Official Cloud & Support provider for Hotcakes
Loading
  • Sign-up for the Hotcakes Community Newsletter: