Giter Club home page Giter Club logo

helixbase's Issues

Include VS templates for modules

Anders Laub's VsTemplates VS extension supports project-local templates by placing a .helixtemplates in the same folder as the solution file. It can then specify a relative folder (eg. HelixTemplates) that contain the Visual Studio templates and they'll automatically appear if you create a new project using the "Helix Project" template.

What do you think about including some templates for foundation/feature/project? It would be entirely optional by the user; the folder would be ignored if they don't have/use the Helix.VsTemplates extension.

Beyond the templates + manifests, here's what we'd need in the .helixtemplates file:

templates.modules.folder=HelixTemplates
templates.modules.skipcreatedialog=true

Razor pre-compile, file not found

Hi.

I have downloaded the latest Helixbase framework for v10.3 and am trying to configure the framework to use legacy ASP.NET MVC. I am using Visual Studio 2022. When compiling the solution, a CS1504 error is thrown for every cshtml file in the solution, Could not find file. It seems like the razor engine pre-compilation computes the path to the view incorrectly. Is there a work around for this?

Thanks

Tom

The Hero component always saves Images to data source /Hero 1 when using Experience Editor

I noticed when using the custom Experience button to select Hero images, this are always saved to data source location /sitecore/content/Helixbase/Global/Hero Items/Hero 1 even when the component is pointed to data source location /sitecore/content/Helixbase/Global/Hero Items/Hero 2 for example.

To recreate, in Experience Editor:

  • change the data source location to /sitecore/content/Helixbase/Global/Hero Items/Hero 2

  • save your changes

  • click on 'Select Hero Images' custom experience editor

  • on the Hero Image dialog, update the selected list (add or remove).

  • save your changes

You will notice these changes were actually made to /sitecore/content/Helixbase/Global/Hero Items/Hero 1 instead of Hero 2

Remove Rules feature

The Rules feature is legacy and these have been refactored into the VersionTrim Feature.

This module needs to be removed

Proper order of operations for adding a project?

Helix Examples and this repository both share in the same conceptual IDE setup, so with that in mind I'm posing my question here as it pertains to both. How are developers expected to add new projects to a Visual Studio setup like this?

The requirements based on the existing projects and the Directory.Build.Props file indicate that we are to create projects whose .csproj file lives directly under folders called "website", under folders within their related Helix pillar, (arbitrarily) titled in the format {Pillar.ProjectName},

My common intuition tells me to do the following after observing the existing structure:

  1. Create a physical folder directly under Feature: "MyProject",
  2. Add a "MyProject" solution folder to mimic the same structure within Visual Studio.
  3. Right click on this solution folder, add new project, and set the Location to the MyProject physical folder created in step 1

At this point I've hit my first problem; whatever I name the project, will become the name of the folder. There is no Visual Studio 2019 option I am aware of that lets you specify that you wish to ether create a project (AKA place the csproj) directly into an existing folder, or name the created folder something other than the project.

If I decided I would just name the project "website", so that the folder is made, then rename it post-creation, I run into a second problem: Visual Studio believes a project named "website" already exists. The details of why this is happening is not something I have research, but this seems to be a prevalent "issue" in Visual Studio that has persisted for several years but has never accrued enough interest to warrant a fix.

Ultimately, the only solution we've found to actually work is to copy an existing project and manually adjust several folders and csproj values, which feels counter-intuitive to any developer we would like to be able to "plug and dev".

Please let me know what the expected order of operations here are for performing this common dev task, as the Helix conventions indirectly encourage lots of projects by way of highly module design, but the overhead for any developer to figure out how to create a project (and ensure that they created it properly) currently seems egregious.

Build Failed

Hi

I have taken latest build and tried in my local environment. Helixbase.Website project seems failing.

17>Using "CollectFilesinFolder" task from assembly "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.Tasks.dll".
17>Task "CollectFilesinFolder"
17>Done executing task "CollectFilesinFolder" -- FAILED.
17>Done building target "CollectAdditionalFilesToRemoveFromTarget" in project "Helixbase.Website.csproj" -- FAILED.
17>
17>Build FAILED.
17> 0 Warning(s)
17> 0 Error(s)
17>
17>Time Elapsed 00:00:05.63
========== Rebuild All: 16 succeeded, 1 failed, 0 skipped ==========

I have attached build output for reference.
Build error.txt

Include view precompilation

Precompiling razor views can improve startup performance and using RazorGenerator.MsBuild it has a negligible impact on build performance. What are your thoughts on including it OOTB?

This should also be added to the templates added via #25

AllTemplatesIndexField is not computed

In the foundation module "Search" the index field "alltemplates" is not created. The class "AllTemplatesIndexField" must inherit from "Sitecore.ContentSearch.ComputedFields.AbstractComputedIndexField".

Context is null error

I'm trying to implement same in Sitecore 10 with glass mapper pre-release

I get the below error on setting sitecore service in ORM project
public void Configure(IServiceCollection serviceCollection)
{
serviceCollection.AddTransient(provider => new SitecoreService(Sitecore.Context.Database));
serviceCollection.AddScoped<IRequestContext, RequestContext>();
serviceCollection.AddScoped<IMvcContext, MvcContext>();
serviceCollection.AddScoped<IGlassHtml, GlassHtml>();
}

Error:
[NullReferenceException: Context is null]
Glass.Mapper.AbstractService..ctor(Context glassContext) +425
Glass.Mapper.Sc.SitecoreService..ctor(Database database, Context context) +23

obj\[Configuration]\NuGet\[Guid] folder included in output

Posting this for review/discussion or to help others.

There is a little/strange issue when GlassMapper and Helix Publish Profile are used in conjunction. Each project that references GlassMapper has a obj folder with the .cs and .config files from GlassMapper in a format similar to obj\[Configuration]\Nuget\[Guid]. Unfortunately this folder is copied to the publish target by HPP and it really shouldn't be there. To work around this I've updated my NuGet references as shown below:

<PackageReference Update="Glass.Mapper.Sc.100" Version="5.8.173">
    <IncludeAssets>compile</IncludeAssets>
</PackageReference>

Reference for NuGet: https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files

Unicorn not running with Sitecore 9.1

Following the install steps and on step 5 - navigating to, after logging in as admin:
http://demo.helixbase.sc/unicorn.aspx gives me

image

I posted on stackexchange
https://sitecore.stackexchange.com/questions/16098/setting-up-helixbase-with-sitecore-9-1-and-unsure-how-to-run-unicorn/16103#16103

But following the recommendation of upgrading unicorn and rainbow in the Helixbase.Feature.Fun and Helixbase.Foundation.Serialization project files, and adding a Unicorn.Ui.IdentityServer.config file did not solve my problem.

Please note that the installer for 9.1 adds a .sc suffix for the website - so I had to update the gulp config to have the site being published successfully. After restarting IIS, if I have the Unicorn.Ui.IdentityServer.config disabled then I get an error saying I need to log in as an administrator.

If I have that config enabled I get:

image

For reference my config has:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:security="http://www.sitecore.net/xmlconfig/security/">
	<sitecore role:require="Standalone or ContentManagement" security:require="Sitecore">
		<pipelines>
			<!--
				The Unicorn control panel path must be added to the list of site neutral paths for the Unicorn control panel to work with authentication in 9.1.
				This must match the activationUrl defined in the UnicornControlPanelPipelineProcessor defined in Unicorn.UI.config.
			-->
			<owin.cookieAuthentication.validateIdentity>
				<processor type="Sitecore.Owin.Authentication.Pipelines.CookieAuthentication.ValidateIdentity.ValidateSiteNeutralPaths, Sitecore.Owin.Authentication">
					<siteNeutralPaths hint="list">
						<path hint="unicorn">/unicorn.aspx</path>
					</siteNeutralPaths>
				</processor>
			</owin.cookieAuthentication.validateIdentity>
		</pipelines>
	</sitecore>
</configuration>

Build generates binding redirect warnings

I have time to look into this right now, but I thought I'd log it so I can look at it later as I don't think we should be shipping a template with build warnings.

The issue appears to be related to this:

Warning messages:

NETSDK1041: Encountered conflict between 'Reference:System.Diagnostics.Tracing' and 'Platform:System.Diagnostics.Tracing.dll'. NETSDK1033: Choosing 'Reference:System.Diagnostics.Tracing' because AssemblyVersion '4.2.0.0' is greater than '4.1.2.0'. [D:\a\1\s\src\Foundation\Serialization\code\Helixbase.Foundation.Serialization.csproj]
NETSDK1041: Encountered conflict between 'Reference:System.IO.Compression' and 'Platform:System.IO.Compression.dll'. NETSDK1033: Choosing 'Reference:System.IO.Compression' because AssemblyVersion '4.2.0.0' is greater than '4.0.0.0'. [D:\a\1\s\src\Foundation\Serialization\code\Helixbase.Foundation.Serialization.csproj]
NETSDK1041: Encountered conflict between 'Reference:System.Net.Http' and 'Platform:System.Net.Http.dll'. NETSDK1033: Choosing 'Reference:System.Net.Http' because AssemblyVersion '4.2.0.0' is greater than '4.0.0.0'. [D:\a\1\s\src\Foundation\Serialization\code\Helixbase.Foundation.Serialization.csproj]

And

Consider app.config remapping of assembly "System.Web.Mvc, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "5.2.3.0" [] to Version "5.2.4.0" [C:\Users\VssAdministrator.nuget\packages\microsoft.aspnet.mvc\5.2.4\lib\net45\System.Web.Mvc.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "Newtonsoft.Json, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" from Version "9.0.0.0" [] to Version "11.0.0.0" [C:\Users\VssAdministrator.nuget\packages\newtonsoft.json\11.0.2\lib\net45\Newtonsoft.Json.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System.Data.Common, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.2.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\Facades\System.Data.Common.dll] to Version "4.2.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net471\lib\System.Data.Common.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System.Diagnostics.StackTrace, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.4.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\Facades\System.Diagnostics.StackTrace.dll] to Version "4.1.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net471\lib\System.Diagnostics.StackTrace.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System.Diagnostics.Tracing, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.2.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\System.Diagnostics.Tracing.dll] to Version "4.2.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net471\lib\System.Diagnostics.Tracing.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System.Globalization.Extensions, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.3.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\Facades\System.Globalization.Extensions.dll] to Version "4.1.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net471\lib\System.Globalization.Extensions.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System.IO.Compression, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\System.IO.Compression.dll] to Version "4.2.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net471\lib\System.IO.Compression.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System.Net.Http, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\System.Net.Http.dll] to Version "4.2.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net471\lib\System.Net.Http.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System.Net.Sockets, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.2.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\Facades\System.Net.Sockets.dll] to Version "4.2.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net471\lib\System.Net.Sockets.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System.Runtime.Serialization.Primitives, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.3.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\Facades\System.Runtime.Serialization.Primitives.dll] to Version "4.2.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net471\lib\System.Runtime.Serialization.Primitives.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System.Security.Cryptography.Algorithms, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.2.2.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\Facades\System.Security.Cryptography.Algorithms.dll] to Version "4.3.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net471\lib\System.Security.Cryptography.Algorithms.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System.Security.SecureString, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.2.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\Facades\System.Security.SecureString.dll] to Version "4.1.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net471\lib\System.Security.SecureString.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System.Threading.Overlapped, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.3.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\Facades\System.Threading.Overlapped.dll] to Version "4.1.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net471\lib\System.Threading.Overlapped.dll] to solve conflict and get rid of warning.
Consider app.config remapping of assembly "System.Xml.XPath.XDocument, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.3.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.1\Facades\System.Xml.XPath.XDocument.dll] to Version "4.1.0.0" [C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net471\lib\System.Xml.XPath.XDocument.dll] to solve conflict and get rid of warning.
Warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file:

assets unpublished

Since the latest update to 10.3 which has also introduced central package management, configs and views are not being published by HPP

GlassMapper crashing in page editor mode

I get this error in page editor:

"Attempt by method 'Glass.Mapper.Sc.Configuration.SitecoreTypeConfiguration.ResolveItem(System.Object, Sitecore.Data.Database)' to access method 'Sitecore.Data.Version..ctor(Int32)' failed.
at Glass.Mapper.Sc.Configuration.SitecoreTypeConfiguration.ResolveItem(Object target, Database database) in c:\TeamCity\buildAgent\work\8567e2ba106d3992\Source\Glass.Mapper.Sc\Configuration\SitecoreTypeConfiguration.cs:line 224
at Glass.Mapper.Sc.GlassHtml.MakeEditable[T](Expression1 field, Expression1 standardOutput, T model, Object parameters, Context context, Database database, TextWriter writer) in c:\TeamCity\buildAgent\work\8567e2ba106d3992\Source\Glass.Mapper.Sc\GlassHtml.cs:line 603"

for the HeroTitle when rendering the view on home.

I suppose it's not quite Sitecore 9 ready since GlassMapper doesn't yet support Sitecore 9.0 version.

Thanks,
Adrian.

Can't find Glass.Mapper.Sc.90.Extensions over nuget, Build failed.

Hi - With recent update to the Solution Glass.Mapper.Sc.90.Extenstions in Foundation.ORM is being added and this is not available on nuget, tried searching all over internet but couldn't find the package.

Can you please fix this issue, also explain what is the use for this extension?

Intellisense in Razor views

Since updating to the SDK project format helpers such as Html.Sitecore() will throw an error:

IHtmlHelper does not contain a definition for Sitecore

Issue when running Gulp Tasks

Hi.

So I keep running into an issue whenever I use the gulp task command which is rather frustrating and I not sure what I'm doing wrong.
1
2

The red text in the first picture is repeated several times, but for different files, before I get what you see in the second picture.
Any ideas? Thanks!

Integrate HPP

As per our conversation, we plan to integrate HPP into Helixbase. This issue will track the status of the merge.

Add the "right" serialization.configs for production

Hi,

I've git some understanding problems. When I take your example project I cann install it locally works fine. But as far as I understand you must include the hole content and media tree inside unicorn so that everyone can see the demodata you provided. But thats not working in production environment, because you should not use unicorn to sync your content so far I know.

so the config for Helixbase.Serialization should look like a bit different at minimum for those two node:

  <include name="$(layer).$(module).Content" database="master" path="/sitecore/content/Helixbase"/>
  <include name="$(layer).$(module).Media" database="master" path="/sitecore/media library/$(layer)/$(module)"/>

could you provide a demo example config in your solution which shows how the config should look like in a "real" world solution where you are not syncing the content with unicorn?

Adding a new view creates AspNetCore errors

I downloaded the latest code to compare this to my version, which I've marked up similarly. When I right-click in the Hero feature on the Views/Hero folder and add a new Razor view, I get like 15 errors in Visual Studio, most of which are "The type or namespace name 'AspNetCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)" and one "'_Views_Hero_Page2.ExecuteAsync()': no suitable method found to override". Sometimes "Feature 'nullable reference types' is not available in C# 7.3. Please use language version 8.0 or greater." shows as well. Also oddly, if I create a controller and then use intellisense to generate the view, it's putting the view in the test project, not the main project.

The code still builds, maybe because the suppression state in the error list is shown as Active for those, but I can just see a solution littered with similar errors. I'm guessing this is all due to the project type of Microsoft.NET.Sdk.web really being a .NET Core type, I'm not sure. Is this a matter of you can't use the built-in view/controller entries to help, because it puts these little things in the background? I know in Anders Laub's version, he's using Microsoft.NET.Sdk for the project type, which doesn't give you the popups for controllers/views so you have to wire everything manually. I'm using the latest VS 2019 to do all this.

Any thoughts on keeping the errors out of the error list? Otherwise any junior devs I hand a starting solution to will freak out!

Move to the new project type

Hey πŸ˜„
Would be very nice if you upgraded to the ”new” project type.
Or created a seperated branch for it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.