Skip to content

Commit c7836dc

Browse files
committed
Fixed installation errors
1 parent 4732475 commit c7836dc

5 files changed

Lines changed: 17 additions & 6 deletions

File tree

src/Libraries/SmartStore.Core/Domain/Media/Download.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ namespace SmartStore.Core.Domain.Media
1010
[DataContract]
1111
public partial class Download : BaseEntity, ITransient
1212
{
13-
/// <summary>
13+
public Download()
14+
{
15+
this.UpdatedOnUtc = DateTime.UtcNow;
16+
}
17+
18+
/// <summary>
1419
/// Gets or sets a GUID
1520
/// </summary>
1621
[DataMember]

src/Libraries/SmartStore.Core/Domain/Media/Picture.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ namespace SmartStore.Core.Domain.Media
1212
[DataContract]
1313
public partial class Picture : BaseEntity, ITransient
1414
{
15-
private ICollection<ProductPicture> _productPictures;
15+
public Picture()
16+
{
17+
this.UpdatedOnUtc = DateTime.UtcNow;
18+
}
19+
20+
private ICollection<ProductPicture> _productPictures;
1621
/// <summary>
1722
/// Gets or sets the picture binary
1823
/// </summary>

src/Libraries/SmartStore.Data/Setup/SeedData/InvariantSeedData.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void Initialize(SmartObjectContext context)
5656

5757
public IList<Picture> Pictures()
5858
{
59-
var entities = new List<Picture>()
59+
var entities = new List<Picture>
6060
{
6161
CreatePicture(File.ReadAllBytes(_sampleImagesPath + "company_logo.png"), "image/png", GetSeName("company-logo")),
6262
CreatePicture(File.ReadAllBytes(_sampleImagesPath + "clouds.png"), "image/png", GetSeName("slider-bg")),
@@ -7914,7 +7914,7 @@ public IList<Product> Products()
79147914

79157915
#region Antonio Vivaldi: then spring
79167916

7917-
var productInstantDownloadVivaldi = new Product()
7917+
var productInstantDownloadVivaldi = new Product
79187918
{
79197919
ProductType = ProductType.SimpleProduct,
79207920
VisibleIndividually = true,
@@ -7938,7 +7938,7 @@ public IList<Product> Products()
79387938
AllowBackInStockSubscriptions = false,
79397939
IsDownload = true,
79407940
HasSampleDownload = true,
7941-
SampleDownload = new Download()
7941+
SampleDownload = new Download
79427942
{
79437943
DownloadGuid = Guid.NewGuid(),
79447944
ContentType = "audio/mp3",

src/Presentation/SmartStore.Web/Controllers/InstallController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ protected virtual InstallationResult InstallCore(ILifetimeScope scope, InstallMo
545545
var pluginsCount = plugins.Count;
546546
var idx = 0;
547547

548-
using (var dbScope = new DbContextScope(autoDetectChanges: false)) {
548+
using (var dbScope = new DbContextScope(autoDetectChanges: false, hooksEnabled: false)) {
549549
foreach (var plugin in plugins)
550550
{
551551
try

src/Presentation/SmartStore.Web/Infrastructure/Installation/InstallDataSeeder.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ public virtual void Seed(SmartObjectContext context)
539539

540540
_ctx.Configuration.AutoDetectChangesEnabled = false;
541541
_ctx.Configuration.ValidateOnSaveEnabled = false;
542+
_ctx.HooksEnabled = false;
542543

543544
_config.ProgressMessageCallback("Progress.CreatingRequiredData");
544545

0 commit comments

Comments
 (0)