Menu
Product
Showcase
Partners
Community
Resources
Services
Sign Up / Log In
Try It Now
Download
Product
Showcase
Partners
Community
Resources
Services
Sign Up / Log In
Forums
Search Forum
Search
Advanced Search
Topics
Posts
Unanswered
Active Topics
Prev
Go to previous topic
Next
Go to next topic
Last Post 2/11/2019 3:14 PM by
Will Strohl
Bug: Be careful when deleting product type property values
5 Replies
1 Subscribed to this topic
1 Subscribed to this forum
Sort:
Oldest First
Most Recent First
You are not authorized to post a reply.
Page 1 of 2
1
2
>
>>
Author
Messages
Reto Cossalter
Basic Member
Posts:75
11/22/2018 6:34 AM
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/Hotcak...erce-core/issues/187
Will Strohl
Veteran Member
Posts:570
12/19/2018 3:22 PM
Thanks for posting this! :)
Will Strohl, Upendo Ventures
Hotcakes Cloud
|
Get Support
|
Code Support
Official Cloud & Support provider for Hotcakes
Reto Cossalter
Basic Member
Posts:75
2/8/2019 12:52 PM
[b]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! [/b]
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) [b]Create a DB Backup[/b]
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
[/quote]
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
)
[/quote]
Now DrillDown View should work again.
Hope that helps.
Reto
Will Strohl
Veteran Member
Posts:570
2/8/2019 3:47 PM
So... Should we trust your SQL snippet, or not? :D
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
Basic Member
Posts:75
2/11/2019 2:36 AM
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
You are not authorized to post a reply.
Page 1 of 2
1
2
>
>>
Private
General
--Ask Anything
--Content Management
--Customer Experience
--Marketing
--SEO
Merchants
--Catalog Management
--Marketing/Promotions
--Order Management
--Payments
--Shipping
--Store Administration (General)
Designers
--Themes
--Viewsets
--General Design
Developers
--Extension Points (Store-Relate...
--Implementation
--Installation and Upgrade
--Module Development
--General Development
Forums
Merchants
Store Administration (General)
Sign-up for the Hotcakes Community Newsletter:
E-Mail Address