https://discord.umbraco.com
Join Discord
How to get current culture?
h

Holm76

10 months ago
Our site currently has two languages with some parts of the site displaying prices in localized currencies. How to detect if site is domain.com or domain.com/da? And get the current culture of the site?
h
s
+2
  • 4
  • 4
  • 131
RTE in custom property editor Umbraco 10 -> 13
w

Wiggy

10 months ago
I have a custom property editor in Umbraco 10 which renders a lovely RTE:
html
<div ng-controller="HotspotEditor.HotspotRTE.Controller" class="">
  <form>
    <umb-property-editor class="umb-property-editor umb-rte" model="RichtTextEditor" />
  </form>
</div>
js
$scope.RichtTextEditor = {
        label: 'bodyText',
        description: '',
        view: '/umbraco/views/propertyeditors/rte/rte.html',
        config: {
            editor: {
                toolbar: ["ace", "undo", "redo", "cut", "styleselect", "bold", "italic", "alignleft", "aligncenter", "alignright", "bullist", "numlist", "link", "unlink"],
                stylesheets: ["rte"],
                dimensions: {},
                mode: "classic"
            }
        },
        value: $scope.model.value.hiddenContent
    };
I have migrated the application to Umbraco 13 and the RTE no longer renders. The rest of my custom property editor is fine. Does anybody know if something would have changed between 10 -> 13? I can't find any documentation or examples anywhere of how to use backoffice UI elements for v13. Should I be looking in the Umbraco src code or existing packages for this? Any help of where to start looking would be really appreciated!
w
j
  • 2
  • 9
  • 130
Unexpected "Recursive locks not allowed" in production
k

kdx-perbol

3 months ago
This code produces a "Recursive locks not allowed" error in production, but not in test or development. So I'm guessing the Production Runtime Mode is the reason.
if (item.Published && umbracoContentService.IsPathPublishable(item))
umbracoContentService.SaveAndPublish(item);
Does anyone have any spontaneous ideas on what could cause this? The item comes from
contentService.GetPagedOfType(...)
.
k
s
j
  • 3
  • 12
  • 129
cron expression support for background tasks in Umbraco
j

Jason

10 months ago
Going to nerd snipe @Andrew McKaskill and @Sebastiaan for this 😁 I'm looking at getting an alternative to
IRecurringBackgroundJob
up and running that supports cron expressions (human time) rather than delay/period timespans (machine time). Do either of you know if anyone's working on cron support? I can see there's already a cron parser library in there but it's only used for first delay internally.
j
h
+3
  • 5
  • 28
  • 129
Adding a redirect for a page
m

mauzilla

about 1 year ago
I want to create a new page but for now the page needs to redirect to an existing page (not my idea) - I have added the new page but cannot find a way to set "if I land on this page redirect elsewhere" from within umbraco, can this be done or must it be done programmatically?
m
h
+5
  • 7
  • 7
  • 129
When to use UrlMode.Absolute on GetCropUrl?
o

Owain

almost 2 years ago
Hey there - I'm using Image.GetCropUrl("thumbnail", UrlMode.Absolute) on a website but the site has been put behind Azure Front Door and image stopped working. If I removed UrlMode.Absolute, the images work again. When should UrlMode.Absolute be used and when shouldn't it be used? Not much in the docs that was any help. 🙂
o
s
+5
  • 7
  • 15
  • 129
How do i authenticate to the Content Delivery API with Swagger or Postman
n

Navorski

12 months ago
Can someone help me on my way? I created an API, an UmbracoApiController, with the [UmbracoMemberAuthorize] attribute. I Configured swagger to be able to authorize Everything seems to be in place and to work. But how do i authenticate with Swagger, or with Postman, or whatever? when i go to https://localhost/umbraco/swagger, i can see the swagger api, and when i want to authenticate, i have to fill in a client_id and a client_secret. But i have no idea where to get those? https://cdn.discordapp.com/attachments/1242595241077375058/1242595241219850310/image.png?ex=664e687f&is=664d16ff&hm=725f3c4adc068b9f71b6a1a0688cf566f11aabbd9de24c86de6bb9a52b3f319d&
n
d
+2
  • 4
  • 8
  • 128
AmbientContext error when trying to use ConentService within a Hangfire task
w

Wiggy

12 months ago
Has anyone come across this error before?
System.AggregateException: One or more errors occurred. (No AmbientContext was found.) ---> System.InvalidOperationException: No AmbientContext was found.    at Umbraco.Cms.Infrastructure.Scoping.AmbientScopeContextStack.Pop()    at Umbraco.Cms.Infrastructure.Scoping.ScopeProvider.PopAmbientScopeContext()    at Umbraco.Cms.Infrastructure.Scoping.Scope.<>c__DisplayClass100_0.<RobustExit>g__HandleScopeContext|2()    at Umbraco.Cms.Infrastructure.Scoping.Scope.TryFinally(Action[] actions)    --- End of inner exception stack trace ---    at Umbraco.Cms.Infrastructure.Scoping.Scope.TryFinally(Action[] actions)    at Umbraco.Cms.Infrastructure.Scoping.Scope.RobustExit(Boolean completed, Boolean onException)    at Umbraco.Cms.Infrastructure.Scoping.Scope.DisposeLastScope()    at Umbraco.Cms.Infrastructure.Scoping.Scope.Dispose()    at Umbraco.Cms.Infrastructure.Examine.ExamineUmbracoIndexingHandler.DeferedReIndexForContent.<>c__DisplayClass6_0.<Execute>b__0(CancellationToken cancellationToken)    at Umbraco.Cms.Infrastructure.HostedServices.QueuedHostedService.BackgroundProcessing(CancellationToken stoppingToken)
Trying to run a Hangfire task to update a node with the ContentService. Have tried a million things regarding scopes etc.
w
s
j
  • 3
  • 41
  • 127
Has the SendingAllowedChildrenNotification been deprecated for V14?
m

marcemarc

about 1 year ago
There is this event in V8->v13 called SendingAllowedChildrenNotification that allows you to use c# to hook into the building of the list of types of documents you can create under a node. I was about to suggest somebody used it in V13, as a way to stop multiple 'Site Setting' nodes from being created, but thought I'd check it was still there, and I couldn't see it in V14? is it no longer a thing?? https://github.com/umbraco/Umbraco-CMS/blob/v13/contrib/src/Umbraco.Core/Notifications/SendingAllowedChildrenNotification.cs
m
s
+7
  • 9
  • 31
  • 126
Umbraco 13 in Azure Function
a

attila_08563

over 1 year ago
Hello, I would like to use Umbraco 13 Services with Db integrated into Azure Function. I've found this article https://24days.in/umbraco-cms/2022/umbraco-anywhere/ which shows how we can setup Umbraco in Azure function but it references Umbraco.Cms.Infrastructure and Umbraco.Cms.Persistence.SqlServer version 10.3.2. When I tried this solution I got couple of exceptions of missing service registration, which I tried to collect in the attached picture. I also needed to remove Install Steps because it's registered in the AddCoreInitialServices but with missing dependencies and I don't want to use it from Azure function. Could You please help how can I use Umbraco 13 from Azure Function? Thanks, Attila https://cdn.discordapp.com/attachments/1193915012117450862/1193915012423618661/image.png?ex=65ae7300&is=659bfe00&hm=ed492f3ab1304bd33040b777a6c0859a415036e7985b29a6378142c8d86f5b03&
a
j
  • 2
  • 4
  • 126
Previous121314Next

Umbraco

A hub and casual space for you to interact with fellow community members and learn more about Umbraco!

Powered by