You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just raising this on the off chance that someone has already fixed this... Am running a customised version of the Umbraco 7 version of GraphQL based upon the 0.1.0 version found on nuget which I think was from the master branch..
If I add a simple macro (with no parameters, using a .cshtml that just outputs some text) into a rich text editor and then try to retrieve this via GraphQL then the value is null and following error is included in the response:
If I attach the debugger then it throws on this line because it can't get the Value -
System.InvalidOperationException
HResult=0x80131509
Message=Cannot render a macro when there is no current PublishedContentRequest.
Source=umbraco
StackTrace:
at Umbraco.Web.UmbracoComponentRenderer.RenderMacro(String alias, IDictionary`2 parameters)
at Umbraco.Web.PropertyEditors.ValueConverters.RteMacroRenderingValueConverter.<>c__DisplayClass0_1.<RenderRteMacros>b__1(String macroAlias, Dictionary`2 macroAttributes)
at Umbraco.Core.Macros.MacroTagParser.ParseMacros(String text, Action`1 textFoundCallback, Action`2 macroFoundCallback)
at Umbraco.Web.PropertyEditors.ValueConverters.RteMacroRenderingValueConverter.RenderRteMacros(String source, Boolean preview)
at Umbraco.Web.PropertyEditors.ValueConverters.RteMacroRenderingValueConverter.ConvertDataToSource(PublishedPropertyType propertyType, Object source, Boolean preview)
at Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedProperty.get_Value()
at Our.Umbraco.GraphQL.Types.ComplexGraphTypeOfIPublishedContentExtensions.<>c__DisplayClass2_1.<AddUmbracoContentPropeties>b__0(ResolveFieldContext`1 context) in C:\working_git\my-navy-umbraco\Our.Umbraco.GraphQL\Types\ComplexGraphTypeOfIPublishedContentExtensions.cs:line 115
at GraphQL.Resolvers.FuncFieldResolver`2.GraphQL.Resolvers.IFieldResolver.Resolve(ResolveFieldContext context)
at GraphQL.Instrumentation.MiddlewareResolver.Resolve(ResolveFieldContext context)
at GraphQL.Resolvers.FuncFieldResolver`1.GraphQL.Resolvers.IFieldResolver.Resolve(ResolveFieldContext context)
at GraphQL.Execution.ExecutionStrategy.<ExecuteNodeAsync>d__7.MoveNext()
I am now trying to work out how to artificially add an Umbraco Context into this class but raising in case someone has solved this previously , and if not I can update if/when I figure it out.....
Thanks,
Andy
The text was updated successfully, but these errors were encountered:
Actually it sometimes reverted back to null by having it before the foreach loop so I had to move it into the loop and change it so it only does this when a macro is found otherwise it makes the request take way longer (over a minute) just from repeatedly setting the context.
Hi,
Just raising this on the off chance that someone has already fixed this... Am running a customised version of the Umbraco 7 version of GraphQL based upon the 0.1.0 version found on nuget which I think was from the master branch..
If I add a simple macro (with no parameters, using a .cshtml that just outputs some text) into a rich text editor and then try to retrieve this via GraphQL then the value is null and following error is included in the response:
If I attach the debugger then it throws on this line because it can't get the Value -
umbraco-graphql/src/Our.Umbraco.GraphQL/Types/ComplexGraphTypeOfIPublishedContentExtensions.cs
Line 176 in 65dcaab
The exception is -
I am now trying to work out how to artificially add an Umbraco Context into this class but raising in case someone has solved this previously , and if not I can update if/when I figure it out.....
Thanks,
Andy
The text was updated successfully, but these errors were encountered: