https://discord.umbraco.com
Join Discord
Umbraco v13 IRecurringBackgroundJob not following Period
c

Carlos Casalicchio

about 1 year ago
Hello everyone! I have implemented the IRecurringBackgroundJob, but something seems wrong. I've scheduled it to repeat after 3 days, and after 7 days, but it's repeating every day. This is happening in Umbraco Cloud and I am suspicious it has to do with a restarting IIS process, but I cannot be certain. Does anyone have any suggestions or fixes to revolve this? please see attachment
public TimeSpan Period => TimeSpan.FromDays(7);
        public TimeSpan Delay => TimeSpan.FromHours(24);
https://cdn.discordapp.com/attachments/1248047040538214520/1248047040680824862/message.txt?ex=66623de2&is=6660ec62&hm=8dab93f684980f82323256dc03db5582bad7cf434b0184dc11eb8b8e4d4189fd&
c
s
  • 2
  • 4
  • 122
error CS0246: The type or namespace name could not be found
w

webjaved

almost 2 years ago
Hello, I am getting the following error message;
error CS0246: The type or namespace name 'FeaturedItemsRow' could not be found (are you missing a using directive or an assembly reference?)
Here is the featuredItemsRow.cshtml component file. https://prnt.sc/_gBCXnfJaxwi Here is the block selected as part of my page builder block. https://prnt.sc/p_MqFGvF2X_H I'm working on Umbraco Cloud at the moment but will look at getting the project cloned locally now that I have access to do so.
w
j
  • 2
  • 5
  • 122
[SOLVED] How do I programmatically create a user with a password?
t

TackleMcClean 🏅

over 1 year ago
I am trying to programmatically create a user but I'm running into problems hashing the password. I have no idea if it's Umbraco or standard .NET core that should handle this. My code looks like this:
private void CreateUserIfNotExist(string email, string password, string? name)
    {
      var user = _userService.GetByEmail(email);
      if (user != null)
      {
        return;
      }

      var newUser = _userService.CreateUserWithIdentity(name ?? email, email);
      var userGroup = _userService.GetUserGroupByAlias("editors") as IReadOnlyUserGroup;

      if (userGroup != null)
      {
        newUser.AddGroup(userGroup);
        newUser.RawPasswordValue = ???? // how to hash password?
        _userService.Save(newUser);
      }

    }
How can I figure out the
RawPasswordValue
? I've tried 5 different ways of dependency inject a password hasher, but I can't find a way to type it to
<IUser>
which is what
CreateUserWithIdentity
returns. The documentation has a page that brings up my hope: https://docs.umbraco.com/umbraco-cms/reference/management/services/userservice/create-a-new-user But it has no example shown at all, broken documentation perhaps?
t
s
  • 2
  • 33
  • 121
Global login redirect?
c

Chris Bass

about 1 year ago
When using role-based permissions for Member page views, the Umbraco 13 backoffice provides a 'Restrict Public Access' popup, that lets you pick the groups with permission, but also forces you to choose a login page and error page. In my case (and I feel like, in many if not most cases) all pages that are restricted have the same login page and the same error page - Is there a way to set this globally (at least, for pages that have access restrictions) or do I really have to teach page editors to set it on each page being restricted?
c
m
m
  • 3
  • 9
  • 120
Best practise: restart after deployment?
d

Domitnator

over 1 year ago
Hi Everyone, We are deploying our Umbraco 13 website to Microsoft Azure (as a App Service on Linux) which works perfectly well right now. But, i am wondering if i should restart the application after the deployment. I heard some people say this would be wise because of some rare caching issues, but is this still the case for Umbraco 13? I'd rather not restart the application as this takes time (i know i could tackle this with deployment slots). We do use uSync and Azure Blob Storage. What are your toughts on this topic?
d
d
+3
  • 5
  • 10
  • 120
Adding a class to a UL in the RTE
d

David Peck (Peck Tech)

about 1 year ago
I'm trying to figure out if there is solution that allows me to style *some *bulleted lists with a different background colour. There are basically two styles of bulleted list, and I need to toggle between them. The
<ul />
needs a class to do that. Using an RTE stylesheet I don't appear to be able to achieve this. I might end up adding a block inside my RTE, which I don't love. I'm sure this used to be possible by setting the stylesheet selector as
ul.green
but this wraps an additional
<ul />
around my original one. Just
.green
puts ``s inside my ``s. TIA
d
m
+5
  • 7
  • 34
  • 119
Umbraco 14 how to display custom section's content.
a

Abradolf Lincler

about 1 year ago
Hey so I've created custom section following the documentation, but i can't find anything about putting content in it. This is what i've done. I've also tried creating sectionView and it worked but it's not put in the content of the section I've created. https://cdn.discordapp.com/attachments/1252932290049216564/1252932290225639445/image.png?ex=667403a0&is=6672b220&hm=cbb6958896e391a683d7c16bb22549280c1d30652820739952d5540296487887& https://cdn.discordapp.com/attachments/1252932290049216564/1252932290443612181/image.png?ex=667403a0&is=6672b220&hm=bd2d5a53d2325f3d6b01ff07117ffb94b2370b9f5418300f4fd61a589340765b& https://cdn.discordapp.com/attachments/1252932290049216564/1252932290783219793/image.png?ex=667403a0&is=6672b220&hm=529d7a43c9c76abb754f5ae614af13cb83cfe5db4881cea01e59b98541a42af4&
a
b
  • 2
  • 3
  • 117
✅ Image focal points - how do they actually work?
j

jacksorjacksor (Richard Jackson)

almost 2 years ago
Morning all! In the Media section you can [set image focal points](https://docs.umbraco.com/umbraco-cms/tutorials/editors-manual/media-management/cropping-images) which set the center point for image resizing, to my current understanding 🪄 by magic 🪄 How does this actually work? Where is the x/y co-ordinates of this property being set? How does this property then work with the CSS to define what parts of the image should be viewed? The reasoning behind this question, aside from wanting to understand the magic, is that I wanted a full viewport height image (Snippet 1) to display on a page which adhered to this focal point. However, using the
background-image
style of a
div
ignores this focal point. Snippet 1: full viewport height image, ignores focal point
<div class="bg-image" style="background-image: url('@imgUrl'); height: 100vh"></div>
I spent a short while looking in the database to find where the focal co-ordinates would be stored, more for my own interest, but couldn't find them. TIA! Rich
j
d
s
  • 3
  • 10
  • 117
How to minify and compress Assets (css,js) when publish front-end umbraco cms?
m

moondoan

8 months ago
I want to automatically minify the CSS and JS files in the assets folder when publishing. Is that possible?
m
s
+3
  • 5
  • 6
  • 116
Umbraco 15, deploy on Ubuntu 24, missing Microsoft.AspNetCore.Server.IIS
b

Blago Culjak

8 months ago
This is error when upgraded site from v14 to v 15 upgrading: > Nov 18 17:08:37 vmi1813232.contaboserver.net systemd[1]: Started greencode.service - Green Code service. > Nov 18 17:08:40 server.net greencode[18474]: Unhandled exception. System.TypeLoadException: Could not load type 'Microsoft.AspNetCore.Builder.IISServerOptions' from assembly 'Microsoft.AspNetCore.Server.IIS, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. > Nov 18 17:08:40 server.net greencode[18474]: at Umbraco.Extensions.UmbracoBuilderExtensions.AddWebServer(IUmbracoBuilder builder) > Nov 18 17:08:40 server.net greencode[18474]: at Umbraco.Extensions.UmbracoBuilderExtensions.AddBackOffice(IUmbracoBuilder builder, Action`1 configureMvc) > Nov 18 17:08:40 server.net greencode[18474]: at Program.$(String[] args) in /home/github-runner/actions-runner/_work/GreenCode/GreenCode/GreenCode/Program.cs:line 17 Program.cs, line 17:
builder.CreateUmbracoBuilder()
    .AddBackOffice()
    .AddWebsite()
    .AddDeliveryApi()
    .AddComposers()
    .Build();
Is there some dependency that is forcing us to use IIS everywhere?
b
s
+2
  • 4
  • 10
  • 116
Previous171819Next

Umbraco

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

Powered by