https://discord.umbraco.com
Join Discord
Umbraco 15 Custom workspace help & examples
m

mike_dove

9 months ago
Hi, I'm looking for examples of custom workspaces for Umbraco 15 to help me learn more about their creation. Specifically, I would like examples that are attached to posts/page types, link views, contexts and actions together and have custom data entry fields that save and store the regular page data. I've found the current documentation unclear and vague about if or how this is all possible. For a bit more context, my company have an older Umbraco site that uses a custom workspace to generate an email template for Mailchimp and I have been asked to start looking into re-creating it using the newer Umbraco 15 process. The workspace contains several custom fields including a rich text editor (which we would like to move to tiptap) and needs to save the data from these to the post and generate a live preview based upon their content. As a relatively newer user of Umbraco I'm finding it hard to get started so any help would be gratefully received. Thank you in advance!
m
j
  • 2
  • 6
  • 27
How to add an item programmatically to a Contentment Content Block block list.
c

Craig100

9 months ago
V13.5.3 Some properties have been added to the Member MemberType. One is a Contentment Content Block which allows blocks to be added to the list of MyData. Each block has a Name, Code, and BrandList:-
member
    MyData (block list) {
        Name (textString)
        Code (testString)
        BrandList (Multinode Tree Picker)
        }
An import script has been written to take details from a csv file to create new members. This works fine, but the MyData blocks can't be updated . ChatGPT reports that IPublishedElements are "immutable" and so can't be changed directly. Here's the line that gets MyData as an IEnumerable.
var myList = theNewMember.GetValue<IEnumerable<IPublishedElement>>("myData") ?? Enumerable.Empty<IPublishedElement>();
I need to be able to add new IPublishedElements to myList. Any ideas would be appreciated. Thanks.
c
b
  • 2
  • 7
  • 27
Changing root media url in v13
p

ProNotion

10 months ago
Is it possible to change the root path for the media directory? We have a collision and need to change the name of the root url segment from /media to /assets. Ideally we wouldn't change the physical folder name. I've implemented this MediaFileSystem but it has not had an effect:
public void Compose(IUmbracoBuilder builder)
{
    builder.SetMediaFileSystem(factory =>
    {
        var webHostingEnvironment = factory.GetRequiredService<IWebHostEnvironment>();
        var hostingEnvironment = factory.GetRequiredService<IHostingEnvironment>();
        var ioHelper = factory.GetRequiredService<IIOHelper>();
        var logger = factory.GetRequiredService<ILogger<PhysicalFileSystem>>();

        // Define the folder location and URL
        var rootPath = webHostingEnvironment.MapPathWebRoot("~/media");
        var rootUrl = hostingEnvironment.ToAbsolute("~/assets"); // Use /assets instead of /media

        return new PhysicalFileSystem(ioHelper, hostingEnvironment, logger, rootPath, rootUrl);
    });
}
p
  • 1
  • 1
  • 27
Lucene Index Batch Error
j

JN

about 1 year ago
I receive this error every few minutes recently. I'm unable to access Examine Management. How to fix that? https://cdn.discordapp.com/attachments/1290663917617549457/1290663917919408169/Screenshot_2024-10-01_081645.png?ex=66fd47f1&is=66fbf671&hm=3789b1836665dba0b116931868aa536c678ba11383e2fbf280576de0fd450177&
j
j
  • 2
  • 1
  • 27
Bulk deleting members and their property data
r

Richard Thompson

over 1 year ago
Hi, I'm looking to create some reusable code to bulk delete members and their property data from a site's database. The most straightforward way would be to use the member service, but I'd imagine that could be rather inefficient with thousands of members. That's also assuming the delete method also removes the versions of the property data which is what I want. The more efficient way I can think of is to write some SQL statements to clear out the various tables. Has anybody got any code that already does this before I write it? Does anybody have any other suggestions on ways to achieve this? Thanks for your time.
r
g
d
  • 3
  • 2
  • 27
[Solved] Login Status snippet showing others login details
c

Craig100

over 1 year ago
V13.4.0 Using the Umbraco supplied login-status snippet, if I create two members and add them to a member group and then restrict access to a node to that member group and have one of the members login, both members then see the login-status and both see the details of the logged in member if they refresh their page! Thought I'd mention it as it's a privacy breach as well as totally unwanted. The supplied code for the Login Status snippet is:-
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage

@using Microsoft.AspNetCore.Http.Extensions
@using Umbraco.Cms.Web.Common.Models
@using Umbraco.Cms.Web.Website.Controllers
@using Umbraco.Extensions

@{
    var isLoggedIn = Context.User?.Identity?.IsAuthenticated ?? false;
    var logoutModel = new PostRedirectModel();
    // You can modify this to redirect to a different URL instead of the current one
    logoutModel.RedirectUrl = "/";
}

@if (isLoggedIn)
{
    <div class="login-status" style="background-color: black; color: white;">

        <p>Welcome back <strong>@Context?.User?.Identity?.Name</strong>!</p>

        @using (Html.BeginUmbracoForm<UmbLoginStatusController>("HandleLogout", new { RedirectUrl = logoutModel.RedirectUrl }))
        {
            <button type="submit" class="btn btn-primary">Log out</button>
        }

    </div>
}
It looks like a leak in the Context.User. Any thoughts how to fix this? Thanks.
c
d
+2
  • 4
  • 7
  • 27
Multi-site on Umbraco Cloud
l

liamgold

over 1 year ago
I know Umbraco CMS you can have multi-site set ups which is great, but with Cloud is this possible? Or is each instance of Umbraco Cloud tied to a domain?
l
m
  • 2
  • 3
  • 27
Umbraco 13 - Azure App Service (Linux) Long Boot Times
a

Andrew

over 1 year ago
Hi all, we have an Umbraco 13 application that is running on an Azure App Service (Linux) instance. Whenever the site restarts, it often takes 5-15 minutes to come back online and occasionally will need to redownload the appsvc/dotnetcore image before the container starts. Any ideas or explanations for this behavior? Thanks! Other relevant info: - Our app is a large multisite, with about 200 sites in the single instance. - We have the Umbraco:Cms:NuCache:UsePagedSqlQuery app setting set to false.
a
j
  • 2
  • 2
  • 27
Absolute URL for media in Content Delivery API?
j

Josef Henryson

over 1 year ago
Hi. I have tried to read through the docs and googled for this but can't find what I'm looking for. I am calling the content delivery API for my site from a SPA on a different host. The response comes with relative paths / URLs for images. Is it possible to configure the API in some way to return absolute URLs for media items?
j
d
+2
  • 4
  • 6
  • 27
Why do i keep getting this error when creating datatypes umbraco?
r

raygud

almost 2 years ago
umbraco-backoffice-js.js.v69c59d6964fd127d23f9a518f93a556d182cea2f:147 Error: [$controller:ctrlreg] http://errors.angularjs.org/1.8.3/$controller/ctrlreg?p0=SuggestionPluginController
    at umbraco-backoffice-js.js.v69c59d6964fd127d23f9a518f93a556d182cea2f:25:168
    at umbraco-backoffice-js.js.v69c59d6964fd127d23f9a518f93a556d182cea2f:117:19
    at ea (umbraco-backoffice-js.js.v69c59d6964fd127d23f9a518f93a556d182cea2f:99:20)
    at p (umbraco-backoffice-js.js.v69c59d6964fd127d23f9a518f93a556d182cea2f:90:355)
    at g (umbraco-backoffice-js.js.v69c59d6964fd127d23f9a518f93a556d182cea2f:84:186)
    at umbraco-backoffice-js.js.v69c59d6964fd127d23f9a518f93a556d182cea2f:83:311
    at Object.link (umbraco-backoffice-js.js.v69c59d6964fd127d23f9a518f93a556d182cea2f:321:432)
    at umbraco-backoffice-js.js.v69c59d6964fd127d23f9a518f93a556d182cea2f:35:134
    at Ca (umbraco-backoffice-js.js.v69c59d6964fd127d23f9a518f93a556d182cea2f:108:361)
    at p (umbraco-backoffice-js.js.v69c59d6964fd127d23f9a518f93a556d182cea2f:92:340) '<div ng-include="propertyEditorView">'
r
h
a
  • 3
  • 56
  • 27
Previous737475Next

Umbraco

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

Powered by