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

Umbraco 8 with Models Builder API error

$
0
0

Hi,

I've set up a new Umbraco v8 project and this is working. Now I want to implement the Models Builder API into my VS project so I followed the following documentation to set it up: https://our.umbraco.com/Documentation/Reference/Templating/Modelsbuilder/Install-And-Configure

I created some document types in the backoffice but now when I try to run the Builder.cs class I get an error that it doesn't work.

I installed the Umbraco.ModelsBuilder, Umbraco.ModelsBuilder.Ui and Umbraco.ModelsBuilder.Api nuget packages (all version 8.0.1).

Then I added the following keys to the web.config:

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

As well added the details of my Umbraco administrator account to the Umbraco Models Builder Tool in visual studio itself. Now I get the following error:

UmbracoModelsBuilder: Starting v3.0.6.97 06/03/2019 15:35:18. UmbracoModelsBuilder: UmbracoModelsBuilder failed to generate code: Exception: Response status code does not indicate success (NotFound)

HTTP Error 404.0 - Not Found

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Most likely causes:

  • The directory or file specified does not exist on the Web server.
  • The URL contains a typographical error.
  • A custom filter or module, such as URLScan, restricts access to the file.

Things you can try:

  • Create the content on the Web server.
  • Review the browser URL.
  • Create a tracing rule to track failed requests for this HTTP status code and see which module is calling SetStatus. For more information about creating a tracing rule for failed requests, click here.

Detailed Error Information:

Module   IIS Web Core
Notification   MapRequestHandler
Handler   StaticFile
Error Code   0x80070002
Requested URL   http://www.umbraco-v8.local:80/Umbraco/BackOffice/ModelsBuilder/ModelsBuilderApi/ValidateClientVersion
Physical Path   D:\Projects\UmbracoFramework\Web\Umbraco\BackOffice\ModelsBuilder\ModelsBuilderApi\ValidateClientVersion
Logon Method   Anonymous
Logon User   Anonymous

More Information:

This error means that the file or directory does not exist on the server. Create the file or directory and try the request again.

View more information »

UmbracoModelsBuilder:    at Umbraco.ModelsBuilder.Api.ApiClient.EnsureSuccess(HttpResponseMessage result)
   at Umbraco.ModelsBuilder.Api.ApiClient.ValidateClientVersion()
   at Umbraco.ModelsBuilder.CustomTool.CustomTool.UmbracoModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg)

Content services during boot / composing

$
0
0

Hi.

I'm trying to extend Umbraco 8 and i need to access the Services, Contentype Service, memberservice ETC during startup.

Usually i would use the old OnApplicationStarted and Application context like so:

    public void OnApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
    {
        ApplicationContext.Current.Services.ContentService.GetById(someId);
    }

Trying to do the same in umbraco 8 i've hit a wall though. I've come up witht the following:

[RuntimeLevel(MinLevel = RuntimeLevel.Run)]
public class Startup : IUserComposer
{

    void IComposer.Compose(Composition composition)
    {

        var x = Current.Services.ContentTypeService.GetAllContentTypeAliases();

The issue is that any attempts to get any services results in the error that Factory is not set.

Does anyone know a way around this ? Am i doing it completely wrong?

Thanks alot

Indexing Files with Examine in an external directory

$
0
0

I have a large directory of files (mostly PDFs) that I need indexed that sits outside of the media directory. Is there any way to do this? I'm using Cogworks.ExamineFileIndexer to index items in the Media folder, but the issue I have with keeping the files in the media directory through Umbraco is that every time the file is updated, it changes the URL, making management of the documents extremely difficult. So it seems creating a ExamineIndex of these files would be more practical.

Has anyone else done this? Thank you!

Getting first image of collection

$
0
0

Hi guys,

I just upgraded to 2.0 and I'm wondering how I can convert my old code. I'm struggeling getting the first image, here's my old code:

/* First image */
                var imageIds = CurrentPage.productImages.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                var images = Umbraco.Media(imageIds);
                var firstImage = images.FirstOrDefault();
                var firstImageUrl = firstImage.Url;
                var firstImageCropUrl = firstImage.GetResponsiveImageUrl(433, 0);

<img src="@firstImageCropUrl" alt="@firstImage.GetPropertyValue("altText")" title="@CurrentPage.GetPropertyValue("pageDescription")" />

I can't seem to figure out how I could use the example from the documentation:

<img src="@Url.GetCropUrl(featureImage, 270, 161, quality:30, furtherOptions:"&format=auto")" data-srcset="@Url.GetSrcSetUrls(featureImage, 270, 161)" data-src="@Url.GetCropUrl(featureImage, 270, 161)" sizes="auto" class="lazyload" />

Any help is greatly appreciated.

// Mike

RSS Macro and XSLT Broken

$
0
0

Hi there! We inherited a site on the Umbraco framework from a developer that is no longer in business.

They had previously created a custom RSS macro that styled our event feed pulled in from an off-site source. Recently, however, that functionality broke, and I've been struggling to figure out why ever since.

We patched together a workaround and used a different RSS generator, but we'd really like to know what went wrong with this one.

As far as the macro is concerned, all I can find that is related to the event callback is below. The RSS url is pulled in via a field on our top-level site identity, https://www.alumnionline.pitt.edu/controls/cmsv2/components/rss/rss.aspx?sid=1729&gid=2&calcid=1419&pageid=637.

The RSS feed is functioning just fine and works well with other generators or scripts, so that leads me to believe there's something wonky going on with the code below. Any ideas are appreciated! Thanks!

<xsl:output method="xml" omit-xml-declaration="yes" indent="yes" />

<xsl:param name="currentPage"/>
<xsl:variable name="imdodurl" select="$currentPage/ancestor-or-self::*[@isDoc]/iModulesRSSUrl" />
<xsl:variable name="type" select="/macro/listType" />
<xsl:variable name="feed" select="umbraco.library:GetXmlDocumentByUrl($imdodurl)" />
<xsl:variable name="category">
    <xsl:choose>
        <xsl:when test="string-length(umbraco.library:RequestQueryString('category')) &gt; 0">
            <xsl:value-of select="umbraco.library:RequestQueryString('category')"/>
        </xsl:when>
        <xsl:otherwise>all</xsl:otherwise>
    </xsl:choose>
</xsl:variable> 
<xsl:variable name="month">
    <xsl:choose>
        <xsl:when test="string-length(umbraco.library:RequestQueryString('month')) &gt; 0">
            <xsl:value-of select="umbraco.library:RequestQueryString('month')"/>
        </xsl:when>
        <xsl:otherwise>all</xsl:otherwise>
    </xsl:choose>
</xsl:variable> 

<xsl:variable name="allcatstring">
    <xsl:for-each select="$feed/rss/channel/item">
        <xsl:variable name="catstring" select='substring-before(substring-after(description, "Type:&#60;/b&#62;"), "&#60;br/&#62;&#60;b&#62;Description")'/>
        <xsl:value-of select="$catstring" />,
    </xsl:for-each>
</xsl:variable>
<xsl:variable name="splitCats" select="umbraco.library:Split($allcatstring, ',')" />
<xsl:variable name="uniqueCategories"  select="$splitCats/value [not(.=following::value)]" />

<xsl:template match="/">

    <xsl:choose>
        <xsl:when test="$type = 'homepage'">
            <xsl:call-template name="homepage" />
        </xsl:when>
        <xsl:when test="$type = 'byclub'">
            <xsl:variable name="pageTitle" select="$currentPage/@nodeName" />
            <xsl:if test="count($feed/rss/channel/item [contains(title, $pageTitle)]) &gt; 0">
                <xsl:call-template name="byclub" />
            </xsl:if>
        </xsl:when>
        <xsl:when test="$type = 'topthree'">
            <xsl:call-template name="topthree" />
        </xsl:when>
        <xsl:when test="$type = 'topthreeblocks'">
            <xsl:call-template name="topthreeblocks" />
        </xsl:when>
        <xsl:otherwise>
            <xsl:call-template name="fulllist" />
        </xsl:otherwise>

    </xsl:choose>
</xsl:template>

<xsl:template name="topthree">
    <div class="row">
        <div class="small-12 columns">
            <h4>Upcoming Events</h4>
        </div>
        <hr />
        <xsl:for-each select="$feed/rss/channel/item">  
            <xsl:if test="position() &lt; 4">
            <xsl:variable name="desc" select="description" />
            <xsl:variable name="datestring" select='substring-after($desc, "Date:&#60;/span&#62;")'/>
            <div class="small-12 columns">
                <h2><xsl:value-of select="title" disable-output-escaping="yes" /></h2>
                <h3><xsl:value-of select="$datestring" /></h3>
                <p class="byline"><xsl:value-of select="substring-after($desc, 'Description:&lt;/b&gt;')" disable-output-escaping="yes"/></p>
            </div>
            </xsl:if>
        </xsl:for-each>
    </div>
</xsl:template>

<xsl:template name="topthreeblocks">
    <div class="row">
        <div class="small-12 columns">
            <h4>Events</h4>
        </div>
        <div class="row">
        <xsl:for-each select="$feed/rss/channel/item">
            <xsl:if test="position() &lt; 4">
                <xsl:variable name="desc" select="description" />
                <xsl:variable name="datestring" select='substring-after($desc, "Date:&#60;/span&#62;")'/>

                    <div class="medium-4 columns">
                        <div class="event-block">
                            <div class="event-block-stripe top">&nbsp;</div>
                            <span class="event-block-date"><xsl:value-of select="$datestring" /></span>
                            <h2><xsl:value-of select="title" disable-output-escaping="yes" /></h2>
                            <a class="event-block-get-info" target="_blank" href="{link}">Get Info</a>
                            <div class="event-block-stripe bottom">&nbsp;</div>
                        </div>
                    </div>
            </xsl:if>
        </xsl:for-each>
        </div>
    </div>
</xsl:template>

<xsl:template name="homepage">
    <div class="homepage-events">
        <h4 class="section-title">Events</h4>
        <span class="see-all"><a href="/news-events/events-calendar/">See all events</a></span>
        <xsl:for-each select="$feed/rss/channel/item">
            <xsl:if test="position() &lt;= 5">
                <xsl:variable name="desc" select="description" />
                    <div class="row event-post">
                        <xsl:variable name="datestring" select='substring-after($desc, "Date:&#60;/span&#62;")'/>

                        <xsl:variable name="datesplit" select="umbraco.library:Split($datestring, '/')"/>

                        <div class="large-2 small-2 columns event-date">



                            <xsl:choose>
                        <xsl:when test="$datesplit/value[1] = 1">
                            Jan
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 2">
                            Feb
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 3">
                            Mar
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 4">
                            Apr
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 5">
                            May
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 6">
                            June
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 7">
                            July
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 8">
                            Aug
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 9">
                            Sept
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 10">
                            Oct
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 11">
                            Nov
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 12">
                            Dec
                        </xsl:when>
                        <xsl:otherwise>
                            Error
                        </xsl:otherwise>
                    </xsl:choose>




                                 <span><xsl:value-of select="$datesplit/value[2]" /></span>



                        </div>
                        <div class="large-10 small-10 columns event-content">
                            <h5><a target="_blank" href="{link}"><xsl:value-of select="title" disable-output-escaping="yes" /></a></h5>
                            <a target="_blank" class="event-get-info" href="{link}">GET INFO</a>
                        </div>
                    </div>
                </xsl:if>
            </xsl:for-each>
        </div>
    </xsl:template>

    <xsl:template name="byclub">
        <xsl:variable name="pageTitle" select="$currentPage/@nodeName" />
        <div class="row">
            <div class="small-12 columns">
                <h4>Local Events</h4>
            </div>
            <xsl:for-each select="$feed/rss/channel/item [contains(title, $pageTitle)]">    
                <xsl:variable name="desc" select="description" />
                <xsl:variable name="datestring" select='substring-before(substring-after($desc, "&lt;b&gt;Start&amp;nbsp;Date:&lt;/b&gt;"), "&lt;br/&gt;&lt;b&gt;End")'/>
                <div class="small-12 columns">
                    <h2><xsl:value-of select="title" /></h2>
                    <h3><xsl:value-of select="$datestring" /></h3>
                    <p class="byline"><xsl:value-of select="substring-after($desc, 'Description:&lt;/b&gt;')" disable-output-escaping="yes"/></p>
                </div>
            </xsl:for-each>
        </div>
    </xsl:template>

    <xsl:template name="genericlist">
    </xsl:template>

    <xsl:template name="fulllist">


        <hr />

        <div id="events-calendar" class="row">
            <xsl:choose>
                <xsl:when test="$category != 'all' and $month = 'all' and count($feed/rss/channel/item [contains(ucomponents.strings:StripWhitespace(description), $category)]) &gt; 0">
                    <xsl:for-each select="$feed/rss/channel/item [contains(ucomponents.strings:StripWhitespace(description), $category)]">
                        <xsl:call-template name="sortedMarkup" />
                    </xsl:for-each>
                </xsl:when>

                <xsl:when test="$category != 'all' and $month != 'all' and count($feed/rss/channel/item [contains(ucomponents.strings:StripWhitespace(description), $category) and contains(ucomponents.strings:StripWhitespace(description), $month)]) &gt; 0">
                    <xsl:for-each select="$feed/rss/channel/item [contains(ucomponents.strings:StripWhitespace(description), $category) and contains(ucomponents.strings:StripWhitespace(description), $month)]">
                        <xsl:call-template name="sortedMarkup" />
                    </xsl:for-each>
                </xsl:when>

                <xsl:when test="$category = 'all' and $month != 'all' and count($feed/rss/channel/item [contains(ucomponents.strings:StripWhitespace(description), $month)]) &gt; 0">
                    <xsl:for-each select="$feed/rss/channel/item [contains(ucomponents.strings:StripWhitespace(description), $month)]">
                        <xsl:call-template name="sortedMarkup" />
                    </xsl:for-each>
                </xsl:when>

                <xsl:when test="$category = 'all' and $month = 'all' and count($feed/rss/channel/item) &gt; 0">
                    <xsl:for-each select="$feed/rss/channel/item">
                        <xsl:call-template name="sortedMarkup" />
                    </xsl:for-each>
                </xsl:when>

                <xsl:otherwise>
                    <h2>There are currently no events</h2>
                </xsl:otherwise>
            </xsl:choose>
        </div>
    </xsl:template>

    <xsl:template name="sortedMarkup">
        <xsl:variable name="desc" select="description" />
        <xsl:variable name="catstring" select='substring-before(substring-after(description, "Type:&#60;/b&#62;"), "&#60;br/&#62;&#60;b&#62;Description")'/>
        <xsl:variable name="datestring" select='substring-after($desc, "Date:&#60;/span&#62;")'/>

        <xsl:variable name="datesplit" select="umbraco.library:Split($datestring, '/')"/>

        <xsl:variable name="cleansed" select="ucomponents.strings:StripWhitespace($catstring)" />
        <xsl:variable name="splitYear" select="substring($datesplit/value[3], 1, 4)" />




        <div class="event clearfix">
            <!--This can have date inside Cal icon -->
            <div class ="calendar large-2 small-3 columns">
                <a href="{link}">
                    <span class="fa-stack fa-1x">
                        <i class="fa fa-calendar-o fa-stack-2x">&nbsp;</i>          
                        <strong class="fa-stack-1x calendar-text"><xsl:value-of select="$datesplit/value[2]" /></strong>


                    </span>
                </a>
            </div>
            <div class="large-10 small-9 columns" data-categories="{translate($cleansed, ',',' ')}">

                <h6>
                    <xsl:choose>
                        <xsl:when test="$datesplit/value[1] = 1">
                            January
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 2">
                            February
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 3">
                            March
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 4">
                            April
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 5">
                            May
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 6">
                            June
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 7">
                            July
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 8">
                            August
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 9">
                            September
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 10">
                            October
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 11">
                            November
                        </xsl:when>
                        <xsl:when test="$datesplit/value[1] = 12">
                            December
                        </xsl:when>
                        <xsl:otherwise>
                            Error
                        </xsl:otherwise>
                    </xsl:choose>
                    <xsl:value-of select="$datesplit/value[2]"/>, <xsl:value-of select="$splitYear"/>
                </h6>
                <a href="{link}"><xsl:value-of select="title" disable-output-escaping="yes" /></a>
                <p><xsl:value-of select="substring-after($datestring, $splitYear)" disable-output-escaping="yes" /></p>

            </div>
        </div>
    </xsl:template>

Cannot lock down permissions on home page

$
0
0

In v.6 I did not have this issue, but in v.7 I am unable to lock down the home page so Editors cannot make changes to the home page. If I remove all permissions for the Editors group and save, the permissions go back to defaults. If I give just Browse permission, Editors cannot save changes to the home page (content root) but the editing fields are still visible and allow typing in changes.

How do I remove all but browse from my root/home page?

Display information upon login for non Admins

$
0
0

When an admin logs into Umbraco, they see news and information from Umbraco HQ. How can I change that to show my information when admins login? How can I create a similar experience for when non-admins, editors login?

How to get databaseschemahelper in umbraco 8

$
0
0

Hi all.

How do i convert this code to work with Umbraco 8 IComponent

using Umbraco.Core;
using Umbraco.Core.Persistence;

public class TableCreationEvents : ApplicationEventHandler
{
    protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
    {
        var databaseContext = applicationContext.DatabaseContext;
        var databaseSchemaHelper = new DatabaseSchemaHelper(databaseContext.Database, applicationContext.ProfilingLogger.Logger, databaseContext.SqlSyntax);

        if (!databaseSchemaHelper.TableExist<CustomTable>())
        {
            databaseSchemaHelper.CreateTable<CustomTable>(true);
        }
    }
}

I got this.

using Umbraco.Core;
using Umbraco.Core.Composing;
using Umbraco.Core.Logging;

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

public class CreateTableComponent : IComponent
{
    private ILogger _logger;

    public CreateTableComponent(ILogger logger)
    {
        _logger = logger;
    }

    public void Initialize()
    {

    }

    public void Terminate()
    {

    }
}

Save object to Member via MemberService

$
0
0

Hey Everyone,

I have extended the Member in BackOffice to have a Nested Content object on it called badges. Basically a logged in user can do things on the website to unlock/earn badges. I have an UmbracoAPIController handling the call from the front end which looks as shown

    [System.Web.Http.HttpGet]
    public IContent IsNewBadge(int newSteps)
    {
        var contentService = ApplicationContext.Services.ContentService;
        var memberService = ApplicationContext.Current.Services.MemberService;

        // all available badges
        var allBadges = contentService.GetById(1144).Children();
        var secMember = Membership.GetUser();

        if (secMember != null)
        {
            var currentMember = memberService.GetByUsername(secMember.UserName);

            // Get all badges this member currently has - or return a new empty list if null
            var allMemberBadges = currentMember.GetValue<List<IContent>>("badges") ?? new List<IContent>();

            foreach (var badge in allBadges)
            {
                // check if the passed in number meets or exceeds a badge's required number
                if (newSteps >= badge.GetValue<int>("badgeStepsRequired"))
                {
                    // if the badge is not already in the list
                    if (!allMemberBadges.Contains(badge))
                    {
                        allMemberBadges.Add(badge);
                        currentMember.SetValue("badges", new List<IContent>(allMemberBadges));
                        memberService.Save(currentMember);
                        return badge;
                    }
                }
            }
        }
        return null;
    }

My question is specifically around the "SetValue" method. Is this even the correct method that I should be using? It seems to only want (string,string) or (string,filestream).

The error that I get is

"Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'The best overloaded method match for 'Umbraco.Core.Models.ContentBase.SetPropertyValue(string, string)' has some invalid arguments'"

"The best overloaded method match for 'Umbraco.Core.Models.ContentBase.SetPropertyValue(string, string)' has some invalid arguments"

How can I update my custom member property via API?

Thanks for any suggestions! -Roger

DocumentTypeAlias In Umbraco 8

$
0
0

Hi, I'm trying to convert some old code from v7 to v8. Previously I used CurrentPage.DocumentTypeAlias == "SomeDocType" to compare document type alias in my page which is an UmbracoViewPage. However, when I try Model.DocumentTypeAlias it gives the error:

'IPublishedContent' does not contain a definition for 'DocumentTypeAlias' and no accessible extension method 'DocumentTypeAlias' accepting a first argument of type 'IPublishedContent' could be found (are you missing a using directive or an assembly reference?)

What is the proper way of finding a Model's DocumentTypeAlias?

Thanks!

Error updating or deleting content

$
0
0

I keep getting the same error when updating published content or deleting content:

'concat' is not a recognized built-in function name. Incorrect syntax near 'umbracoNode'.

For example, a popup when trying to delete a node: Received an error from the server

Any ideas?

The full stack trace from an another example from the log:

Exception
System.Data.SqlClient.SqlException (0x80131904): 'concat' is not a recognized built-in function name.
Incorrect syntax near 'umbracoNode'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
   at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteDbDataReader(CommandBehavior behavior) in C:\projects\dotnet\src\MiniProfiler.Shared\Data\ProfiledDbCommand.cs:line 208
   at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
   at Umbraco.Core.Persistence.FaultHandling.FaultHandlingDbCommand.<>c__DisplayClass30_0.<ExecuteDbDataReader>b__0()
   at Umbraco.Core.Persistence.FaultHandling.FaultHandlingDbCommand.<>c__DisplayClass33_0`1.<Execute>b__0()
   at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
   at Umbraco.Core.Persistence.FaultHandling.FaultHandlingDbCommand.Execute[T](Func`1 f)
   at Umbraco.Core.Persistence.FaultHandling.FaultHandlingDbCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader()
   at NPoco.Database.ExecuteReaderHelper(DbCommand cmd)
   at NPoco.Database.ExecuteDataReader(DbCommand cmd)
   at NPoco.Database.<QueryImp>d__164`1.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at Umbraco.Web.PublishedCache.NuCache.ContentStore.SetBranch(Int32 rootContentId, IEnumerable`1 kits)
   at Umbraco.Web.PublishedCache.NuCache.PublishedSnapshotService.NotifyLocked(IEnumerable`1 payloads, Boolean& draftChanged, Boolean& publishedChanged)
   at Umbraco.Web.PublishedCache.NuCache.PublishedSnapshotService.Notify(JsonPayload[] payloads, Boolean& draftChanged, Boolean& publishedChanged)
   at Umbraco.Web.Cache.ContentCacheRefresher.Refresh(JsonPayload[] payloads)
   at Umbraco.Core.Sync.ServerMessengerBase.DeliverLocal[TPayload](ICacheRefresher refresher, TPayload[] payload)
   at Umbraco.Core.Sync.ServerMessengerBase.Deliver[TPayload](ICacheRefresher refresher, TPayload[] payload)
   at Umbraco.Core.Sync.ServerMessengerBase.PerformRefresh[TPayload](ICacheRefresher refresher, TPayload[] payload)
   at Umbraco.Web.Cache.DistributedCache.RefreshByPayload[TPayload](Guid refresherGuid, IEnumerable`1 payloads)
   at Umbraco.Web.Cache.DistributedCacheExtensions.RefreshContentCache(DistributedCache dc, TreeChange`1[] changes)
   at Umbraco.Web.Cache.DistributedCacheBinder.ContentService_TreeChanged(IContentService sender, EventArgs args)
   at Umbraco.Core.Events.EventDefinition`2.RaiseEvent()
   at Umbraco.Core.Events.QueuingEventDispatcher.ScopeExitCompleted()
   at Umbraco.Core.Events.QueuingEventDispatcherBase.ScopeExit(Boolean completed)
   at Umbraco.Core.Scoping.Scope.<>c__DisplayClass72_0.<RobustExit>b__1()
   at Umbraco.Core.Scoping.Scope.TryFinally(Int32 index, Action[] actions)
   at Umbraco.Core.Scoping.Scope.TryFinally(Int32 index, Action[] actions)
   at Umbraco.Core.Scoping.Scope.RobustExit(Boolean completed, Boolean onException)
   at Umbraco.Core.Scoping.Scope.DisposeLastScope()
   at Umbraco.Core.Scoping.Scope.Dispose()
   at Umbraco.Core.Services.Implement.ContentService.SaveAndPublish(IContent content, String culture, Int32 userId, Boolean raiseEvents)
   at Umbraco.Web.Editors.ContentController.PublishInternal(ContentItemSave contentItem, Boolean& wasCancelled, String[]& successfulCultures)
   at Umbraco.Web.Editors.ContentController.PostSaveInternal(ContentItemSave contentItem, Func`2 saveMethod)
   at Umbraco.Web.Editors.ContentController.PostSave(ContentItemSave contentItem)
   at lambda_method(Closure , Object , Object[] )
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.<GetExecutor>b__2(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()
ClientConnectionId:f4d4a347-d33b-43a2-a8ee-dff6d2c13fb9
Error Number:195,State:10,Class:15

nuget install vs binary zip download of 7.13.2 results in different dll versions and web.config file

$
0
0

First time looking at installing via nuget, and happened to notice that nuget 7.13.2 vs the packaged zip from our.umbraco.com/download results in different dlls and additional dlls in the binary folder.

the one that tripped me up was mySql.Data.dll nuget v6.9.12 delivered and the webconfig addresses this with dependentAssembly setting

the zipped 7.13.2 delivers 6.9.9.0 and no dependantAssembly setting.

Also nuget install has quite a few extra for dll's (and pdb's for debugging?) presumably from the dependancy chain in the nuget package. Other things are whitespace chars.

Are all these to be expected? I sort of assumed that the download.zip and nuget should be identical?

Below a couple of screen shots to illustrate differences.. nuget on the right

enter image description here

enter image description here

How to add a navigation menu partial view / razor view

$
0
0

Hi,

How can I add a razor command to implement a navigation menu on multiple pages. So I am trying to create a partial view, I presume???, that is essentially the nvaigation menu html code, which I can then implement, using @NavMenu(), or something, in each .cshtml page.

Any ideas?

I'm trying to implement this so that any future changes to the navigation menu can be reflected in that razaor NavMenu (partial view?), instead of having to manually change each .cshtml page to reflect such a navigation menu change. As you can imagine this is quite tedious with a website that is over 100 pages.

ERROR: Sequence contains more than one matching element

$
0
0

After upgrading from 7.3.4 to Umbraco 7.3.8, I am now getting an error on particular nodes:

Failed to retrieve data for content id 5314

Sequence contains more than one matching element

EXCEPTION DETAILS:

System.InvalidOperationException: Sequence contains more than one matching element
STACKTRACE:

at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at Umbraco.Core.Persistence.Repositories.VersionableRepositoryBase`2.GetPropertyCollection(Sql docSql, IEnumerable`1 documentDefs)
   at Umbraco.Core.Persistence.Repositories.ContentRepository.CreateContentFromDto(DocumentDto dto, Guid versionId, Sql docSql)
   at Umbraco.Core.Persistence.Repositories.ContentRepository.PerformGet(Int32 id)
   at Umbraco.Core.Cache.DefaultRepositoryCachePolicy`2.Get(TId id, Func`2 getFromRepo)
   at Umbraco.Core.Persistence.Repositories.RepositoryBase`2.Get(TId id)
   at Umbraco.Core.Services.ContentService.GetById(Int32 id)
   at Umbraco.Web.Editors.ContentController.CheckPermissions(IDictionary`2 

Any ideas how this can be fixed?

417 Missing token suddenly occurring on all our sites

$
0
0

We have several Umbraco sites that have been working fine, then on Monday (15th May) clients on various sites starting reporting that they were seeing no content on login.

Checking it out, it is returning 417 Missing Token on various services on login; an F5 will make everything work.

It is consistent every time; log in, nothing works, F5, everything works.

Seems to be a common error but with various causes; I have cleared cookies, restarted site, no dice. Reproducible every time.

The initial login sends a UMB_UCONTEXT cookie (and my app cookie for site users).

The F5 sends that + cookies XSRF-TOKEN and XSRF-V, and extra header X-XSRF-TOKEN.

Replaying the requests in the object inspector will reliably give the same results, so clearly it is the headers that are causing the problem.

Any ideas how to fix? And why it's suddenly started happening?


eZSearch seems to be ignoring custom RootMediaNodeId

$
0
0

Hi,

Using eZSearch and it is all working as expected. However, when i specify a specific folder ID within the macro to specify which root node to use, it returns no results but if i leave it as standard to search all media, it returns the correct items.

The idea is to have a folder that is only searchable by the public. I have had this working previously but doesn't seem to be working on my current site.

Thanks in advance :)

Umbraco v7.12.4

Kind Regards,

Gary Henshall

Implement Klarna?

$
0
0

Hi! Is there someone here that have implemented Klarna with Tea Commerce 3.2.5?

Shall I update the Klarna.Checkout.dll? It´s version 1.0.1.0 now.

My problem is to get the Checkout form to display with only test data not form Tea commerce order data yet.

uSync import error - Object reference not set to an instance of an object

$
0
0

We are currently using uSync but now have an environment where we get this below error in the logs when attempting an import

My question is - how can I trace WHICH element is causing this issue during the import? The debugging does not show which element is being processed when the error occurs

Many thanks

2019-03-04 11:09:34,497 [P1716/D7/T160] ERROR Jumoo.uSync.BackOffice.Controllers.uSyncApiController - Unhandled controller exception occurred System.NullReferenceException: Object reference not set to an instance of an object. at Jumoo.uSync.Core.Serializers.ContentTypeBaseSerializer1.DeserializeBase(IContentTypeBase item, XElement info) at Jumoo.uSync.Core.Serializers.ContentTypeSerializer.DeserializeCore(XElement node) at Jumoo.uSync.Core.Serializers.SyncBaseSerializer1.DeSerialize(XElement node, Boolean forceUpdate) at Jumoo.uSync.BackOffice.Handlers.ContentTypeHandler.Import(String filePath, Boolean force) at Jumoo.uSync.BackOffice.Handlers.uSyncBaseHandler1.ImportFolder(String folder, Boolean force, Dictionary2 updates) at Jumoo.uSync.BackOffice.Handlers.uSyncBaseHandler1.ImportFolder(String folder, Boolean force, Dictionary2 updates) at Jumoo.uSync.BackOffice.Handlers.uSyncBaseHandler1.ImportFolder(String folder, Boolean force, Dictionary2 updates) at Jumoo.uSync.BackOffice.Handlers.uSyncBaseHandler1.ImportFolder(String folder, Boolean force, Dictionary2 updates) at Jumoo.uSync.BackOffice.Handlers.uSyncBaseHandler1.ImportAll(String folder, Boolean force) at Jumoo.uSync.BackOffice.uSyncBackOfficeContext.Import(IEnumerable1 syncHandlers, String folder, Boolean checkConfig, Boolean force, String groupName) at Jumoo.uSync.BackOffice.uSyncBackOfficeContext.Import(String groupName, String folder, Boolean force) at Jumoo.uSync.BackOffice.uSyncBackOfficeContext.ImportAll(String folder, Boolean force) at Jumoo.uSync.BackOffice.Controllers.uSyncApiController.Import(Boolean force)

Model Builder Auto Upgrade to v8.0.2

$
0
0

I had auto upgrade ticked in Model Builder Tool and it has updated to Umbraco Model Builder Tool v8.0.2. Now, all my current projects are showing error.

We need to switch back to Umbraco Model Builder Tool v3.0.10 but I am not finding the vsix file.

Please can you provide me suggestions to move in right direction.

Umbraco 8 - ContentService and dropdown list

$
0
0

Hi,

I am using Umbraco 8 and I am having an issue with the ContentService. The problem happens when I set in a new node a dropdown list value.

I use the following code to set the value in my new node:

IContentService contentService = Services.ContentService;

var newPersonNode = contentService.Create(
                        $"{person.FirstName} {person.LastName}",
                        personContainerNode.Id,
                        "TDPerson",
                        0);
personNodeFound.SetValue("TDPersonType", "Option1");

contentService.SaveAndPublish(newPersonNode);

There is no error after the SaveAndPublish.

But when I log into umbraco and go to the newly created node I get the following error:

An error occured
Error mapping types.

 Mapping types:
 IContent -> ContentItemDisplay
 Umbraco.Core.Models.IContent -> Umbraco.Web.Models.ContentEditing.ContentItemDisplay

 Type Map configuration:
 IContent -> ContentItemDisplay
 Umbraco.Core.Models.IContent -> Umbraco.Web.Models.ContentEditing.ContentItemDisplay

 Destination Member:
 Variants

Exception Details
AutoMapper.AutoMapperMappingException: Error mapping types.

 Mapping types:
 IContent -> ContentItemDisplay
 Umbraco.Core.Models.IContent -> Umbraco.Web.Models.ContentEditing.ContentItemDisplay

 Type Map configuration:
 IContent -> ContentItemDisplay
 Umbraco.Core.Models.IContent -> Umbraco.Web.Models.ContentEditing.ContentItemDisplay

 Destination Member:
 Variants
```

Stacktrace:

```
at lambda_method(Closure , Content , ContentItemDisplay , ResolutionContext )
   at lambda_method(Closure , Object , Object , ResolutionContext )
   at Umbraco.Web.Editors.ContentController.MapToDisplay(IContent content)
   at Umbraco.Web.Editors.ContentController.GetById(Int32 id)
   at lambda_method(Closure , Object , Object[] )
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.<GetExecutor>b__2(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()

Inner Exception
AutoMapper.AutoMapperMappingException: Error mapping types.

 Mapping types:
 IContent -> ContentVariantDisplay
 Umbraco.Core.Models.IContent -> Umbraco.Web.Models.ContentEditing.ContentVariantDisplay

 Type Map configuration:
 IContent -> ContentVariantDisplay
 Umbraco.Core.Models.IContent -> Umbraco.Web.Models.ContentEditing.ContentVariantDisplay

 Destination Member:
 Tabs
at lambda_method(Closure , Content , ContentVariantDisplay , ResolutionContext )
   at lambda_method(Closure , Object , Object , ResolutionContext )
   at Umbraco.Web.Models.Mapping.ContentVariantResolver.Resolve(IContent source, ContentItemDisplay destination, IEnumerable`1 destMember, ResolutionContext context)
   at lambda_method(Closure , Content , ContentItemDisplay , ResolutionContext )
Inner Exception
AutoMapper.AutoMapperMappingException: Error mapping types.

 Mapping types:
 IEnumerable`1 -> IEnumerable`1
 System.Collections.Generic.IEnumerable`1[[Umbraco.Core.Models.Property, Umbraco.Core, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null]] -> System.Collections.Generic.IEnumerable`1[[Umbraco.Web.Models.ContentEditing.ContentPropertyDisplay, Umbraco.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=null]]
at lambda_method(Closure , IEnumerable`1 , IEnumerable`1 , ResolutionContext )
   at Umbraco.Web.Models.Mapping.TabsAndPropertiesResolver.MapProperties(IContentBase content, List`1 properties, ResolutionContext context)
   at Umbraco.Web.Models.Mapping.TabsAndPropertiesResolver`2.Resolve(TSource source, TDestination destination, IEnumerable`1 destMember, ResolutionContext context)
   at lambda_method(Closure , Content , ContentVariantDisplay , ResolutionContext )
Inner Exception
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: P. Path '', line 0, position 0.
at Newtonsoft.Json.JsonTextReader.ParseValue() in /_/Src/Newtonsoft.Json/JsonTextReader.cs:line 1706
   at Newtonsoft.Json.JsonTextReader.Read() in /_/Src/Newtonsoft.Json/JsonTextReader.cs:line 419
   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter) in /_/Src/Newtonsoft.Json/JsonReader.cs:line 1195
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) in /_/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:line 196
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) in /_/Src/Newtonsoft.Json/JsonSerializer.cs:line 907
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) in /_/Src/Newtonsoft.Json/JsonConvert.cs:line 828
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) in /_/Src/Newtonsoft.Json/JsonConvert.cs:line 786
   at Umbraco.Web.PropertyEditors.MultipleValueEditor.ToEditor(Property property, IDataTypeService dataTypeService, String culture, String segment)
   at Umbraco.Web.Models.Mapping.ContentPropertyBasicConverter`1.Convert(Property property, TDestination dest, ResolutionContext context)
   at Umbraco.Web.Models.Mapping.ContentPropertyDisplayConverter.Convert(Property originalProp, ContentPropertyDisplay dest, ResolutionContext context)
   at lambda_method(Closure , IEnumerable`1 , IEnumerable`1 , ResolutionContext )

I thinks I should set the value of the dropdown list differently but I cannot find how.

Thank you in advance for your help,

Viewing all 72689 articles
Browse latest View live


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