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

Nested Content Values as dropdown list on another document type - Possible?

$
0
0

If I have a node in my content tree that has a Nested Content property that is a list of strings.

That is published in the tree...

I want another doctype to have a property that is a dropdown list that has a the list of strings from that node with the Nested Content property.

Is this possible to do? (umbraco 8)


Authorization error: Unauthorized access to URL: /umbraco/backoffice/UmbracoApi/Content/PostSave

$
0
0

Hi,

I am getting Unauthorized access to URL Error when I am clicking on Public button on the Umbraco content page.

Authorization error: Unauthorized access to URL: /umbraco/backoffice/UmbracoApi/Content/PostSave.

I am lot able to get this error on Local, when I hosed my site in URL I am getting this issue.

Help me out in resolving this issue.

Regards, Santosh.

ModelsMode "Dll" is not a valid mode

$
0
0

This is getting a tad ridiculous now!

trying to use models builder as suggested in this tutorial : https://24days.in/umbraco-cms/2016/getting-started-with-modelsbuilder/

changing my web config to:

    <add key="Umbraco.ModelsBuilder.Enable" value="true" />
    <add key="Umbraco.ModelsBuilder.ModelsMode" value="Dll" />

and when i run my project I get this!

Boot failed: Umbraco cannot run. See Umbraco's log file for more details.

-> Umbraco.Core.Exceptions.BootFailedException: Boot failed.

-> System.Configuration.ConfigurationErrorsException: ModelsMode "Dll" is not a valid mode. Note that modes are case-sensitive. Possible values are: Nothing, PureLive, AppData, LiveAppData at Umbraco.ModelsBuilder.Embedded.Configuration.ModelsBuilderConfig.<>c.

just failed to build completely.

This is very frustrating. All i want to do is generated strongly typed models from code and I can't find a single piece of info online that works!

can someone help me out here?

NuGet upgrade from v8.5.3 -> v8.6.0 failed with Authorize Upgrade loop

$
0
0

I've just tried to upgrade (via NuGet) from v8.5.3 to v8.6.0. The NuGet process worked (AFAICT) and the project compiled. When I tried to start my site I was asked to login to the back office. The URL indicated I needed to authorize the upgrade. Despite logging in multiple times and always getting the green tick (for a successful login) I kept being asked to login again.

I've checked the log and found this exception:

{"@t":"2020-04-03T13:29:08.8528880Z","@mt":"Unhandled controller exception occurred for request '{RequestUrl}'","@l":"Error","@x":"System.NullReferenceException: Object reference not set to an instance of an object.\r\n   at Umbraco.Web.Editors.CurrentUserController.GetUserTours() in D:\\a\\1\\s\\src\\Umbraco.Web\\Editors\\CurrentUserController.cs:line 103\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.<GetExecutor>b__2(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---

It seems there's something wrong with the tours. I've reported this issue before but didn't get any answers.

Undid the changes and reverted to v8.5.3 and the site is working again.

Hopefully someone can help as otherwise I'll be stuck on v8.5.3 forever.

Extending Umbraco Identity for Users with Password History

$
0
0

I've created a fully working Password History function in .net Identity v2.2.x

Am trying to find the documentation to port this to Umbraco. 7.15.x

I need to extend:

The ApplicationUser class to accommodate a list of useed passwords

The ApplicationUserManager class to accommodate the logic to check passwords

I need to install an ApplicationUserStore so that EF will create the table for me.

...

I have this working in a .net MVC app, but can't find suitable documentation to help online.

Has anyone done this or could point me in the right direction.?

Umbraco 8 ADFS

$
0
0

I'm looking at creating an Umbraco site that is secured behind an ADFS login. This will be for the FE - the back office can still use the usual umbraco login.

I've tried to find some information how to do this with Umbraco but can't seem to find anything on it. Has anyone achieved this and can anyone please provide some guidance if so?

Error in Member section

$
0
0

Hi, I upgraded my site at the last version 8.6. It's all ok but the big problem is that in the member section I can't create or view member. TypeError: Cannot read property '0' of undefined at init (umbraco.controllers.js?cdv=38466319:12507) at umbraco.controllers.js?cdv=38466319:12435 at processQueue (angular.js?cdv=38466319:17948) at angular.js?cdv=38466319:17996 at Scope.$digest (angular.js?cdv=38466319:19115) at Scope.$apply (angular.js?cdv=38466319:19503) at done (angular.js?cdv=38466319:13346) at completeRequest (angular.js?cdv=38466319:13603) at XMLHttpRequest.requestLoaded (angular.js?cdv=38466319:13508) "Possibly unhandled rejection: {}"

Is it only my problem? And in this case what I can check to solve the problem?

Thank you

Simple Tree Menu not Working


OpenID Connect problem

$
0
0

I'm a novice with Umbraco and I'm trying to implement OpenID Connect with an existing Umbraco site (v7). I can login into the Security Provider from the front end (using an ordinary MVC controller) successfully but subsequent Requests are not authenticated. Does anyone have any ideas as to how I might solve this problem ?

Upgrade stuck from 8.5.5 to 8.6.0

$
0
0

When trying to upgrade to 8.6.0 I keep getting the installation screen.

The Upgrading screen says 'Detected current version 8.6.0 (5b1e0d93), which needs to be upgraded to 8.6.0 (2ab29964)'.

Any ideas how to unlock this?

Thanks.

"System.MissingMethodException" when using Html.ConvertImgToSrcSet

$
0
0

This is on Umbraco 8.6

On my DocType ContentPage, I have a RichText property editor with alias RichTextTest. When I do this in a view:

Html.ConvertImgToSrcSet(Model, ContentPage.GetModelPropertyType(m => m.RichTextTest).Alias)

then I get a System.MissingMethodException. I get the exception whether there are images in the RTE or not.

I can use Slimsy's other methods like GetCropUrl and GetSrcSetUrls without trouble.

My Image media type has the Upload property set to Image Cropper.

Any idea what I am doing wrong?

Her is the complete error trace:

[MissingMethodException: Method not found: 'Void Umbraco.Web.PropertyEditors.ValueConverters.RteMacroRenderingValueConverter..ctor(Umbraco.Web.IUmbracoContextAccessor, Umbraco.Web.Macros.IMacroRenderer)'.]
   Slimsy.Slimsy.ConvertImgToSrcSet(HtmlHelper htmlHelper, String sourceValueHtml, Boolean generateLqip, Boolean removeStyleAttribute) +0  
   Slimsy.Slimsy.ConvertImgToSrcSet(HtmlHelper htmlHelper, IPublishedContent publishedContent, String propertyAlias, Boolean generateLqip, Boolean removeStyleAttribute) +58
   ASP._Page_Views_ContentPage_cshtml.Execute() in C:\Users\Mikael\source\U8_1\Web\Views\ContentPage.cshtml:27
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +198
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +105
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78
   System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +235
   System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +107
   Umbraco.Web.Mvc.ProfilingView.Render(ViewContext viewContext, TextWriter writer) in D:\a\1\s\src\Umbraco.Web\Mvc\ProfilingView.cs:25
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +291
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +56
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +52
   System.Web.Mvc.Async.<>c__DisplayClass3_6.<BeginInvokeAction>b__4() +198
   System.Web.Mvc.Async.<>c__DisplayClass3_1.<BeginInvokeAction>b__1(IAsyncResult asyncResult) +100
   System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
   System.Web.Mvc.<>c.<BeginExecuteCore>b__152_1(IAsyncResult asyncResult, ExecuteCoreState innerState) +11
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +45
   System.Web.Mvc.<>c.<BeginExecute>b__151_2(IAsyncResult asyncResult, Controller controller) +13
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +22
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26
   System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
   System.Web.Mvc.<>c.<BeginProcessRequest>b__20_1(IAsyncResult asyncResult, ProcessRequestState innerState) +28
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +577
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +132
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +163

Order of inherited DocType property groups not honored

$
0
0

In Umbraco 8.6, I have a DocType structure like this

Level1DocType -> Level2DocType-> Level3DocType

so Level1DocType inherits from Level2DocType, which in turn inherits from Level3DocType.

Each DocType adds one group of properties. In content items of type Level3DocType, I want the groups to show up in this order:

Intended Group Order:

  • Level3DocTypeGroup
  • Level2DocTypeGroup
  • Level1DocTypeGroup

So in the DocType editor for Level2DocType, I have reordered the groups so Level2DocTypeGroup is first, followed by Level1DocTypeGroup:

Expected order of inherited groups:

  • Level2DocTypeGroup
  • Level1DocTypeGroup

but in the DocType editor for Level3DocType, the inherited groups show up in the order of inheritance and not in the order specified in Level2DocType:

Actual order of inherited groups:

  • Level1DocTypeGroup
  • Level2DocTypeGroup

so there is something not working right here.

For Level3DocType, I now have this group order:

  • Level3DocTypeGroup
  • Level1DocTypeGroup (inherited)
  • Level2DocTypeGroup (inherited)

Now if I create a content item of type Level3DocType, the content item has the following order of property groups:

Actual group order of content item:

  • Level1DocTypeGroup
  • Level2DocTypeGroup
  • Level3DocTypeGroup

Expected group order of content item:

  • Level3DocTypeGroup
  • Level2DocTypeGroup
  • Level1DocTypeGroup

So it seems that when inheritance of DocTypes is in play, the group order as defined in the DocType is not honored.

Am I doing something wrong, or is this an issue which I should add in the issue tracker?

Thank you for any input on this!

Get website root in multi-site instance in a controller

$
0
0

Hi,

I have a multi-site instance of Umbraco (v7). Each website has a different domain name bound to it. I'd like to be able to access the IPublishedContent of the requested website route inside an API controller. So I'd like to return some contextual data for the requested website by calling the API's like this:

I'm able to get the overall Content root no problem, but in my example I need the root of the particular domain being requested.

I thought this might work:

var umbracoHelper = new UmbracoHelper(UmbracoContext.Current);
var root = umbracoHelper.AssignedContentItem.Site();

...but it seems that without it being a proper front-end request it can't route to the correct part of the content tree. It errors as follows:

 Cannot return the IPublishedContent because the UmbracoHelper was constructed with an UmbracoContext and the current request is not a front-end request.

Can anyone advise how to get contextual content from an API in a multi-site instance?

Thanks folks.

Securing Umbraco 8 API with external identity server

$
0
0

Can we configure custom API controller built on Umbraco 8 to be authorized using an external identity server as authority?

Using Media picker in another template

$
0
0

Hi all,

My mind has gone blank can someone point me in right direction.

If I have a media picker in doc type A how can I render the image in Doc Types B template?

I use the following code;

@{
    var typedMediaPickerSingle = Model.Value<IPublishedContent>("featuredBanner");
    if (typedMediaPickerSingle != null)
    {
        <p>@typedMediaPickerSingle.Url</p>
        <img src="@typedMediaPickerSingle.Url" style="width:200px" alt="@typedMediaPickerSingle.Value("alt")" />
    }
}

Which works fine if I wanted to use in in Doc Type A template, but not doc type B template?

Thanks


Umbraco for app development

$
0
0

Hi, has anyone used Umbraco as a backend CMS for app development - having a web app and native mobile apps? Any recommendations or other approaches?

Updating Umbraco during development

$
0
0

Hi, any recommendations on how to approach umbraco development when constant updates are being released? If I haven’t gotten very far with development should I just start from scratch or could I preserve the sql database and just start a new VS solution using the most up to date version of umbraco with the same database?

For example, if I start a project a month ago with v8.5 but haven’t made any customization to the files, only additions to content in the sql database, and put the project on pause for a few weeks but now v8.6 is our, should I just start from scratch or can I just start a new project and copy the database into the new project running v8.6?

Content Service Events - Cancel Operation method doesn't show bubble message in backoffice new node creation

$
0
0

Hi all,

this is my first post on Umbraco Community. I'm migrating the site code from v7 to v8 and I have a problem on method CancelOperation that should throw a bubble message on a new node save event (in the v7 code it works perfectly), in backoffice. That I notice is the code below works well when I save an existing node but it fails (simply the message is not showed) when i try to create a new node.

public class ValidateTagsComposer : IUserComposer
    {
        public void Compose(Composition composition)
        {
            composition.Components().Append<ValidateTagsComponent>();
        }
    }

    public class ValidateTagsComponent : IComponent
    {
        // initialize: runs once when Umbraco starts
        public void Initialize()
        {
            ContentService.Saving += ContentService_Saving;
        }

        // terminate: runs once when Umbraco stops
        public void Terminate()
        { }


        private void ContentService_Saving(IContentService sender, ContentSavingEventArgs eventArgs)
        {


            foreach (var node in eventArgs.SavedEntities)
            {
                if (node.HasProperty("govitCategory") && node.GetValue("govitCategory") != null)
                {
                    if (node.GetValue("govitCategory").ToString().Split(',').Length > 1)
                    {                        

                        // Explain why the publish event is cancelled
                        eventArgs.CancelOperation(new EventMessage("Categoria", "E' consentita una sola categoria.", messageType: EventMessageType.Error));

                    }
                }
            }
        }
    }

I already tried to use the other form suggested here in the forum, first setting eventArgs.Cancel = true; and then using the Add method eventArgs.Messages.Add(new EventMessage("Categoria", "E' consentita una sola categoria.", EventMessageType.Error));, but unfortunately it doesn't work: it is displayed only the following message:

'' could not be published, a 3rd party add-in cancelled the action.

Any ideas? Is it a possible bug?

Antonio

How to get custom service injected into custom component?

$
0
0

Hi,

At the moment I am rewriting a lot of code.

I created a SiteService, like in all of the examples on the Umbraco site. Like this:

 public class SiteService : ISiteService
{
    private readonly IPublishedContentQuery _contentQuery;

    public SiteService(IPublishedContentQuery contentQuery)
    {
        _contentQuery = contentQuery;
    }
}

It is registered this way:

    [RuntimeLevel(MinLevel = RuntimeLevel.Run)]
public class UmbracoCustomComposer : IUserComposer 
{
    public void Compose(Composition composition)
    {
        composition.Register<ISiteService, SiteService>(Lifetime.Request);
    }
}

I can easily inject this into my Surface controllers, this works fine just by adding ISiteService in constructor of controller.

By now my problem.. I've also created a component:

public class ShoppingApplicationComposer : IUserComposer
{
    public void Compose(Composition composition)
    {
        composition.Components().Append<ShoppingApplicationComponent>();  
    }
}

public class ShoppingApplicationComponent : IComponent
{
    private readonly ISiteService _siteService;

    public ShoppingApplicationComponent(IContentService contentService, IUmbracoContextFactory context, ISiteService siteService)
    {
        _siteService = siteService;
    }
    public void Terminate()
    {
    }

    public void Initialize()
    {
    }
}

I can't get this to work. As soon as I add ISiteService to the constructor it leads to a BootFailed Exception:enter image description here

What should I do to make it possible to inject my custom service into my custom component? Can anyone please help me with this one?

Thanks in advance!

Remko

Plans for a Starter site

$
0
0

Good Morning Matt,

Fantastic package thank you for dedicating the time to this and cant wait to use Vendr on our next Ecom project!

As a question - Is there any plans for a future "Starter Site" installation a bit like your blendid example?

Would like to be able to whip up examples for our clients using a simple setup.

Cheers!

Viewing all 72689 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>