Register empty section using UmbExtensionManifest

In Umbraco 16 we had an empty section similar to this to show Hangfire in a custom section:

However with Umbraco 17 I get compile errors using this approach.

What is the error(s) you get?

What does your hangfire.element.js look like?

Just the manifest properties, which doesn’t match UmbExtensionManifest anymore.

The dashboard just extends HtmlElement wrapping the Hangfire iframe:

const template = document.createElement('template');
template.innerHTML = `
    <style>           
        .hangfire-wrapper {
             margin: 0;
             height: 100%;
             width: 100%;
        }
        .hangfire-content { 
            display: block;
            border: none;
            height: 100%;
            width: 100%;
        }
    </style>

    <div class="hangfire-wrapper">                
        <iframe name="hangfireIframe" class="hangfire-content" id="Hangfire" src="/umbraco/hangfire/"></iframe>
    </div>
`;


export default class McbHangfireDashboardElement extends HTMLElement {

    constructor() {
        super();
        this.attachShadow({ mode: 'open' });
        this.shadowRoot?.appendChild(template.content.cloneNode(true));
    }
}

customElements.define('mcb-hangfire-dashboard', McbHangfireDashboardElement);

maybe you have a version mismatch in your backoffice UI components, I just added that code to my test 17 project and it builds ok without any errors

No, it is using @umbraco-cms/backoffice v17.1.0

Strange, it works fine for me using your exact code.

I’ll check my versions, maybe mine is wrong :rofl:

PS if you’ve not seen.. IPackageManifestReader for a csharp manifest registration…

Umbraco.Community.AzureSSO/src/Umbraco.Community.AzureSSO/AzureSSOManifestReader.cs at main · Gibe/Umbraco.Community.AzureSSO

and cachebusting… if thats causing issues?

Cache buster for extension files - Umbraco community forum

It appears to come down to the following breaking change:

But it wasn’t clear from version specific changes here:

UmbSectionElement no longer extends from HTMLElement, which we were using to wrap the Hangfire iframe, but it works it dashboard instead extends UmbLitElement or UmbElementMixin(LitElement).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.