umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
Other
4.49k stars 2.69k forks source link

NetCore: Umbraco Install failing with error: 'language' start tag on line 2 position 2 does not match the end tag of 'area' #10201

Closed jonat123 closed 3 years ago

jonat123 commented 3 years ago

A brief description of the issue goes here. Installing the Umbraco 9 beta fails in the installation wizard due to a duplicate tag in the da.xml file

Umbraco version

I am seeing this issue on the Umbraco version: Umbraco 9 Beta

Reproduction

If you're filing a bug, please describe how to reproduce it. Include as much relevant information as possible, such as:

Bug summary

When trying to install the Umbraco 9 beta by following this guide:

And this:

After setting up the DB in the Umbraco Installation and finishing the installation the installation fails with the following error:
The 'language' start tag on line 2 position 2 does not match the end tag of 'area'. Line 1899, position 5.

Specifics

From what I can gather the issue is with the da.xml file in the language folder, on line 1899 there are two closing tags for Area: image

Which is causing the installation to fail.

removing the duplicate tag in the XML file and trying to run the project again, makes the tag come back again which causes the installation to fail over again

In the log there is a more detailed error message as well:

.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.Xml.XmlException: The 'language' start tag on line 2 position 2 does not match the end tag of 'area'. Line 1899, position 5.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
   at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
   at System.Xml.XmlTextReaderImpl.ParseEndElement()
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
   at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
   at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
   at System.Xml.Linq.XDocument.Load(Stream stream, LoadOptions options)
   at System.Xml.Linq.XDocument.Load(Stream stream)
   at Umbraco.Cms.Core.Services.Implement.LocalizedTextServiceFileSources.<>c__DisplayClass6_0.<.ctor>b__2()
   at Umbraco.Extensions.AppCacheExtensions.<>c__DisplayClass0_0`1.<GetCacheItem>b__0()
   at Umbraco.Cms.Core.Cache.SafeLazy.<>c__DisplayClass1_0.<GetSafeLazy>b__0()
--- End of stack trace from previous location ---
   at Umbraco.Cms.Core.Cache.ObjectCacheAppCache.Get(String key, Func`1 factory, Nullable`1 timeout, Boolean isSliding, String[] dependentFiles)
   at Umbraco.Cms.Core.Cache.DeepCloneAppCache.Get(String key, Func`1 factory, Nullable`1 timeout, Boolean isSliding, String[] dependentFiles)
   at Umbraco.Extensions.AppCacheExtensions.GetCacheItem[T](IAppPolicyCache provider, String cacheKey, Func`1 getCacheItem, Nullable`1 timeout, Boolean isSliding, String[] dependentFiles)
   at Umbraco.Cms.Core.Services.Implement.LocalizedTextServiceFileSources.<>c__DisplayClass6_0.<.ctor>b__1()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at Umbraco.Cms.Core.Services.Implement.LocalizedTextService.FindTranslation(IDictionary`2 xmlSource, CultureInfo culture, String area, String key)
   at Umbraco.Cms.Core.Services.Implement.LocalizedTextService.GetFromXmlSource(IDictionary`2 xmlSource, CultureInfo culture, String area, String key, IDictionary`2 tokens)
   at Umbraco.Cms.Core.Services.Implement.LocalizedTextService.Localize(String key, CultureInfo culture, IDictionary`2 tokens)
   at Umbraco.Extensions.LocalizedTextServiceExtensions.Localize[T](ILocalizedTextService manager, String area, T key)
   at Umbraco.Cms.Core.Install.InstallSteps.FilePermissionsStep.<ExecuteAsync>b__3_0(KeyValuePair`2 x)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
   at Umbraco.Cms.Core.Install.InstallSteps.FilePermissionsStep.ExecuteAsync(Object model)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Umbraco.Cms.Web.Common.Install.InstallApiController.ExecuteStepAsync(InstallSetupStep step, Object instruction)
   at Umbraco.Cms.Web.Common.Install.InstallApiController.PostPerformInstall(InstallInstructions installModel)

Steps to reproduce

  1. try and install the beta using the following guide: https://our.umbraco.com/documentation/UmbracoNetCoreUpdates#steps-to-install-the-umbraco-dotnet-new-template

  2. follow the Umbraco installation wizard

  3. finish the installation after setting up the database

Expected result

Expected the installation to finish and get into the Umbraco backoffice

Actual result

Installation fails with the following error: image

bergmania commented 3 years ago

Thanks for reporting, sounds like you need to change the browser/OS to danish. Works fine on English

bergmania commented 3 years ago

I fixed the duplicate end tag here: https://github.com/umbraco/Umbraco-CMS/commit/743f4a6610b4d2984fa2055641f81da3956a6e3b

bergmania commented 3 years ago

Workaround

Change the file in your nuget cache: The file is located here: %userfolder%.nuget\packages\umbraco.cms.staticassets\9.0.0-beta001\content\umbraco\config\lang\da.xml

Then clean your solution and build again, then the new file from the cache should appear in your project