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

Umbraco 9 Blazor Components

$
0
0

I've been having a play arond trying to get blazor components to work with Umbraco 9.

I'm trying to pass in an umbraco generated model to the blazor component like so

@(await Html.RenderComponentAsync<CounterPartialClass>(RenderMode.ServerPrerendered, new { Model = Model}))

However i get the following error

JsonException: A possible object cycle was detected. This can either be due to a cycle or if the object depth is larger than the maximum allowed depth of 64. Consider using ReferenceHandler.Preserve on JsonSerializerOptions to support cycles.

Has anyone achieved this or found a way around it?

Thanks in advance


Extend Rich Text Editor

$
0
0

Hi, is there any way to extend the rich text editor and add your own shortcuts. Like the B shortcut will surround the selection with strong tags. I'd like to create my own shortcut that will surround a selection with a span and a given class.

Boot failed: An exception has been raised that is likely due to a transient failure

$
0
0

Hi

Our server running Umbraco 8.17.1 crashed and we had to configure another from the scratch, as backup images also failed. We managed to copy the application folder and re-attach the dabase files. But when we launch the site, umbraco crashes with Boot Failed, and the following exception:

An exception has been raised that is likely due to a transient failure. . Consider enabling transient error resiliency by adding 'EnableRetryOnFailure()' to the 'UseSqlServer' call

This is our public site and was working fine for months.

Can you help? Its kind of urgent :(

Regards

Jorge

Web session timeout - every few minutes

$
0
0

I am trying to edit a website for the Royal British Legion and constantly get logged out with the Session Timeout error and am then not about to log back in for about half an hour. I have tried Edge, Chrome and Firefox all in normal and in private browsing.

Please can someone help as this is very frustrating and makes event the simpliest page update take several hours.

Azure DevOps pipeline to change Client Dependency number

$
0
0

Hi All,

Does any one know of a way to automatically adjust the client dependency number when you do a deploy to azure app service. We're having to do this manually at the moment and just wondering if there's an easier way to do this? We have a Azure Devops pipeline in place, where we amend the web.config, but as the clientdependency.config file is external, we're not sure how to change this as part of the deployment process.

Thanks

TinyMCE: dinamically add text color to tinyMceConfig

$
0
0

Hi, I added the setting to color the text to the tinymce. The default colors are taken from the config:

<config key="textcolor_map">
          [
          "f2e618", "Yellow",
          "5e0dac", "Violet",
          "ffffff", "White",
          "000000", "Black"
          ]
</config>

On the site it's possible to configure colors as elements inside a container.

Is there a way to pass the configured color values ​​to the config file, or have the tinymce read the settings from another file?

Thanks!

Settings for Content Version Cleanup

dot net 5 or 6 hosting bundle for umbraco 10?

$
0
0

hello

I upgraded our existing umbraco 9 website to umbraco 10, and it continues to run on our test server which only has the dot net 5 hosting bundle installed on it at this point (not the dot net 6 bundle yet). I wasn't expecting it to run without the dot net 6 runtime bundle as per the hosting requirements on https://our.umbraco.com/Documentation/Fundamentals/Setup/requirements/

Does it still work because the umbraco 10 template doesn't use the new minimal hosting model as yet https://docs.microsoft.com/en-us/aspnet/core/migration/50-to-60?view=aspnetcore-6.0&tabs=visual-studio

this could be a similar question to https://our.umbraco.com/forum/using-umbraco-and-getting-started/109335-net-6-default-configuration-without-startupcs-does-not-allow-umbraco

jsut trying to clarify my understanding of dot net 5 and 6 hosting requirements so any help/clarifications would be helpful.

thanks


Media Persistent Volume for Umbraco 9 over Kubernetes on primer.

$
0
0

I'm working with Umbraco 9 over Kubernetes primer. The problem is that every time we have to rollout/apply the media files are lost. We would like to implement persistent volume storage for the media folder. Does anybody have an YAML example of how to configure PV/PVC for the media folder?

Getting Current.Factory.GetInstance in v9?

$
0
0

Hi all, hope someone can help me with this.

I have the following code which does not work any more in umbraco v.9:

 return Current.Factory.TryGetInstance<T>();

How can I use Current.Factory.GetInstance in Umbraco v.9 ?

Page preview broken when using Umbraco Identity

$
0
0

Unable to get page preview working whilst using Umbraco 8.5.3 and Umbraco Identity 7.1.0.

I have even created a vanilla instance of the latest version of Umbraco (8.6.4) and Umbraco Identity (7.1.1) with the starter kit website and previewing is still broken. You are only ever seeing the published version of the page.

Image Processor not cropping with Azure Blob storage

$
0
0

I really hope somebody can help me with this problem as i've been scratching my head all day!

Media is serving from blob storage just fine, but Image processor isn't working at all and it's not creating a cache folder in app_data either. So the images appear at full size and not cropped.

I've noted this has been an issue in the past, and i've looked through quite a few old posts but I just don't seem to find that crucial mistake I'm assuming I have somewhere in my configs!

I'm NOT using a CDN (blob cache) for now, but may consider it in future.

The set-up is as follows...

  1. Umbraco 7.15.7
  2. Azure App service set to run on ASP.net 4.8
  3. Framework in project is 4.7.2
  4. ImageProcessor 2.8
  5. ImageProcessor.Web 4.11.0
  6. ImageProcessor.Plugins.WebP 1.2.0.100
  7. UmbracoFileSystemProviders.Azure 1.2.0

I have my config files all set-up fine as in documentation and i've ensured a media entry for static file handling exists for "media" in my web.config. Finally the container is set to public.

cache.config

<?xml version="1.0" encoding="utf-8"?>
<caching currentCache="DiskCache">
  <caches>
    <cache trimCache="false" name="DiskCache" type="ImageProcessor.Web.Caching.DiskCache, ImageProcessor.Web" maxDays="365" memoryMaxMinutes="1" browserMaxDays="7">
      <settings>
        <setting key="VirtualCachePath" value="~/app_data/cache" />
      </settings>
    </cache>
  </caches>
</caching>

security.config

<?xml version="1.0" encoding="utf-8"?>
<security>
    <services>
        <service prefix="media/" name="CloudImageService" type="ImageProcessor.Web.Services.CloudImageService, ImageProcessor.Web">
            <settings>
                <setting key="Container" value="media-uk"/>
                <setting key="MaxBytes" value="819430"/>
                <setting key="Timeout" value="30000"/>
                <setting key="Host" value="https://myprovider.blob.core.windows.net/"/>
            </settings>
        </service>
        <service prefix="remote.axd" name="RemoteImageService" type="ImageProcessor.Web.Services.RemoteImageService, ImageProcessor.Web">
            <settings>
                <setting key="MaxBytes" value="819430"/>
                <setting key="Timeout" value="3000"/>
                <setting key="Protocol" value="http"/>
            </settings>
            <whitelist>
            </whitelist>
        </service>
    </services>
</security>

FilesystemProviders.config

<FileSystemProviders>
    <!-- Media -->
    <Provider alias="media" type="Our.Umbraco.FileSystemProviders.Azure.AzureBlobFileSystem, Our.Umbraco.FileSystemProviders.Azure">
        <Parameters >
            <add key="containerName" value="media-uk"/>
            <add key="rootUrl" value="http://provider-name.blob.core.windows.net/"/>
            <add key="connectionString"
                value="DefaultEndpointsProtocol=https;AccountName=zzz;AccountKey=zzzz;EndpointSuffix=core.windows.net"/>
            <!--
        Optional configuration value determining the maximum number of days to cache items in the browser.
        Defaults to 365 days.
    -->
            <add key="maxDays" value="365"/>
            <!--
        When true this allows the VirtualPathProvider to use the default "media" route prefix regardless
        of the container name.
    -->
            <add key="useDefaultRoute" value="true"/>
            <!--
        When true blob containers will be private instead of public what means that you can't access the original blob file directly from its blob url.
    -->
            <add key="usePrivateContainer" value="false"/>
        </Parameters>
    </Provider>
</FileSystemProviders>

Can I use the CSS Isolation feature of asp.net core 6 with Umbraco 10?

$
0
0

Has anyone managed to get the CSS Isolation feature of .net core 6 (razor) working in Umbraco 10?

I can get a test application to build the css files ok but it's not injecting the scope identifiers into the cshtml files. As a test I created a standard mvc project and added Umbraco 10 to it, so that I could switch between the standard MVC start-up and an Umbraco start-up but I cannot seem to locate what bit of the pipeline injects the scope into razor files.

So this bit is working...

<link href="TestMvc.styles.css" rel="stylesheet">

and generates...

/* _content/TestMvc/Views/Home/Index.cshtml.rz.scp.css */
h1[b-zadwjemmwk] {
    color: blue;
}
/* _content/TestMvc/Views/Shared/_Layout.cshtml.rz.scp.css */
/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */

a.navbar-brand[b-eco2muvx3g] {
  white-space: normal;
  text-align: center;
  word-break: break-all;
}

a[b-eco2muvx3g] {
  color: #0077cc;
}

But doesn't add these to the razor files...

 <header>
        <nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
            <div class="container-fluid">
                <h1>test 4</h1>
            </div>
        </nav>
    </header>
    <div class="container">
        <main role="main" class="pb-3">
            <h1>
    Test
</h1>
        </main>
    </div>

Google reCaptcha v2 using the wrong keys

$
0
0

I'm trying to set up google reCaptcha v2 in Umbraco forms, (Umbraco v 7.10.0, Forms version 7.0.0) but the wrong keys keep being used. I've applied the new keys in

<setting key="RecaptchaPublicKey" value="mykey" />
<setting key="RecaptchaPrivateKey" value="myotherkey" />

But Umbraco keeps using the "default" keys that were placeholders. All I get in the form is this

enter image description here

If I inspect the "recaptcha" I see that it's using the wrong keys which gives a 404 when it tries to fetch a recaptcha. However when I manually add the reCaptcha field in code with the correct keys, I get the reCaptcha field as expected. This doesn't really work though as it's not connected to the form. The only place I can access these default keys in code (other than in the webconfig where I already replaced them) is in a metadata file .. I've also cleared every possible cache and temp data and no difference.

Any ideas?

Upgrade to Umbraco 10 error

$
0
0

I have upgraded to Umbraco 10.0.1 via Nuget and also upgraded uSkinned to 3.0.0 but now when I click any page in the tree this error appears

An error occurred

Sequence contains more than one matching element

Exception Details System.InvalidOperationException, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e: Sequence contains more than one matching element Stacktrace at System.Linq.ThrowHelper.ThrowMoreThanOneMatchException() at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable1 source, Func2 predicate, Boolean& found) at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable1 source, Func2 predicate) at Umbraco.Cms.Core.PropertyEditors.PropertyEditorCollection.getItem(String alias) at Umbraco.Cms.Core.Models.Mapping.ContentPropertyBasicMapper1.Map(IProperty property, TDestination dest, MapperContext context) at Umbraco.Cms.Core.Models.Mapping.ContentPropertyDisplayMapper.Map(IProperty originalProp, ContentPropertyDisplay dest, MapperContext context) at Umbraco.Cms.Core.Models.Mapping.ContentPropertyMapDefinition.Map(IProperty source, ContentPropertyDisplay target, MapperContext context) at Umbraco.Cms.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, Type sourceType, MapperContext context) at Umbraco.Cms.Core.Mapping.UmbracoMapper.Map[TSource,TTarget](TSource source, MapperContext context) at System.Linq.Enumerable.SelectIPartitionIterator2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator1.ToList() at Umbraco.Cms.Core.Mapping.MapperContext.MapEnumerable[TSourceElement,TTargetElement](IEnumerable1 source) at Umbraco.Cms.Core.Models.Mapping.TabsAndPropertiesMapper.MapProperties(IContentBase content, List1 properties, MapperContext context) at Umbraco.Cms.Core.Models.Mapping.TabsAndPropertiesMapper1.Map(TSource source, MapperContext context) at Umbraco.Cms.Web.BackOffice.Mapping.ContentMapDefinition.Map(IContent source, ContentVariantDisplay target, MapperContext context) at Umbraco.Cms.Web.BackOffice.Mapping.ContentMapDefinition.Map(IContent source, ContentVariantScheduleDisplay target, MapperContext context) at Umbraco.Cms.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, Type sourceType, MapperContext context) at Umbraco.Cms.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, MapperContext context) at Umbraco.Cms.Core.Mapping.MapperContext.Map[TTarget](Object source) at Umbraco.Cms.Core.Models.Mapping.ContentVariantMapper.CreateVariantDisplay[TVariant](MapperContext context, IContent content, Language language, String segment) at Umbraco.Cms.Core.Models.Mapping.ContentVariantMapper.<>cDisplayClass301.<Map>b__0(Language language) at System.Linq.Enumerable.SelectListIterator2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator1.ToList() at Umbraco.Cms.Core.Models.Mapping.ContentVariantMapper.Map[TVariant](IContent source, MapperContext context) at Umbraco.Cms.Web.BackOffice.Mapping.ContentMapDefinition.Map[TVariant](IContent source, ContentItemDisplay1 target, MapperContext context) at Umbraco.Cms.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, Type sourceType, MapperContext context) at Umbraco.Cms.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, MapperContext context) at Umbraco.Cms.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, Action`1 f) at Umbraco.Cms.Web.BackOffice.Controllers.ContentController.MapToDisplayWithSchedule(IContent content) at Umbraco.Cms.Web.BackOffice.Controllers.ContentController.GetById(Int32 id) at lambdamethod1228(Closure , Object , Object[] ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync() at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)


Image cropper with AzureBlob works on v09, but doesn't on v10

$
0
0

After upgrading from Umbraco v09 to Umbraco v10, and the corresponding package version of Umbraco.StorageProviders.AzureBlob, the site doesn't serve the cropped version of images.

The first time a particular crop is requested, the call takes a longer time (and the cache folder in the container is filled with files) so I presume the crop is generated, but the filed returned to the client is still the original one.

What could be the cause of this behavior?

Error upgrading from Umbraco 10.0.0 to Umbraco 10.0.1

$
0
0

After upgrading the NuGet package and trying to run the solution, it throws this error message in Program.cs.

System.ArgumentNullException: 'Value cannot be null. (Parameter 'provider')

This exception was originally thrown at this call stack:

Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<T>(System.IServiceProvider)
Umbraco.Extensions.UmbracoBuilderExtensions.AddHostedServices.AnonymousMethod__4_0(System.IServiceProvider)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceCallSite, TArgument)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceCallSite, Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceCallSite, TArgument)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(Microsoft.Extensions.DependencyInjection.ServiceLookup.IEnumerableCallSite, Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceCallSite, TArgument)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceCallSite, Microsoft.Extensions.DependencyInjection.ServiceLookup.RuntimeResolverContext)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceCallSite, TArgument)
Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceCallSite, Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope)
...
[Call Stack Truncated]

UMB Forms - Send/Save forms

$
0
0

Hi,

is it possible to send/save forms data from custom FE to Umbraco Forms in the latest version 10? Through some API or something else with a manual? I will not be using direct saving data to the DB. I would like to use Umbraco Forms features like WorkFlow etc.

My frontend is in Angular ... that's why I'm looking for a possible way to do this.

Thanks.

Do i need to install ModelsBuilder?

$
0
0

Ive installed the latest version of Umbraco 8 (8.18.4).

Under the settings tab i see

Models Builder
Version: 8.18.4

ModelsBuilder is enabled, with the following configuration:
The models factory is enabled.
PureLive models are enabled.
Models namespace is Umbraco.Web.PublishedModels.
Tracking of out-of-date models is not enabled.

but the button to generate the models isnt available.

I tried changing this value to Dll

<add key="Umbraco.ModelsBuilder.ModelsMode" value="PureLive" />

but threw an error.

In the /bin directory i dont see a Umbraco.ModelsBuilder.dll but do see Umbraco.ModelsBuilder.Embedded.dll which i assume is something different.

In order to generate these models do i need to install the models builder from Nuget? Or am i missing a setting for this version of Umbraco?

I did read this page https://our.umbraco.com/documentation/reference/templating/modelsbuilder/install-models-builder but i dont know if i require the "full version " of MB?

AuthorizationPolicy named: 'UmbracoFeatureEnabled' was not found

$
0
0

Hi Team,

I am creating Core 6 web api project for Umbraco 9.5 version. I create one api class which is

[Route("api/StoreLocator")]
[ApiController]
public class StoreLocatorController : UmbracoApiController
{

now i added some default settings in start.up class file which is

 services
                 .AddSwaggerGen()
                 .AddUmbraco(_env, _config)
                 .AddBackOffice()
                 .AddWebsite()
                 .AddComposers().Build();

 app.UseUmbraco()
                .WithMiddleware(u =>
                {
                    u.UseBackOffice();
                    u.UseWebsite();
                    u.UseUmbracoCoreMiddleware();
                })
                .WithEndpoints(u =>
                {
                    u.UseInstallerEndpoints();
                    u.UseBackOfficeEndpoints();
                    u.UseWebsiteEndpoints();
                });

when i run this web api project and try to call api...i am getting the error response which is

System.InvalidOperationException: The AuthorizationPolicy named: 'UmbracoFeatureEnabled' was not found.
   at Microsoft.AspNetCore.Authorization.AuthorizationPolicy.CombineAsync(IAuthorizationPolicyProvider policyProvider, IEnumerable`1 authorizeData)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

Could anyone please help me on this issue.

Viewing all 72689 articles
Browse latest View live