Developer forum

Forum » Dynamicweb 10 » Item types missing when running site from VS

Item types missing when running site from VS

Rene Poulsen
Rene Poulsen
Reply

Hi,

I'm working on a site for a customer where we've setup a dev site on our server. It works just fine.

When developing new feature for the site I've been running the site locally through Visual Studio. I connect to the database on the server. It has been working just fine.
The files in my local setup is the same as on the server (it's in a GitHub repo - and we publish from there to the server).

Today, after changing the Dynamicweb Suite to use Release Ring 3 (don't know if its related), my items suddenly disappeared inside DW. I can't see any items - and none of the pages using the items are working. The items are present in the database - and XML files in System > Items. The issue is only there when I run locally. On the server and on our dev domain everything runs just fine.

I've tried removing the items folder (from system) completely, running the site, stopping the site and then adding the items folder againg - running the site again. This doesn't help.

I've also tried "refreshing" items locally- doesn't help either.

I've tried creating a new item locally. The table in the database is created, but nothing to see in DW locally. And when creating the item I get this error:

System.NullReferenceException: Object reference not set to an instance of an object.
   at Dynamicweb.Content.UI.Queries.Settings.ItemTypes.ItemFieldsByItemTypeSystemNameQuery.GetListItems()
   at Dynamicweb.CoreUI.Data.DataQueryListBase`3.GetModel()
   at Dynamicweb.CoreUI.Screens.ScreenBuilders.ListScreenBuilder`3.GetScreenModel(DataQueryModelBase`1 query)
   at Dynamicweb.CoreUI.Screens.ScreenBuilders.ListScreenBuilder`3.Make()
   at Dynamicweb.CoreUI.Screens.ScreenBuilder.MakeScreen(BuildRequest request)
   at Dynamicweb.Management.UI.Controllers.AdminController.GetScreenFromDefinition(String screenDefinition, String shadowEditId)
   at Dynamicweb.Management.UI.Controllers.AdminController.GetLayoutDefinition(String screenDefinition, String shadowEditId)
   at Dynamicweb.Management.UI.Controllers.AdminController.GetScreen(String layout, String navigationPath, String shadowEditId)
   at Dynamicweb.Management.UI.Controllers.AdminController.GetUI()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Dynamicweb.Management.UI.Middleware.AdminUIRedirectMiddleware.Invoke(HttpContext context)
   at Dynamicweb.Management.UI.Middleware.AdminDiagnosticsMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandler

 

What else can I do to get my items back locally? I'm out of ideas :-)


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Rene

If you cannot see the item types in Settings -> Content -> Item types, it indicates that you are not running in the right file context locally.

When you run the site locally using dotnet run, you can see the file location in the console output - check that it is correct and that you have your item type XML files under that running files path.

Votes for this answer: 1
 
Rene Poulsen
Rene Poulsen
Reply

Of course. We had some issues with appsettings and globalsettings files. Thank you.

 

You must be logged in to post in the forum