Quantcast
Channel: ActiveTopics
Viewing all 72689 articles
Browse latest View live

Culture and Hostnames not working as expected

$
0
0

So i have this site which has some language variants:

  • English
  • Russian
  • Vietnamese
  • Indonesian
  • Chinese

Up til now the all ran on the .com site. all was good.

Now we have the chinese domain pointed to the site so it should run on both the .com and .cn domain. The .cn should of course show the chinese language version.

It's set up like this:

enter image description here

The thing is, the .cn site doesnt trigger. It shows the international english language version... site.com/cn/ and site.cn/cn/ both shows the correct chinese version?!?!

Any idea how to fix this?


Value cannot be null. (Parameter 'source')

$
0
0

I have setup Umbraco 10 website on hosting and getting below error. It works fine on local

ArgumentNullException: Value cannot be null. (Parameter 'source')
System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)

ArgumentNullException: Value cannot be null. (Parameter 'source')
System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
System.Linq.Enumerable.OfType<TResult>(IEnumerable source)
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionDescriptorProvider..ctor(IEnumerable<IPageRouteModelProvider> pageRouteModelProviders, IOptions<MvcOptions> mvcOptionsAccessor, IOptions<RazorPagesOptions> pagesOptionsAccessor)
System.RuntimeMethodHandle.InvokeMethod(object target, ref Span<object> arguments, Signature sig, bool constructor, bool wrapExceptions)
System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType)
System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue>.GetOrAdd(TKey key, Func<TKey, TValue> valueFactory)
Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<T>(IServiceProvider provider)
Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.GetOrCreateDataSource(IEndpointRouteBuilder endpoints)
Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.MapControllerRoute(IEndpointRouteBuilder endpoints, string name, string pattern, object defaults, object constraints, object dataTokens)
Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.MapAreaControllerRoute(IEndpointRouteBuilder endpoints, string name, string areaName, string pattern, object defaults, object constraints, object dataTokens)
Umbraco.Extensions.EndpointRouteBuilderExtensions.MapUmbracoRoute(IEndpointRouteBuilder endpoints, Type controllerType, string rootSegment, string areaName, string prefixPathSegment, string defaultAction, bool includeControllerNameInRoute, object constraints)
Umbraco.Cms.Web.BackOffice.Install.InstallAreaRoutes.CreateRoutes(IEndpointRouteBuilder endpoints)
Umbraco.Extensions.UmbracoApplicationBuilderExtensions.UseInstallerEndpoints(IUmbracoEndpointBuilderContext app)
Premneo.Website.Startup+<>c.<Configure>b__4_2(IUmbracoEndpointBuilderContext u) in Startup.cs
Umbraco.Cms.Web.Common.ApplicationBuilder.UmbracoApplicationBuilder+<>c__DisplayClass17_0.<WithEndpoints>b__0(IEndpointRouteBuilder endpoints)
Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseEndpoints(IApplicationBuilder builder, Action<IEndpointRouteBuilder> configure)
Umbraco.Cms.Web.Common.ApplicationBuilder.UmbracoApplicationBuilder.WithEndpoints(Action<IUmbracoEndpointBuilderContext> configureUmbraco)
Premneo.Website.Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env) in Startup.cs
System.RuntimeMethodHandle.InvokeMethod(object target, ref Span<object> arguments, Signature sig, bool constructor, bool wrapExceptions)
System.Reflection.RuntimeMethodInfo.Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(object instance, IApplicationBuilder builder)
Microsoft.AspNetCore.Hosting.ConfigureBuilder+<>c__DisplayClass4_0.<Build>b__0(IApplicationBuilder builder)
Microsoft.AspNetCore.Hosting.GenericWebHostBuilder+<>c__DisplayClass15_0.<UseStartup>b__1(IApplicationBuilder app)
Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter+<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
Microsoft.AspNetCore.Server.IIS.Core.IISServerSetupFilter+<>c__DisplayClass2_0.<Configure>b__0(IApplicationBuilder app)
Microsoft.AspNetCore.HostFilteringStartupFilter+<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder app)
Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
Premneo.Website.Program.Main(string[] args) in Program.cs

UK Recruitment Agencies

$
0
0

I hope this type of question is allowed!

I am looking for recruitment agency recommendations in the UK. I have been in a permanent role for 5+ years so have lost touch with agencies I had previously dealt with and therefore would be interested to hear some recommendations.

Looking for an Umbraco /C# development role, south east UK.

Formats dropdown configuration

$
0
0

Hi,

I was wondering if there was a way to configure the Formats dropdown of the RTE to retrieve values from a stylesheet? I'm using version 1.1.0.

enter image description here

Thanks, Hannes

Custom workflow using email template

$
0
0

I've created a custom workflow to allow me to CC form submissions to an email address using https://our.umbraco.com/forum/umbraco-forms/87822-how-to-add-reply-to-bcc-functionality-to-umbraco-forms as a basis.

I'd now like to include the "razor email template functionality" of the default workflow. I've added

[Umbraco.Forms.Core.Attributes.Setting("Email Template", description = "Email template to use", view = "EmailTemplatePicker")]
    public string EmailTemplate { get; set; }

So I've got a picker working now, but I'm not sure how to combine the form submission with the template.

I've seen this on the forums, but it seems a bit long winded for something that's already built in somewhere.

Can anybody point me in the right direction?

Manual Cart

$
0
0

Hi Matt,

Thanks so much for the manual cart, looks to be a really good feature, couple of questions for you.

When I try and add a product to a cart, no results are displayed, searching for a sku also returns no results, not sure if this is another issue I have with the update or a bug - try.vendr.net was not working when I tried so unable to validate it.

Is there a way to manually finalize a cart? The client I am working with at the moment use session carts and do not use Umbraco members so they would only want to create a cart as a 'manual order' which they would probably take payment over the phone - is this possible, if not let me know and I'll add it as a feature request for consideration.

Many thanks,

J

Umbraco 8.17.2 - DateTime picker breaking backoffice

$
0
0

This has been affecting us for a while, but I'm just getting around to posting about it: We are using (or at least trying to use) the built-in Date/Time picker on one of our main document types. In both Chrome and Firefox (all browsers I've tried), it doesn't work properly; it just acts as a regular text box, but the date/time picker won't open. No errors show up, though.

What's worse is that when we try to navigate away from that page, we get the following JavaScript error, and navigating away does not work until the page is refreshed.

TypeError: fpInstance.destroy is not a function
    at HTMLDivElement.<anonymous> (umbraco.directives.js?cdv=362534875:12972:32)

This is quite problematic, as it means we have to keep hitting refresh after clicking another node in the tree before it will show up.

We could just remove the date picker since it isn't working, but we kind of need it. Any idea why this is happening?

Mocking UmbracoContext in v8


Limit on size of tags

$
0
0

Hi peeps.

We've run into an issue where the size of the tags are limited: enter image description here With the following editor: enter image description here It seems that this perhaps has been solved in the source. https://github.com/umbraco/Umbraco-CMS/pull/8469

Any suggestions to why it does not work in heartcore?

Kind regards Kristian

Missing files after deploymnet to Umbraco Cloud

$
0
0

Hi guys,

When I deploy my code to Umbraco Cloud I've noticed that one of my folders in App_Plugins is missing some of the folders and files.

/css (missing)
/js (deployed)
/lang (missing)
/views (missing)
package.manifest (deployed)

I'm used to having problems with doc types but this is the first time I've had a code deploy issue 😅

Has anyone had similar issues? And if so how did you resolve it?

Any help is greatly appreciated.

TIA

Phil

Umbraco 8 - Weird behavior when copying items and using them within the same parent item

$
0
0

Hey :)
So my problem is that when I copy items in Umbraco, that sometimes contain descendants and nested content, and then trying to use them inside the same parent item, it leads to a very weird behavior.
For example:

  • It renders the same nested content from the first copy.
  • Since I'm mapping those Umbraco items to dictionaries and lists in my backend code, I get duplicate key error which breaks my app.

That issue is very detrimental to the work process of our content people since they can't use the Copy option.

Can someone please help me understand why is that even happening, and how can I solve it / workarounds? Thanks!!

Strange caching behaviour for custom property editor

$
0
0

Hi guys,

I have a custom property editor that is being used to specify the days and times certain activities take place on.

When I iterate over the schedules for the first time they have the correct values, but on subsequent requests every element has the same value - the last item according to 'Sort Order' in Umbraco.

It's as if the values are being cached somewhere / somehow using the same key, but I cannot for the life of me figure out what is going on.

I have tried the following to no avail:

  • Set different PropertyCacheLevel on the ValueConverter, tried None, Element, Elements, Unknown, and Snapshot
  • Reload / Collect all of the caches from Settings > Published Status
  • Complete system reboot

I feel like I am missing something fundamental and probably quite obvious... can anyone shed any light?

For info here is the value converter and some images of how it looks in Umbraco:

public class WeeklyScheduleValueConverter : IPropertyValueConverter
{
    public bool IsConverter(IPublishedPropertyType propertyType)
        => Constants.WeeklySchedule.Alias == propertyType.EditorAlias;

    public bool? IsValue(object value, PropertyValueLevel level)
    {
        return level switch
        {
            PropertyValueLevel.Source => value != null &&
                                         (value is not string s || string.IsNullOrWhiteSpace(s) == false),
            _ => throw new NotSupportedException($"Invalid level: {level}.")
        };
    }

    public Type GetPropertyValueType(IPublishedPropertyType propertyType)
        => typeof(Models.WeeklySchedule);

    public PropertyCacheLevel GetPropertyCacheLevel(IPublishedPropertyType propertyType)
        => PropertyCacheLevel.Elements;

    public object ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object source, bool preview)
    {
        var sourceString = source?.ToString();

        if (string.IsNullOrWhiteSpace(sourceString))
        {
            return Models.WeeklySchedule.Empty;
        }

        return (JsonConvert.DeserializeObject<IEnumerable<WeeklyScheduleDayDto>>(sourceString) ??
                Array.Empty<WeeklyScheduleDayDto>());
    }

    public object ConvertIntermediateToObject(IPublishedElement owner, IPublishedPropertyType propertyType,
        PropertyCacheLevel referenceCacheLevel, object inter, bool preview)
    {
        if (inter is not IEnumerable<WeeklyScheduleDayDto> schedule)
            return null;

        var enumeratedSchedule = schedule.ToList();
        var weeklySchedule = Models.WeeklySchedule.Empty;

        for (var i = 0; i < 7; i++)
        {
            var dayOfWeek = (DayOfWeek)i;
            var dailySchedule = enumeratedSchedule.ElementAt(i).Value;

            weeklySchedule[dayOfWeek].Enabled = dailySchedule.Enabled;
            var parsedEntries = dailySchedule.Items.Select(item => new WeeklyScheduleDayItem { Start = item.Value?.Start, End = item.Value?.End }).ToList();

            weeklySchedule[dayOfWeek].Items = parsedEntries;
        }

        return weeklySchedule;
    }

    public object ConvertIntermediateToXPath(IPublishedElement owner, IPublishedPropertyType propertyType,
        PropertyCacheLevel referenceCacheLevel, object inter, bool preview)
    {
        return inter?.ToString();
    }
}

I would expect the value for the 2 hour ticket to have two elements in for Sunday, like this: enter image description here

But it's actually returning the results of the 3 hour ticket, like this: enter image description here

As always guys any help is creatlly appreaciated, I think I'm going a little bit crazy.

TIA

Phil

Umbraco v7 - Umbraco Forms Spam

$
0
0

I have a customer who for quite a long time has been going through an ongoing battle with spam on their contact forms.

We have been through reCaptcha v2 and v3 without success. v3 has significant issues with false positives and as a charity, they feel they are losing potential donors as a consequence.

We have implemented a honeypot and also a timestamp field to prevent bots and most recently they appear to be less bot and more human in their origination which makes this task even more difficult. There is a common theme in the posts as pretty much all contain URLs and this is where I am currently stumped! The customer has added the following regex ^(?!.*\.\S)(?!.*:\/\/).* to invalidate the textarea contents if it contains a URL. For me this works on the client-side and the server-side, so even if I disable javascript I still cannot get a submission to post successfully. So, how are they getting the forms through the validation? I've tried various methods of encoding the URLs but they either get blocked or do not appear as valid URLs in the submission like the ones the spammers submit.

Any ideas or recommendations would be appreciated.

Get children of children.

$
0
0

Hi all,

I'm trying to create a side nav for my site as the structure has alot of pages within pages.

I want this side nav to be dynamic so it can render the children of children no matter what node is selected.

My structure will have this many layers.

enter image description here

Here is my code so far, which shows the Department, Wards, but I want to get the Departments which sit under those.

@inherits Umbraco.Web.Mvc.UmbracoViewPage
@using Umbraco.Web;


@{
    var siteSection = Model.AncestorOrSelf(2);
    var selection = siteSection.Children.Where(x => x.IsVisible());
}

@foreach (var item in selection)
{
    <a class="nav-link nav-link--black nav-link--air-bottom @(item.IsAncestorOrSelf(Model) ? "nav-link--active" : null)" href="@item.Url">@item.Name</a>
}

Hope I've made that clear.

Thanks in advance

Matt

Umbraco Route Hijacking with Surface Controller

$
0
0

Hi all,

Let see if someone can give me a hand with an issue I'm having in umbraco 9.

I'm doing route hijacking to populate a model with some information that is added in a custom area in umbraco and not the actual node. This is working perfectly fine and the page is being redered and the model is being populated.

The issue comes because I have a form there to logout and another to dowload some files both of them are using a surface controllers to control the POST. When I submit these forms the controller POST method is never reached and I'm getting the following error:

"ModelBindingException: Cannot bind source type Umbraco.Cms.Core.Models.ContentModel to model type Carrington.Web.Models.FabricDetailViewModel."

Being "FabricDetailViewModel" the model used in the hijack and on the view.

Is there away to have forms on views that are loaded via hijacking?

Thanks in advance!


Umbraco 7 scheduled publishing problems in Azure App Service

$
0
0

Hello Wonderful Umbraco community!

We have an Umbraco 7.15.7 project that we are attempting to put onto an Azure app service as it has about 1 year of life left, before we rebuild on version 10 or possibly 11 :-)!

So far, setting up the infrastructure in DevOps has gone well. We have a pipeline/CI working and the site has tested all the way through with little trouble. We've even managed to plug-in Azure AD SSO successfully.

As part of our QA and integration test cycles we've settled on a single instance of P3V3. We may scale up/down, but we have no plans to scale out. So this isn't a load balanced set-up.

Examine sync services and blob storage/image processor are working fine.

The site runs a few plug-ins worth a mention that may cause issue on Azure. Namely:

God Mode Unversion Nexu ModelsBuilder (built-in) Diplo.LinkChecker

The only bump in the road we're now experiencing is Scheduled Publishing seems to be very unstable. On a first scheduled publish, it works fine. On the second subsequent scheduled publish (same page) the back office becomes unstable (nobody can publish any pages, we just get an endless spinning circle) , the second scheduled change doesn't show up on the website, but the back office UI suggests it has. The only way to clear the problem is to reset the app pool.

Warns & Errors in the log consist of a single consistent error we get with Nexu, which happens on our current production box anyway.

ERROR Our.Umbraco.Nexu.Core.BootStrapper - An unhandled exception occurred while parsing content

System.NullReferenceException: Object reference not set to an instance of an object.

With these Warns & Errors only happening on the Azure app service. They don't always consistently appear though every time.

2022-08-02 17:15:10,636 [P1508/D35/T509] WARN  Umbraco.Core.Scoping.ScopeProvider - Missed ScopeContext Object 05f96a5a

2022-08-02 17:15:10,683 [P1508/D35/T383] WARN Umbraco.Core.Scoping.ScopeProvider - Missed ScopeContext Object 05f96a5a 2022-08-02 17:15:10,683 [P1508/D35/T383] WARN Umbraco.Core.Scoping.ScopeProvider - Missed ScopeContext Object 05f96a5a

2022-08-02 16:53:57,440 [P1508/D32/T205] ERROR Umbraco.Web.Scheduling.ScheduledPublishing - Failed (see exception).

System.NullReferenceException: Object reference not set to an instance of an object. at Umbraco.Core.Scoping.Scope.<>cDisplayClass700.2() at Umbraco.Core.Scoping.Scope.TryFinally(Int32 index, Action[] actions) at Umbraco.Core.Scoping.Scope.TryFinally(Int32 index, Action[] actions) at Umbraco.Core.Scoping.Scope.TryFinally(Int32 index, Action[] actions) at Umbraco.Core.Scoping.Scope.RobustExit(Boolean completed, Boolean onException) at Umbraco.Core.Scoping.Scope.Dispose() at Umbraco.Core.Persistence.UnitOfWork.ScopeUnitOfWork.DisposeResources() at Umbraco.Core.DisposableObjectSlim.Dispose(Boolean disposing) at Umbraco.Core.DisposableObjectSlim.Dispose() at Umbraco.Core.Services.UserService.GetUserById(Int32 id) at umbraco.BusinessLogic.User.GetUser(Int32 id) at umbraco.cms.businesslogic.web.Document.SetupNode(IContent content) at Umbraco.Web.Cache.PageCacheRefresher.Refresh(IContent instance) at Umbraco.Core.Sync.ServerMessengerBase.DeliverLocal[T](ICacheRefresher refresher, MessageType messageType, Func2 getId, IEnumerable1 instances) at Umbraco.Core.Sync.ServerMessengerBase.Deliver[T](IEnumerable1 servers, ICacheRefresher refresher, MessageType messageType, Func2 getId, IEnumerable1 instances) at Umbraco.Web.Cache.DistributedCache.Refresh[T](Guid factoryGuid, Func2 getNumericId, T[] instances) at Umbraco.Web.Cache.DistributedCacheExtensions.RefreshPageCache(DistributedCache dc, IContent[] content) at Umbraco.Web.Cache.CacheRefresherEventHandler.ContentServicePublished(IPublishingStrategy sender, PublishEventArgs1 e) at Umbraco.Core.Events.TypedEventHandler2.Invoke(TSender sender, TEventArgs e) at Umbraco.Core.Events.EventDefinition`2.RaiseEvent() at Umbraco.Core.Events.ScopeEventDispatcher.ScopeExitCompleted() at Umbraco.Core.Events.ScopeEventDispatcherBase.ScopeExit(Boolean completed) at Umbraco.Core.Scoping.Scope.<>cDisplayClass70_0.1() at Umbraco.Core.Scoping.Scope.TryFinally(Int32 index, Action[] actions) at Umbraco.Core.Scoping.Scope.TryFinally(Int32 index, Action[] actions) at Umbraco.Core.Scoping.Scope.RobustExit(Boolean completed, Boolean onException) at Umbraco.Core.Scoping.Scope.Dispose() at Umbraco.Core.Persistence.UnitOfWork.ScopeUnitOfWork.DisposeResources() at Umbraco.Core.DisposableObjectSlim.Dispose(Boolean disposing) at Umbraco.Core.DisposableObjectSlim.Dispose() at Umbraco.Core.Services.ContentService.SaveAndPublishDo(IContent content, Int32 userId, Boolean raiseEvents) at Umbraco.Core.Publishing.ScheduledPublisher.CheckPendingAndProcess() at Umbraco.Web.Scheduling.ScheduledPublishing.PerformRun()

2022-08-02 16:53:57,408 [P1508/D32/T205] ERROR Umbraco.Core.Publishing.ScheduledPublisher - Error publishing node 14367

System.NullReferenceException: Object reference not set to an instance of an object. at Umbraco.Core.Scoping.Scope.<>cDisplayClass700.2() at Umbraco.Core.Scoping.Scope.TryFinally(Int32 index, Action[] actions) at Umbraco.Core.Scoping.Scope.TryFinally(Int32 index, Action[] actions) at Umbraco.Core.Scoping.Scope.TryFinally(Int32 index, Action[] actions) at Umbraco.Core.Scoping.Scope.RobustExit(Boolean completed, Boolean onException) at Umbraco.Core.Scoping.Scope.Dispose() at Umbraco.Core.Persistence.UnitOfWork.ScopeUnitOfWork.DisposeResources() at Umbraco.Core.DisposableObjectSlim.Dispose(Boolean disposing) at Umbraco.Core.DisposableObjectSlim.Dispose() at Umbraco.Core.Services.UserService.GetUserById(Int32 id) at umbraco.BusinessLogic.User.GetUser(Int32 id) at umbraco.cms.businesslogic.web.Document.SetupNode(IContent content) at Umbraco.Web.Cache.PageCacheRefresher.Refresh(IContent instance) at Umbraco.Core.Sync.ServerMessengerBase.DeliverLocal[T](ICacheRefresher refresher, MessageType messageType, Func2 getId, IEnumerable1 instances) at Umbraco.Core.Sync.ServerMessengerBase.Deliver[T](IEnumerable1 servers, ICacheRefresher refresher, MessageType messageType, Func2 getId, IEnumerable1 instances) at Umbraco.Web.Cache.DistributedCache.Refresh[T](Guid factoryGuid, Func2 getNumericId, T[] instances) at Umbraco.Web.Cache.DistributedCacheExtensions.RefreshPageCache(DistributedCache dc, IContent[] content) at Umbraco.Web.Cache.CacheRefresherEventHandler.ContentServicePublished(IPublishingStrategy sender, PublishEventArgs1 e) at Umbraco.Core.Events.TypedEventHandler2.Invoke(TSender sender, TEventArgs e) at Umbraco.Core.Events.EventDefinition`2.RaiseEvent() at Umbraco.Core.Events.ScopeEventDispatcher.ScopeExitCompleted() at Umbraco.Core.Events.ScopeEventDispatcherBase.ScopeExit(Boolean completed) at Umbraco.Core.Scoping.Scope.<>cDisplayClass70_0.1() at Umbraco.Core.Scoping.Scope.TryFinally(Int32 index, Action[] actions) at Umbraco.Core.Scoping.Scope.TryFinally(Int32 index, Action[] actions) at Umbraco.Core.Scoping.Scope.RobustExit(Boolean completed, Boolean onException) at Umbraco.Core.Scoping.Scope.Dispose() at Umbraco.Core.Persistence.UnitOfWork.ScopeUnitOfWork.DisposeResources() at Umbraco.Core.DisposableObjectSlim.Dispose(Boolean disposing) at Umbraco.Core.DisposableObjectSlim.Dispose() at Umbraco.Core.Services.ContentService.SaveAndPublishDo(IContent content, Int32 userId, Boolean raiseEvents) at Umbraco.Core.Publishing.ScheduledPublisher.CheckPendingAndProcess()

Regex for Fontawesome 6

$
0
0

Hi I'm using package Our.Iconic And I would preceate som help with regex for fontawesome 6 I want to render <i class="fa-light fa-alarm-exclamation"></i> I have tried

./fa-(light)+:before {

./fa-(solid|regular|light|brands|duotone|thin)+:before {

.(fa-[\w-]+):before {

Nothing seems to works, I have checked the path to the font and it's ok. Maybee someone can point me in right direction.

Many thanks in advance /Christina

Show content for backend admin only

$
0
0

Hey!

I've been trying to have specific tools on my website, only visibile if you are logged in as the admin account in the backoffice. I've had this working on previous versions of Umbraco 7, but can't for the life of me figure out how it works in Umbraco 8.

For context, it's used as a plugin installed in /App_Plugins/. Then fetched into the pages using:

@Html.Partial("~/App_Plugins/Toolbox/Toolbox.cshtml")`

So far I've tried the following, without much success:

@inherits Umbraco.Web.Mvc.UmbracoViewPage
@using ClientDependency.Core.Mvc
@using Umbraco.Core
@using Umbraco.Core.Security
@using Umbraco.Core.Models.Membership
@{
    HttpContextBase wrapper = new HttpContextWrapper(HttpContext.Current);
    UmbracoBackOfficeIdentity user = wrapper.GetCurrentIdentity(true);
    bool isUmbracoLoggedIn = user != null;
}
@if (isUmbracoLoggedIn)
{
    // Tools go here
}

I've also tried the following, with no luck:

@inherits Umbraco.Web.Mvc.UmbracoViewPage
@using ClientDependency.Core.Mvc
@using Umbraco.Core
@using Umbraco.Core.Security
@using Umbraco.Core.Models.Membership
@{
var userTicket = new System.Web.HttpContextWrapper(System.Web.HttpContext.Current).GetUmbracoAuthTicket();
    if (userTicket != null) {     
        var currentUser = ApplicationContext.Services.UserService.GetByUsername(userTicket.Name);
        var isLoggedInUser = true;
    }
}

@if(isLoggedInUser) {
    // Tools go here
}

Aswell as trying to get information about the logged in user using:

bool isLoggedOn = HttpContext.Current.User.Identity.IsAuthenticated;

However this always returns false.

I've tried Googling for the past few hours, and tried everything I've come across. All solutions suggesting using GetUmbracoAuthTicket() hasn't worked at all for me.

Let me know if you need anything else, hope some sharp minds in here are able to help! Thanks in advance!

  • Mikkel

Get Block list item label from multinode picker field value

$
0
0

I have a block list component 'Quotes' which has a block list field containing a collection of 'Quote' items.

Each quote item has a field 'Author' which is using an Umbraco Multinode picker (limited to a single node) which allows the editor to pick a page in the tree as the author content.

I'm wondering if it's possible to reference a field from the 'Author' page in the nested block items label?

E.g:

Quote - {{ author.firstName }}

Would would give an output like:

Quote - John Smith

I don't see anything in the documentation around this though you can do stuff like reading from the settings model.

https://our.umbraco.com/Documentation/Fundamentals/Backoffice/property-editors/built-in-property-editors/Block-List-Editor/#editor-appearance

I've done some digging to try to figure out what's actually stored when you use a Multinode picker set to a single item and it seems to store a ref to the page via string - see 'author' property:

enter image description here

So I guess {{author.firstName}} would never work as you need the actual author instance/object.

Is there some kind transformation or helper method that we can use to get at the pages data via this field, or some other way of achieving the same effect?

Thanks

v10 - Cant view form entry

$
0
0

I have a new instance of v10.0.1 | form version 10.0.5

When I try and view a form submission, the link is not working. See screenshot. I've tried on the same versions but on Umbraco cloud and I can view the entry so I am confused. Any ideas?

enter image description here

Viewing all 72689 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>