Close

Looking for Specific approach to install and use DEMO data

webzest
3 years ago
#21429 Quote
Avatar
  • 6
Hi,

I was able to install a clean theme into nopCommerce 4.3.  Then, I downloaded the DEMO DATA and successfully created the two database versions on my SQL Server.  However, when I point to the Minimal1.4.3 Database, I am getting an Error:

An unhandled exception occurred while processing the request.
SqlException: Invalid column name 'PreLoadFirstSlide'.

Is there a specific guide to properly install the Demo Data for local verification and support?
That would be helpful to learn how to build the Theme from samples instead of trying to run through it and break things for lack of experience with the object.

I tried to follow step 5 and added the installedPlugins.json, but it failed with this error:


[code]
An error occurred while starting the application.
JsonSerializationException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Nop.Services.Plugins.PluginsInfo' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path '', line 1, position 1.
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureArrayContract(JsonReader reader, Type objectType, JsonContract contract)

JsonSerializationException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Nop.Services.Plugins.PluginsInfo' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly. To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array. Path '', line 1, position 1.
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureArrayContract(JsonReader reader, Type objectType, JsonContract contract)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, object existingValue, string id)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, bool checkAdditionalContent)
Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
Newtonsoft.Json.JsonConvert.DeserializeObject(string value, Type type, JsonSerializerSettings settings)
Newtonsoft.Json.JsonConvert.DeserializeObject<T>(string value, JsonSerializerSettings settings)
Newtonsoft.Json.JsonConvert.DeserializeObject<T>(string value)
Nop.Services.Plugins.PluginsInfo.DeserializePluginInfo(string json) in PluginsInfo.cs
+
            var pluginsInfo = JsonConvert.DeserializeObject<PluginsInfo>(json);
Nop.Services.Plugins.PluginsInfo.LoadPluginInfo() in PluginsInfo.cs
+
            return !string.IsNullOrEmpty(text) && DeserializePluginInfo(text);
Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.LoadPluginsInfo(NopConfig config) in ApplicationPartManagerExtensions.cs
+
            if (PluginsInfo.LoadPluginInfo() || useRedisToStorePluginsInfo || !config.RedisEnabled)
Nop.Web.Framework.Infrastructure.Extensions.ApplicationPartManagerExtensions.InitializePlugins(ApplicationPartManager applicationPartManager
Boyko
3 years ago
#21430 Quote
Avatar
  • 1570
webzest wrote:
Hi,

I was able to install a clean theme into nopCommerce 4.3.  Then, I downloaded the DEMO DATA and successfully created the two database versions on my SQL Server.  However, when I point to the Minimal1.4.3 Database, I am getting an Error:

An unhandled exception occurred while processing the request.
SqlException: Invalid column name 'PreLoadFirstSlide'.


Hi webzest,

We have a detailed guide on how to restore a demo database.

Please pay attention to point 5, which is to use the plugins.json from the demo database package. This is due to the fact that nopCommerce 4.30 uses Migrations and the migrations are run only if the versions of the plugins are older than the current version of the plugins.
So simply use the plugin.json that comes with the theme database and all will be fine.
Regards,
Nop-Templates.com Team