Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Veronica Burd 76 posts 201 karma points
    Nov 03, 2015 @ 10:13
    Veronica Burd
    0

    Cannot create/edit Style sheets in backend - Zippy.Media.ZippyMediaEventHandler.TreeControllerBase_MenuRendering

    Hi,

    I installed Zippy Media 1.0.1 via nuget and now I cannot create or edit any style sheets in Umbraco 7.3.1.

    Maybe it doesn't like the curly braces used in CSS? Once I uninstall your package I can edit style sheets again.

    This is the error I get:

        Received an error from the server
    Failed to retrieve data for a node's menu frontend
    
    Input string was not in a correct format.
    
    EXCEPTION DETAILS:
    
    System.FormatException: Input string was not in a correct format.
    STACKTRACE:
    
    at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
       at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
       at System.Convert.ToInt32(String value)
       at Zippy.Media.ZippyMediaEventHandler.TreeControllerBase_MenuRendering(TreeControllerBase sender, MenuRenderingEventArgs e)
       at Umbraco.Core.Events.TypedEventHandler`2.Invoke(TSender sender, TEventArgs e)
       at Umbraco.Web.Trees.TreeControllerBase.OnMenuRendering(TreeControllerBase instance, MenuRenderingEventArgs e)
       at Umbraco.Web.Trees.TreeControllerBase.GetMenu(String id, FormDataCollection queryStrings)
       at lambda_method(Closure , Object , Object[] )
       at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(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__0.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__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>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.<ExecuteActionFilterAsyncCore>d__0.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__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>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.<ExecuteActionFilterAsyncCore>d__0.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__2.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__2.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__2.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__1.MoveNext()
    

    Ver

  • Troels Larsen 75 posts 280 karma points
    Nov 03, 2015 @ 10:21
    Troels Larsen
    0

    Hey Veronica

    That is unexpected behavior :) May i ask if the package actualy works after installation or does it break as well.

    Cause the error message looks like it is some problem with System.Web.Http.Formating.

    Ill have a look at it tomorrow.

  • Veronica Burd 76 posts 201 karma points
    Nov 03, 2015 @ 10:37
    Veronica Burd
    0

    Re-installed the package and yes the upload works.

    However, two issues,

    1. It doesn't refresh the media view. I have to manually reload nodes to see the new files.

    2. It doesn't respect the disallowedUploadFiles setting in umbracoSettings.config

    I have the following set:

    <disallowedUploadFiles>air,ashx,aspx,ascx,asmx,axd,bat,com,config,cs,cshtml,dll,exe,vbhtml,vbs</disallowedUploadFiles>
    

    I purposefully added an .exe file to the zip file and the package uploaded it to my media section. If I try to upload the same .exe file manually I correctly get an error message that states:

    The specified file type has been disallowed by the administrator
    

    Could you fix this? I don't want my content editors using this great package to circumvent our upload policy.

    Thanks

    Ver

  • Troels Larsen 75 posts 280 karma points
    Nov 03, 2015 @ 11:25
    Troels Larsen
    0

    Hey Veronica

    I have just installed a fresh version 7.3.1 and i cant replicate the issue u are talking about. for me it uploades and refresh the tree node and sends a success message.

    Have u upgraded the solution from 7.2.8 to 7.3.1 ?

    I wont get time untill the end of the week to fix the features u are asking for.

  • Veronica Burd 76 posts 201 karma points
    Nov 03, 2015 @ 13:17
    Veronica Burd
    0

    Hey,

    Thanks, there's no need to hurry from my side.

    This site has been upgraded from 7.2.6 through to 7.3.1 so far. I get the success message but the nodes do not get refreshed.

    Thanks

  • Troels Larsen 75 posts 280 karma points
    Nov 03, 2015 @ 16:32
    Troels Larsen
    0

    Hey Veronica

    I have tryed 7.3.1, 7.3.0, 7.2.8, 7.2.6 and they all works like a charm. Can u please validate you can get the package up and running on a clean fresh install.

    Cause then i think i know where the problem is. from version 7.2.8 to 7.3 MVC and wepApi is replaced by newer versions. And if the assembly bindings are not updated and the gag holds the old version of System.Net.Http.Formating u get the problem.

    Give me a heads up tomorrow what a clean solutions says to you. If it is the upgrade as i suspect ill give a hand with debugging that to since u pointed out i missed the umbraco allowed file uploads :)

  • Troels Larsen 75 posts 280 karma points
    Nov 03, 2015 @ 16:52
    Troels Larsen
    0

    Now i tried to upgrade from umb 7.2.6 -> 7.3.1 and it still works,

    Could u post your webconfigs assembly bindings ? or validate u have

    <dependentAssembly>
            <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
          </dependentAssembly>
    

    and that it is the right System.Net.Http.Formatting that is in your bin folder ?

  • Veronica Burd 76 posts 201 karma points
    Nov 04, 2015 @ 09:01
    Veronica Burd
    0

    Hi,

    I have that entry in my web.config (copied below)

      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
      </dependentAssembly>
    

    The dll was installed via the nuget package Microsoft.AspNet.WebApi.Client.5.2.3 into the bin folder.

    I'll try a clean installation.

  • Troels Larsen 75 posts 280 karma points
    Nov 04, 2015 @ 10:52
    Troels Larsen
    0

    Cool Give me a heads up on what u find.

    Its a odd problem so better get to the bottom of it :)

    Btw there is a checkin in the git repo that takes disallowedUploadFiles into acount. Ill be making a new nuget and umbraco package this weekend.

  • Stefano Beretta 101 posts 246 karma points
    Nov 16, 2015 @ 15:39
    Stefano Beretta
    0

    Hi! Very useful package, it's a MUSTHAVE, but I have the same problem.

    The error occurs also when I rightClick a subfolder of the partial view folder.

    I have to create the new partial in the partial folder root and then move it into my custom folder.

    The error is exactly the same pasted initially by Veronica and the url called is

    /umbraco/backoffice/UmbracoTrees/LegacyTree/GetMenu?id=Forms&treeType=partialViews&parentId=-1&section=settings&rnd=9985d2f82d8a4e82b1d7ba9d7b4bad78&contextMenu=true&isDialog=false
    

    I hope this can help you.

    HFYR

    Stefano

  • Troels Larsen 75 posts 280 karma points
    Nov 18, 2015 @ 18:12
    Troels Larsen
    0

    Aloha Stefano

    and thx for the MUST HAVE PACKAGE :)

    My problem is that i cant replicate this error my self, I even tried to install a 7.2.6 and upgrade it to 7.3.1 and still i cant replicate it.

    the stacktrace from the initial post actualy dosn't pinpoint anything because the call is made async and due to web api 2's crappy exception logging, your cant actualy see what is going on :(

    one thing i have still to digg into, is this : https://support.microsoft.com/en-us/kb/942460

    but that is just like looking for a needle in a haystack :)

    May i ask if it is a fresh install or and upgraded one, and if u used nuget for the process ?

    And least but not last, would it be posible for u to email me a copy of the solution and a db backup to me. then i would gladly digg into it directly in your solution. (if it is duable we can talk about the things u should obfuscate over mail)

    Or maybe i could get you to boot up a clean umbraco 7.3.1 from nuget (just use SQL CE), Ensure you can update and create stylesheets and views. and then install the package via nuget and see what is happening ? if that is not working i could get that website to debug in

    //Regards Troels Larsen //Sry for the issues i have caused your websites

  • Stefano Beretta 101 posts 246 karma points
    Nov 19, 2015 @ 08:51
    Stefano Beretta
    0

    Hi! Thank you for your reply!

    I would give you directly the solution+db but I can't (my agency doesn't let me). But I can tell you some more specific information.

    The project (using sql server) has been updated 7.2.8->7.3.0->7.3.1 and has some packages installed (and updated):

    • diplo tarce log
    • switcher
    • core property value converter
    • spectrum color picker
    • archetype
    • epiphany seo metadata
    • giber linkpicker
    • gmd icon pack
    • robots meta

    The packages which are on nuget have been installed from nuget, the others form the developer section inside umbraco.

    Maybe Veronica can list her installed packages, so we can make a cross-check and maybe find the interference.

    I tried to install Zippy both form the backoffice and from nuget but I had the same behaviour.

    Anyway I'm gonna start a new project today. Zippy will be the first package and after that all the other, so we'll see if the problem is a package conflict. I'll let you know :D

    Thank you so much Best regards!

    S

  • Stefano Beretta 101 posts 246 karma points
    Nov 19, 2015 @ 09:48
    Stefano Beretta
    0

    Here I am! :D

    Error replicated... No packages conflict (luckly?).

    Here the steps:

    1 - create the new sln and "mvc empty project" in vs 2013 (New project -> Templates -> Visual c# -> Web -> Visual Studio 2012 -> ASP.NET MVC4 Web Application) and the database (sql server 2008)

    2 - install umbraco from nuget

    3 - enable "nuget package restore on build"

    4 - build&run

    5 - umbraco wizard install (configuring a sql server connection string and no starter kit)

    6 - install ZippyMI from nuget

    7 - build&refresh browser

    8 - create a stylesheet from umbraco settings

    9 - try to create a sub style and get the same error (same thing for partials into subfolder)

    At this point I don't think you need a copy of the solution+db, but I'm gonna keep one zip for you anyway :D

    BR

    Stefano

  • Troels Larsen 75 posts 280 karma points
    Nov 19, 2015 @ 10:36
    Troels Larsen
    0

    and u installed version 7.3.1 ?

  • Stefano Beretta 101 posts 246 karma points
    Nov 19, 2015 @ 10:38
    Stefano Beretta
    0

    Yes :)

  • Troels Larsen 75 posts 280 karma points
    Nov 19, 2015 @ 10:43
    Troels Larsen
    0

    And it all worked before u installed the zippy media package ?

    Cause i still dont think that my package can impact u solution in the stylesheet section :)

    i think your problem is that u use a mvc4 website and then u ask umbraco to update your mvc to version 5 and your webapi to version 2, And somewhere in that process u get er wrong ref to http.Net.Formating

    can i see your test project ?

  • Troels Larsen 75 posts 280 karma points
    Nov 24, 2015 @ 08:29
    Troels Larsen
    0

    did some more debugging last night and it turns out i get and error when creating a partial view in a sub folder on a fresh 7.3.1

    NullReferenceException: Object reference not set to an instance of an object.]
       Umbraco.Web.UI.Umbraco.Settings.Views.EditView.OnLoad(EventArgs e) +888
       System.Web.UI.Control.LoadRecursive() +54
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772
    

    I creates the file but and i can browse it after a refresh. Ill keep u posted

  • Marcin Zajkowski 112 posts 585 karma points MVP 6x c-trib
    Jan 11, 2016 @ 23:01
    Marcin Zajkowski
    0

    This bug is also related with converting NodeId to Integer. As the Stylesheets IDs are just a names of CSS files it's breaking on Convert.ToInt32() method. My fix is solving the problem -> https://github.com/Pumpin/ZippyMedia/pull/3 :) The package is awesome BTW!

  • Troels Larsen 75 posts 280 karma points
    Feb 15, 2016 @ 19:39
    Troels Larsen
    0

    Hey Veronica and Stefano

    Sry for the wait, but the issues should be fixed now. thx to Marcin.

Please Sign in or register to post replies

Write your reply to:

Draft