Skip to content

Commit 1e9bdbb

Browse files
committed
v4.2.2. - Fix phatom records being in DB with null TypeCode.
1 parent b79d83b commit 1e9bdbb

File tree

8 files changed

+53
-32
lines changed

8 files changed

+53
-32
lines changed

Components/Categories/CategoryData.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ public void Delete()
167167
public void Save()
168168
{
169169
_objCtrl.Update(DataRecord);
170-
_objCtrl.Update(DataLangRecord);
170+
if (String.IsNullOrEmpty(DataLangRecord.TypeCode)) DataLangRecord.TypeCode = "CATEGORYLANG";
171+
DataLangRecord.ItemID = _objCtrl.Update(DataLangRecord);
171172

172173
//do reindex of cascade records.
173174
if (_doCascadeIndex)

Components/NBrightBuyController.cs

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections;
33
using System.Collections.Generic;
4+
using System.Data.SqlTypes;
45
using System.Globalization;
56
using System.Net;
67
using System.Web;
@@ -277,7 +278,15 @@ public override int Update(NBrightInfo objInfo)
277278

278279
// do update
279280
objInfo.ModifiedDate = DateTime.Now;
280-
return DataProvider.Instance().Update(objInfo.ItemID, objInfo.PortalId, objInfo.ModuleId, objInfo.TypeCode, objInfo.XMLData, objInfo.GUIDKey, objInfo.ModifiedDate, objInfo.TextData, objInfo.XrefItemId, objInfo.ParentItemId, objInfo.UserId, objInfo.Lang);
281+
if (String.IsNullOrEmpty(objInfo.TypeCode))
282+
{
283+
Logging.Error($"NBrightBuyController.Update called with NULL typecode: Is is caused by invalid langauge records (usually Categories, when a langauge is added, they need to be edited and saved.)" );
284+
return -1;
285+
}
286+
else
287+
{
288+
return DataProvider.Instance().Update(objInfo.ItemID, objInfo.PortalId, objInfo.ModuleId, objInfo.TypeCode, objInfo.XMLData, objInfo.GUIDKey, objInfo.ModifiedDate, objInfo.TextData, objInfo.XrefItemId, objInfo.ParentItemId, objInfo.UserId, objInfo.Lang);
289+
}
281290
}
282291
catch (Exception e)
283292
{
@@ -399,7 +408,17 @@ public NBrightInfo GetData(int itemId, string typeCodeLang, string lang = "",boo
399408

400409
if (rtnInfo == null)
401410
{
402-
rtnInfo = CBO.FillObject<NBrightInfo>(DataProvider.Instance().Get(itemId, typeCodeLang, lang));
411+
rtnInfo = CBO.FillObject<NBrightInfo>(DataProvider.Instance().Get(itemId, typeCodeLang, lang));
412+
if (rtnInfo.Lang == "")
413+
{
414+
// record does not exists, so add lang
415+
rtnInfo.Lang = lang;
416+
if (rtnInfo.XMLDoc.SelectSingleNode("genxml/lang") == null)
417+
{
418+
rtnInfo.SetXmlProperty("genxml/lang", "", System.TypeCode.String, false);
419+
}
420+
rtnInfo.AddXmlNode("<genxml></genxml>", "/*", "genxml/lang");
421+
}
403422
if (debugMode == false) Utils.SetCache(strCacheKey, rtnInfo);
404423
}
405424
return rtnInfo;

Components/NBrightBuyUtils.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,6 +1430,7 @@ public static List<NBrightInfo> GetCatList(int parentid = 0, string groupref = "
14301430
{
14311431
var g = grpCtrl.GetCategory(c.ItemID);
14321432
if (g != null) c.SetXmlProperty("genxml/entrycount", g.entrycount.ToString(""));
1433+
c.Lang = lang; // get correct language, even it it does not exists.
14331434
}
14341435

14351436
return levelList;

DNNpackager.dnnpack

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<root>
2-
<version>4.2.1</version>
2+
<version>4.2.2</version>
33
<websitedestrelpath>\DesktopModules\NBright\NBrightBuy</websitedestrelpath>
44
<websitedestbinrelpath>\bin</websitedestbinrelpath>
55
<!-- Include only files that match the regular expression -->

OpenStore.dnn

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<dotnetnuke type="Package" version="5.0">
22
<packages>
33

4-
<package name="OS_ProductView" type="Module" version="4.2.1">
4+
<package name="OS_ProductView" type="Module" version="4.2.2">
55
<friendlyName>OS_ProductView</friendlyName>
66
<description>
77
OpenStore open source e-commerce for DNN.
@@ -267,7 +267,7 @@
267267
</package>
268268

269269

270-
<package name="OpenStoreBO" type="Skin" version="4.2.1">
270+
<package name="OpenStoreBO" type="Skin" version="4.2.2">
271271
<friendlyName>OpenStoreBO</friendlyName>
272272
<description>
273273
OpenStore Admin Panel
@@ -313,7 +313,7 @@
313313

314314

315315

316-
<package name="OS_DisplaySearch" type="Module" version="4.2.1">
316+
<package name="OS_DisplaySearch" type="Module" version="4.2.2">
317317
<friendlyName>OS_DisplaySearch</friendlyName>
318318
<description>
319319
OpenStore open source e-commerce for DNN.
@@ -394,7 +394,7 @@
394394
</components>
395395
</package>
396396

397-
<package name="OS_AddressAdmin" type="Module" version="4.2.1">
397+
<package name="OS_AddressAdmin" type="Module" version="4.2.2">
398398
<friendlyName>OS_AddressAdmin</friendlyName>
399399
<description>OpenStore open source e-commerce for DNN.
400400
Admin for clients addresses from the front office.
@@ -469,7 +469,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
469469
</components>
470470
</package>
471471

472-
<package name="OS_Payment" type="Module" version="4.2.1">
472+
<package name="OS_Payment" type="Module" version="4.2.2">
473473
<friendlyName>OS_Payment</friendlyName>
474474
<description>OpenStore open source e-commerce for DNN.
475475
Process payment of orders.
@@ -543,7 +543,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
543543
</components>
544544
</package>
545545

546-
<package name="OS_OrderAdmin" type="Module" version="4.2.1">
546+
<package name="OS_OrderAdmin" type="Module" version="4.2.2">
547547

548548
<friendlyName>OS_OrderAdmin</friendlyName>
549549
<description>OpenStore open source e-commerce for DNN.
@@ -619,7 +619,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
619619
</components>
620620
</package>
621621

622-
<package name="OS_ProfileForm" type="Module" version="4.2.1">
622+
<package name="OS_ProfileForm" type="Module" version="4.2.2">
623623
<friendlyName>OS_ProfileForm</friendlyName>
624624
<description>OpenStore open source e-commerce for DNN.
625625
This module creates a profile form that links to the DNN profile and NBS address.
@@ -695,7 +695,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
695695
</package>
696696

697697

698-
<package name="OS_Checkout" type="Module" version="4.2.1">
698+
<package name="OS_Checkout" type="Module" version="4.2.2">
699699
<friendlyName>OS_Checkout</friendlyName>
700700
<description>OpenStore open source e-commerce for DNN. Checkout process.
701701
</description>
@@ -769,7 +769,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
769769
</components>
770770
</package>
771771

772-
<package name="OS_MiniCart" type="Module" version="4.2.1">
772+
<package name="OS_MiniCart" type="Module" version="4.2.2">
773773
<friendlyName>OS_MiniCart</friendlyName>
774774
<description>OpenStore open source e-commerce for DNN. Mini cart view.
775775
</description>
@@ -843,7 +843,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
843843
</components>
844844
</package>
845845

846-
<package name="OS_FullCart" type="Module" version="4.2.1">
846+
<package name="OS_FullCart" type="Module" version="4.2.2">
847847
<friendlyName>OS_FullCart</friendlyName>
848848
<description>OpenStore open source e-commerce for DNN. full cart view.
849849
</description>
@@ -917,7 +917,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
917917
</components>
918918
</package>
919919

920-
<package name="OS_CategoryMenu" type="Module" version="4.2.1">
920+
<package name="OS_CategoryMenu" type="Module" version="4.2.2">
921921
<friendlyName>OS_CategoryMenu</friendlyName>
922922
<description>
923923
CategoryMenu Display
@@ -989,7 +989,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
989989
</components>
990990
</package>
991991

992-
<package name="OS_ProductFilter" type="Module" version="4.2.1">
992+
<package name="OS_ProductFilter" type="Module" version="4.2.2">
993993
<friendlyName>OS_ProductFilter</friendlyName>
994994
<description>
995995
Filter module for Ajax Product Display
@@ -1062,7 +1062,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
10621062
</components>
10631063
</package>
10641064

1065-
<package name="OS_ItemList" type="Module" version="4.2.1">
1065+
<package name="OS_ItemList" type="Module" version="4.2.2">
10661066
<friendlyName>OS_ItemList</friendlyName>
10671067
<description>
10681068
Itemlist admin for shopping/favorites list

OpenStoreUpgrade.dnn

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<dotnetnuke type="Package" version="5.0">
22
<packages>
33

4-
<package name="OS_ProductView" type="Module" version="4.2.1">
4+
<package name="OS_ProductView" type="Module" version="4.2.2">
55
<friendlyName>OS_ProductView</friendlyName>
66
<description>
77
OpenStore open source e-commerce for DNN.
@@ -264,7 +264,7 @@
264264
</components>
265265
</package>
266266

267-
<package name="OS_DisplaySearch" type="Module" version="4.2.1">
267+
<package name="OS_DisplaySearch" type="Module" version="4.2.2">
268268
<friendlyName>OS_DisplaySearch</friendlyName>
269269
<description>
270270
OpenStore open source e-commerce for DNN.
@@ -345,7 +345,7 @@
345345
</components>
346346
</package>
347347

348-
<package name="OS_AddressAdmin" type="Module" version="4.2.1">
348+
<package name="OS_AddressAdmin" type="Module" version="4.2.2">
349349
<friendlyName>OS_AddressAdmin</friendlyName>
350350
<description>OpenStore open source e-commerce for DNN.
351351
Admin for clients addresses from the front office.
@@ -420,7 +420,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
420420
</components>
421421
</package>
422422

423-
<package name="OS_Payment" type="Module" version="4.2.1">
423+
<package name="OS_Payment" type="Module" version="4.2.2">
424424
<friendlyName>OS_Payment</friendlyName>
425425
<description>OpenStore open source e-commerce for DNN.
426426
Process payment of orders.
@@ -494,7 +494,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
494494
</components>
495495
</package>
496496

497-
<package name="OS_OrderAdmin" type="Module" version="4.2.1">
497+
<package name="OS_OrderAdmin" type="Module" version="4.2.2">
498498

499499
<friendlyName>OS_OrderAdmin</friendlyName>
500500
<description>OpenStore open source e-commerce for DNN.
@@ -570,7 +570,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
570570
</components>
571571
</package>
572572

573-
<package name="OS_ProfileForm" type="Module" version="4.2.1">
573+
<package name="OS_ProfileForm" type="Module" version="4.2.2">
574574
<friendlyName>OS_ProfileForm</friendlyName>
575575
<description>OpenStore open source e-commerce for DNN.
576576
This module creates a profile form that links to the DNN profile and NBS address.
@@ -646,7 +646,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
646646
</package>
647647

648648

649-
<package name="OS_Checkout" type="Module" version="4.2.1">
649+
<package name="OS_Checkout" type="Module" version="4.2.2">
650650
<friendlyName>OS_Checkout</friendlyName>
651651
<description>OpenStore open source e-commerce for DNN. Checkout process.
652652
</description>
@@ -720,7 +720,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
720720
</components>
721721
</package>
722722

723-
<package name="OS_MiniCart" type="Module" version="4.2.1">
723+
<package name="OS_MiniCart" type="Module" version="4.2.2">
724724
<friendlyName>OS_MiniCart</friendlyName>
725725
<description>OpenStore open source e-commerce for DNN. Mini cart view.
726726
</description>
@@ -794,7 +794,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
794794
</components>
795795
</package>
796796

797-
<package name="OS_FullCart" type="Module" version="4.2.1">
797+
<package name="OS_FullCart" type="Module" version="4.2.2">
798798
<friendlyName>OS_FullCart</friendlyName>
799799
<description>OpenStore open source e-commerce for DNN. full cart view.
800800
</description>
@@ -868,7 +868,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
868868
</components>
869869
</package>
870870

871-
<package name="OS_CategoryMenu" type="Module" version="4.2.1">
871+
<package name="OS_CategoryMenu" type="Module" version="4.2.2">
872872
<friendlyName>OS_CategoryMenu</friendlyName>
873873
<description>
874874
CategoryMenu Display
@@ -940,7 +940,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
940940
</components>
941941
</package>
942942

943-
<package name="OS_ProductFilter" type="Module" version="4.2.1">
943+
<package name="OS_ProductFilter" type="Module" version="4.2.2">
944944
<friendlyName>OS_ProductFilter</friendlyName>
945945
<description>
946946
Filter module for Ajax Product Display
@@ -1013,7 +1013,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
10131013
</components>
10141014
</package>
10151015

1016-
<package name="OS_ItemList" type="Module" version="4.2.1">
1016+
<package name="OS_ItemList" type="Module" version="4.2.2">
10171017
<friendlyName>OS_ItemList</friendlyName>
10181018
<description>
10191019
Itemlist admin for shopping/favorites list

Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("4.2.1.0")]
36-
[assembly: AssemblyFileVersion("4.2.1.0")]
35+
[assembly: AssemblyVersion("4.2.2.0")]
36+
[assembly: AssemblyFileVersion("4.2.2.0")]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# OpenSource v4.2.1.0
1+
# OpenSource v4.2.2.0
22
OpenStore - E-Commerce for DNN
33

44
**OpenStore is still maintained, it is now considered feature full. More functionality will only be added as bug fixes and plugins.**

0 commit comments

Comments
 (0)