Welcome Guest! To enable all features please try to register or login.
Options
Go to last post Go to first unread
Offline Reto Cossalter  
#1 Posted : Thursday, November 22, 2018 5:34:35 AM(UTC)
Reto Cossalter

Rank: Advanced Member

Reputation:

Groups: HCC-Partner, Registered, Registered Users, Subscribers
Joined: 6/9/2017(UTC)
Posts: 47

Thanks: 25 times
Was thanked: 24 time(s) in 21 post(s)
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
Offline Will Strohl  
#2 Posted : Wednesday, December 19, 2018 2:22:24 PM(UTC)
Will Strohl

Rank: Administration

Reputation:

Groups: Administrators, HCC-Employee-Store-Manager, HCC-Employee-Support, HCC-Partner, Moderators, Partners, Registered, Registered Users, Subscribers
Joined: 12/22/2016(UTC)
Posts: 342

Thanks: 78 times
Was thanked: 59 time(s) in 57 post(s)
Thanks for posting this! :)
Will Strohl, Upendo Ventures
Hotcakes Cloud | Get Support | Code Support
Official Cloud & Support provider for Hotcakes
Offline Reto Cossalter  
#3 Posted : Friday, February 8, 2019 11:52:09 AM(UTC)
Reto Cossalter

Rank: Advanced Member

Reputation:

Groups: HCC-Partner, Registered, Registered Users, Subscribers
Joined: 6/9/2017(UTC)
Posts: 47

Thanks: 25 times
Was thanked: 24 time(s) in 21 post(s)
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

Edited by user Monday, February 11, 2019 1:33:39 AM(UTC)  | Reason: Not specified

Offline Will Strohl  
#4 Posted : Friday, February 8, 2019 2:47:19 PM(UTC)
Will Strohl

Rank: Administration

Reputation:

Groups: Administrators, HCC-Employee-Store-Manager, HCC-Employee-Support, HCC-Partner, Moderators, Partners, Registered, Registered Users, Subscribers
Joined: 12/22/2016(UTC)
Posts: 342

Thanks: 78 times
Was thanked: 59 time(s) in 57 post(s)
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
Offline Reto Cossalter  
#5 Posted : Monday, February 11, 2019 1:36:35 AM(UTC)
Reto Cossalter

Rank: Advanced Member

Reputation:

Groups: HCC-Partner, Registered, Registered Users, Subscribers
Joined: 6/9/2017(UTC)
Posts: 47

Thanks: 25 times
Was thanked: 24 time(s) in 21 post(s)
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
Offline Will Strohl  
#6 Posted : Monday, February 11, 2019 2:14:44 PM(UTC)
Will Strohl

Rank: Administration

Reputation:

Groups: Administrators, HCC-Employee-Store-Manager, HCC-Employee-Support, HCC-Partner, Moderators, Partners, Registered, Registered Users, Subscribers
Joined: 12/22/2016(UTC)
Posts: 342

Thanks: 78 times
Was thanked: 59 time(s) in 57 post(s)
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
thanks 1 user thanked Will Strohl for this useful post.
Reto Cossalter on 2/12/2019(UTC)
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.273 seconds.

Notification

Icon
Error

Loading
  • Sign-up for the Hotcakes Community Newsletter: