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

Error when trying to publish node with language variant whose URL cannot be generated #6

Open
davidzweben opened this issue Oct 14, 2024 · 1 comment

Comments

@davidzweben
Copy link

davidzweben commented Oct 14, 2024

When a node has a language variant whose URL cannot be determined by Umbraco, attempting to publish any variant of this node results in the error message listed below.

This happens when a language variant exists for which there is no corresponding "Culture and Hostnames" configuration on an ancestor node or self, and/or when a node has unpublished ancestors for any of its language variants. In these scenarios, the node shows a message under Info > Links, either "This document is published but is not in the cache" or "This culture is published but is not visible because it is unpublished on parent [parent name]". It appears that publishing still succeeds for the variants whose URL could be determined.

It makes sense that the cache cannot be cleared for these un-publishable variants, however the error should not occur when publishing an unaffected language variant on an affected node, and a more descriptive error message would help.

Received an error from the server
An error occurred

One or more errors occurred. (One or more errors occurred. (Invalid URI: The hostname could not be parsed.))
Exception Details
System.AggregateException, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e: One or more errors occurred. (One or more errors occurred. (Invalid URI: The hostname could not be parsed.)) 
Stacktrace

at Umbraco.Cms.Infrastructure.Scoping.Scope.TryFinally(Action[] actions)

   at Umbraco.Cms.Infrastructure.Scoping.Scope.Dispose()

   at Umbraco.Cms.Core.Services.ContentService.SaveAndPublish(IContent content, String[] cultures, Int32 userId)

   at Umbraco.Cms.Web.BackOffice.Controllers.ContentController.PublishInternal(ContentItemSave contentItem, String defaultCulture, String cultureForInvariantErrors, Boolean& wasCancelled, String[]& successfulCultures)

   at Umbraco.Cms.Web.BackOffice.Controllers.ContentController.PostSaveInternal[TVariant](ContentItemSave contentItem, Func`3 saveMethod, Func`2 mapToDisplay)

   at Umbraco.Cms.Web.BackOffice.Controllers.ContentController.PostSave(ContentItemSave contentItem)

   at lambda_method1834(Closure, Object)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()

--- End of stack trace from previous location ---

   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)


@stevetemple
Copy link
Member

I think this will be fixed by #7

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

2 participants