A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/umbraco/Umbraco.Deploy.Issues/issues/63 below:

Unable to cast object of type 'Umbraco.Core.Models.Template' to type 'Umbraco.Core.Models.TemplateOnDisk' · Issue #63 · umbraco/Umbraco.Deploy.Issues · GitHub

Original issue raised at: https://github.com/umbraco/Umbraco.Cloud.Issues/issues/89

@Zweben:

This is a recreation of an old issue here, which I just ran into on Umbraco 8.0.2 and Deploy 3.0.1.

This bug can still be reproduced in version Umbraco 8.14.0 / Deploy 4.1.2

Bug summary

Changing the capitalization of an existing Umbraco template's alias (and therefore its corresponding .cshtml file) and pushing this to Cloud causes extraction on the Cloud project to fail with the following error:

{ "Date": "2019-06-13T16:10:33.804389+00:00", "Message": "Unable to cast object of type 'Umbraco.Core.Models.Template' to type 'Umbraco.Core.Models.TemplateOnDisk'.", "Ex": { "ClassName": "System.InvalidCastException", "Message": "Unable to cast object of type 'Umbraco.Core.Models.Template' to type 'Umbraco.Core.Models.TemplateOnDisk'.", "Data": null, "InnerException": null, "HelpURL": null, "StackTraceString": " at Umbraco.Deploy.Connectors.ServiceConnectors.TemplateConnector.Pass1(ArtifactDeployState``2 dart)\r\n at Umbraco.Deploy.Connectors.ServiceConnectors.TemplateConnector.Process(ArtifactDeployState``2 state, IDeployContext context, Int32 pass)\r\n at Umbraco.Deploy.Connectors.ServiceConnectors.ServiceConnectorBase``3.Process(ArtifactDeployState dart, IDeployContext context, Int32 pass)\r\n at Umbraco.Deploy.Environments.CurrentEnvironment.ProcessArtifacts(IEnumerable``1 arts, IDeployContext context, CancellationToken token)", "RemoteStackTraceString": null, "RemoteStackIndex": 0, "ExceptionMethod": "8\nPass1\nUmbraco.Deploy, Version=3.0.1.0, Culture=neutral, PublicKeyToken=null\nUmbraco.Deploy.Connectors.ServiceConnectors.TemplateConnector\nVoid Pass1(Umbraco.Core.Deploy.ArtifactDeployState``2[Umbraco.Deploy.Artifacts.TemplateArtifact,Umbraco.Core.Models.ITemplate])", "HResult": -2147467262, "Source": "Umbraco.Deploy", "WatsonBuckets": null }, "Sender": "Umbraco.Deploy.Work.WorkItems.DiskReadWorkItem" }

Steps to reproduce
  1. Create a template with a name following the format "ALLCAPS Capitalized".
  2. Change the template's property alias from "aLLCAPSCapitalized" to "allcapsCapitalized".
  3. Commit the change and push to Umbraco Cloud
Expected result

Extraction succeeds, with the template file and alias renamed accordingly.

Actual result

Extraction error.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4