2sic / 2sxc

DNN + 2sxc = #DNNCMS - This tool helps web designers and developers prepare great looking content in DNN (DotNetNuke). It's like mixing DNN with Umbraco and Drupal :)
http://2sxc.org
MIT License
145 stars 39 forks source link

Bug: Content-Type with the Same Name in 2 different Apps causes IntelliSense issues #3463

Closed jeremy-farrance closed 1 week ago

jeremy-farrance commented 1 week ago

I'm submitting a

[x] bug report

...about

[x] Razor templating [x] Content Types or data management

Current Behavior / Expected Behavior

If you are working in VS Code on razor views and have multiple Apps each with a Content Type with the same name, IntelliSense can either get confused or stop working. In some cases you get IntelliSense for the wrong App/Content-Type, in other cases the IntelliSense for other items stops working (e.g. IAppTyped no longer shows IntelliSense for App.[anything].

I am not sure if there is a proper fix for this, but maybe 2sxc could provide a warning when naming a Content-Type that this is a duplicate across apps?

In practice, this issue caused a significant amount of wasted time and figuring out what was wrong since it is not obvious.

Your environment

iJungleboy commented 1 week ago

The idea that 2sxc would compare ContentType names across Apps doesn't fit the way 2sxc is meant to work.

It's also common to have the exact same content-type. For example, if the blog app is installed in 2 portals then all the content types will be "duplicates".

I assume you have a special way of working, where you have multiple apps open at the same time?

In this case I assume a lot of things will go wrong anyhow with IntelliSense, since the .sln file can't really handle this scenario.

How exactly are you working?

jeremy-farrance commented 1 week ago

In small DNN projects we work OHS with a single project that handles the theme, apps (2sxc), and other (usually DNN) file-based changes and customizations in the project. So most of these projects have the Content App and one to three other 2sxc apps open in a single workspace.

And yes, we have noticed other issues. The AppCode/Razor in particular, as soon as you Copilot-Generate for a 2nd App, you now lose IntelliSense for App.[anything].

I guess if we want to continue working this ad-hoc (very convenient OHS) way, I'll need experiment with having multiple projects (.csproj files) and see if that works (in VS Code). Thanks for discussing and asking good Qs, I appreciate it!