Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing "/" for orgPath element when Including file at root of project #13

Open
AnthonyCogworks opened this issue Jul 3, 2017 · 0 comments

Comments

@AnthonyCogworks
Copy link

AnthonyCogworks commented Jul 3, 2017

How to reproduce.

  1. Include a file at the root of the project.
  2. Run the grunt umbraco packaging
  3. Try to install the package manually - Umbraco throw a 500. It occurs for all umbraco v7+.

Reason: orgPath is empty for files at the root:

`

	<file>
		<guid>myfile.html</guid>

		<orgPath></orgPath>

		<orgName>myfile.html</orgName>

	</file>

`

Fix: Files added at the root need a slash:

`

	<file>

		<guid>myfile.html</guid>

		<orgPath>/</orgPath>

		<orgName>myfile.html</orgName>

	</file>

`

The specific error is this:
2017-07-03 10:54:42,824 [P6248/D2/T34] ERROR umbraco.cms.businesslogic.packager.Installer - Error importing file E:\Temp\UmbracoCms.7.6.3\App_Data\97508966-55a6-4fbd-ba69-35d4df4ef3dd.umb
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at umbraco.cms.businesslogic.packager.Installer.GetFileName(String path, String fileName)
at umbraco.cms.businesslogic.packager.Installer.LoadConfig(String tempDir)
at umbraco.cms.businesslogic.packager.Installer.Import(String inputFile, Boolean deleteFile)
2017-07-03 10:54:42,824 [P6248/D2/T34] ERROR Umbraco.Web.WebApi.Filters.FileUploadCleanupFilterAttribute - Could not acquire actionExecutedContext.Response.Content
System.NullReferenceException: Object reference not set to an instance of an object.
at Umbraco.Web.WebApi.Filters.FileUploadCleanupFilterAttribute.OnActionExecuted(HttpActionExecutedContext actionExecutedContext)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant