Copied to clipboard

Flag this post as spam?

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


  • Roman 9 posts 79 karma points
    Apr 14, 2015 @ 18:24
    Roman
    0

    Umbraco Relation Editor breaks fresh mint Umbraco 7.2.5 build

    How to reproduce:

    1) Download Umbraco 7.2.5 source code from https://github.com/umbraco/Umbraco-CMS/.

    2) Run as an administrator command 'build.bat' under Windows 8 x64.

    3) Run VS 2013 as an administrator and open umbraco.sln.

    4) Open Package Manager Console, enter command:

    Each package is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party
    packages. Some packages may include dependencies which are governed by
    additional licenses. Follow the package source (feed) URL to determine
    any dependencies.
    
    Package Manager Console Host Version 2.8.60318.734
    
    Type 'get-help NuGet' to see all available NuGet commands.
    
    PM> Install-Package Umbraco.RelationEditor
    
    Attempting to resolve dependency 'UmbracoCms.Core (≥ 7.0.2)'.
    
    Attempting to resolve dependency 'Microsoft.AspNet.Mvc (≥ 4.0.0 && < 5.0.0)'.
    
    Attempting to resolve dependency 'Microsoft.AspNet.WebPages (≥ 2.0.20710.0)'.
    
    Attempting to resolve dependency 'Microsoft.Web.Infrastructure (≥ 1.0.0.0)'.
    
    Attempting to resolve dependency 'Microsoft.AspNet.Razor (≥ 2.0.20710.0)'.
    
    Attempting to resolve dependency 'Microsoft.AspNet.WebApi (≥ 4.0.0 && < 5.0.0)'.
    
    Attempting to resolve dependency 'Microsoft.AspNet.WebApi.WebHost (≥ 4.0.20710.0)'.
    
    Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Core (≥ 4.0.20710.0)'.
    
    Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Client (≥ 4.0.20710.0)'.
    
    Attempting to resolve dependency 'Microsoft.Net.Http (≥ 2.0.20710.0)'.
    
    Attempting to resolve dependency 'Newtonsoft.Json (≥ 4.5.6)'.
    
    Attempting to resolve dependency 'Microsoft.AspNet.Mvc.FixedDisplayModes (≥ 1.0.0)'.
    
    Attempting to resolve dependency 'MiniProfiler (≥ 2.1.0 && < 3.0.0)'.
    
    Attempting to resolve dependency 'HtmlAgilityPack (≥ 1.4.6 && < 2.0.0)'.
    
    Attempting to resolve dependency 'Lucene.Net (≥ 2.9.4.1 && < 3.0.0.0)'.
    
    Attempting to resolve dependency 'SharpZipLib (≥ 0.86.0)'.
    
    Attempting to resolve dependency 'MySql.Data (= 6.6.5)'.
    
    Attempting to resolve dependency 'xmlrpcnet (≥ 2.5.0 && < 3.0.0)'.
    
    Attempting to resolve dependency 'ClientDependency-Mvc (≥ 1.7.0 && < 2.0.0)'.
    
    Attempting to resolve dependency 'ClientDependency (≥ 1.8)'.
    
    Attempting to resolve dependency 'AutoMapper (≥ 3.0.0 && < 4.0.0)'.
    
    Attempting to resolve dependency 'Newtonsoft.Json (≥ 4.5.11 && < 5.0.0)'.
    
    Install-Package : Already referencing a newer version of
    'Newtonsoft.Json'. At line:1 char:1
    + Install-Package Umbraco.RelationEditor
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
        + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
    

    5) Try to downgrade Newtonsoft.Json version:

    PM> Install-Package Newtonsoft.Json -Version 4.5.11
    
    Updating 'Newtonsoft.Json' from version '6.0.4' to '4.5.11' in project 'Umbraco.Web.UI'.
    
    Removing 'Newtonsoft.Json 6.0.4' from Umbraco.Web.UI.
    
    Successfully removed 'Newtonsoft.Json 6.0.4' from Umbraco.Web.UI.
    
    Adding 'Newtonsoft.Json 4.5.11' to Umbraco.Web.UI.
    
    Installing 'Newtonsoft.Json 4.5.11'.
    
    Successfully installed 'Newtonsoft.Json 4.5.11'.
    
    Successfully added 'Newtonsoft.Json 4.5.11' to Umbraco.Web.UI.
    

    6) Try installing RelationEditor again:

    PM> Install-Package Umbraco.RelationEditor
    
    Attempting to resolve dependency 'UmbracoCms.Core (≥ 7.0.2)'.
    
    Attempting to resolve dependency 'Microsoft.AspNet.Mvc (≥ 4.0.0 && < 5.0.0)'.
    
    Attempting to resolve dependency 'Microsoft.AspNet.WebPages (≥ 2.0.20710.0)'.
    
    Attempting to resolve dependency 'Microsoft.Web.Infrastructure (≥ 1.0.0.0)'.
    
    Attempting to resolve dependency 'Microsoft.AspNet.Razor (≥ 2.0.20710.0)'.
    
    Attempting to resolve dependency 'Microsoft.AspNet.WebApi (≥ 4.0.0 && < 5.0.0)'.
    
    Attempting to resolve dependency 'Microsoft.AspNet.WebApi.WebHost (≥ 4.0.20710.0)'.
    
    Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Core (≥ 4.0.20710.0)'.
    
    Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Client (≥ 4.0.20710.0)'.
    
    Attempting to resolve dependency 'Microsoft.Net.Http (≥ 2.0.20710.0)'.
    
    Attempting to resolve dependency 'Newtonsoft.Json (≥ 4.5.6)'.
    
    Attempting to resolve dependency 'Microsoft.AspNet.Mvc.FixedDisplayModes (≥ 1.0.0)'.
    
    Attempting to resolve dependency 'MiniProfiler (≥ 2.1.0 && < 3.0.0)'.
    
    Attempting to resolve dependency 'HtmlAgilityPack (≥ 1.4.6 && < 2.0.0)'.
    
    Attempting to resolve dependency 'Lucene.Net (≥ 2.9.4.1 && < 3.0.0.0)'.
    
    Attempting to resolve dependency 'SharpZipLib (≥ 0.86.0)'.
    
    Attempting to resolve dependency 'MySql.Data (= 6.6.5)'.
    
    Attempting to resolve dependency 'xmlrpcnet (≥ 2.5.0 && < 3.0.0)'.
    
    Attempting to resolve dependency 'ClientDependency-Mvc (≥ 1.7.0 && < 2.0.0)'.
    
    Attempting to resolve dependency 'ClientDependency (≥ 1.8)'.
    
    Attempting to resolve dependency 'AutoMapper (≥ 3.0.0 && < 4.0.0)'.
    
    Installing 'UmbracoCms.Core 7.0.2'.
    
    Successfully installed 'UmbracoCms.Core 7.0.2'.
    
    Installing 'Umbraco.RelationEditor 1.1.5550.28992'.
    
    Successfully installed 'Umbraco.RelationEditor 1.1.5550.28992'.
    
    Adding 'HtmlAgilityPack 1.4.6' to Umbraco.Web.UI.
    
    Successfully added 'HtmlAgilityPack 1.4.6' to Umbraco.Web.UI.
    
    Adding 'xmlrpcnet 2.5.0' to Umbraco.Web.UI.
    
    Successfully added 'xmlrpcnet 2.5.0' to Umbraco.Web.UI.
    
    Adding 'UmbracoCms.Core 7.0.2' to Umbraco.Web.UI.
    
    Successfully added 'UmbracoCms.Core 7.0.2' to Umbraco.Web.UI.
    
    Adding 'Umbraco.RelationEditor 1.1.5550.28992' to Umbraco.Web.UI.
    
    Successfully added 'Umbraco.RelationEditor 1.1.5550.28992' to Umbraco.Web.UI.
    

    7) Run Build from VS. Get these errors:

    Error 27  Cannot convert lambda expression to type 'string' because it is not a delegate
    type  F:\DEV\src\Umbraco.Web.UI\Umbraco\Controls\ContentTypeControlNew.ascx.cs    29  95  Umbraco.Web.UI
    
    Error 28  'Umbraco.Web.Editors.ContentTypeController' does not contain a definition for 'GetAssignedListViewDataType' and no
    extension method 'GetAssignedListViewDataType' accepting a first
    argument of type 'Umbraco.Web.Editors.ContentTypeController' could be
    found (are you missing a using directive or an assembly
    reference?)   F:\DEV\src\Umbraco.Web.UI\Umbraco\Controls\ContentTypeControlNew.ascx.cs    29  102 Umbraco.Web.UI
    
    Error 29  'Umbraco.Core.Services.FileService' does not contain a definition for 'GetPartialViewSnippetNames' and no extension method
    'GetPartialViewSnippetNames' accepting a first argument of type
    'Umbraco.Core.Services.FileService' could be found (are you missing a
    using directive or an assembly
    reference?)   F:\DEV\src\Umbraco.Web.UI\Umbraco\Create\PartialViewMacro.ascx.cs   31  40  Umbraco.Web.UI
    
    Error 30  'Umbraco.Core.Security.MembershipProviderExtensions' does not contain a definition for
    'GetUsersMembershipProvider'  F:\DEV\src\Umbraco.Web.UI\Umbraco\Create\User.ascx.cs   31  71  Umbraco.Web.UI
    
    Error 31  'Umbraco.Core.Services.FileService' does not contain a definition for 'GetPartialViewSnippetNames' and no extension method
    'GetPartialViewSnippetNames' accepting a first argument of type
    'Umbraco.Core.Services.FileService' could be found (are you missing a
    using directive or an assembly
    reference?)   F:\DEV\src\Umbraco.Web.UI\Umbraco\Create\PartialView.ascx.cs    32  40  Umbraco.Web.UI
    
    Error 35  'Umbraco.Core.Security.MembershipProviderExtensions' does not contain a definition for
    'GetUsersMembershipProvider'  F:\DEV\src\Umbraco.Web.UI\Umbraco\Create\User.ascx.cs   49  71  Umbraco.Web.UI
    

    Additional info:

    Comparison of installed nuget packages of fresh Umbraco install and after described operations:

    a) fresh install:

    Id                                     Version        
    --                                     -------        
    AspNetWebApi.SelfHost                  4.0.20710.0    
    AutoMapper                             3.0.0          
    ClientDependency                       1.8.3.1        
    ClientDependency-Mvc                   1.8.0.0        
    dotless                                1.4.1.0        
    Examine                                0.1.62.2941    
    HtmlAgilityPack                        1.4.6          
    ImageProcessor                         1.9.5.0        
    ImageProcessor.Web                     3.3.1.0        
    log4net-mediumtrust                    2.0.0          
    Lucene.Net                             2.9.4.1        
    Microsoft.ApplicationBlocks.Data       1.0.1559.20655 
    Microsoft.AspNet.Mvc                   4.0.30506.0    
    Microsoft.AspNet.Mvc.FixedDisplayModes 1.0.1          
    Microsoft.AspNet.Razor                 2.0.30506.0    
    Microsoft.AspNet.WebApi                4.0.30506.0    
    Microsoft.AspNet.WebApi.Client         4.0.30506.0    
    Microsoft.AspNet.WebApi.Core           4.0.30506.0    
    Microsoft.AspNet.WebApi.SelfHost       4.0.30506.0    
    Microsoft.AspNet.WebApi.WebHost        4.0.30506.0    
    Microsoft.AspNet.WebPages              2.0.30506.0    
    Microsoft.Bcl                          1.1.9          
    Microsoft.Bcl.Async                    1.0.165        
    Microsoft.Bcl.Build                    1.0.14         
    Microsoft.Net.Http                     2.0.20710.0    
    Microsoft.Net.Http                     2.2.22         
    Microsoft.Web.Infrastructure           1.0.0.0        
    MiniProfiler                           2.1.0          
    Moq                                    4.1.1309.0919  
    MySql.Data                             6.6.5          
    Newtonsoft.Json                        6.0.4          
    Node.js                                0.10.21        
    Npm.js                                 1.3.15.10      
    NUnit                                  2.6.2          
    Selenium.WebDriver                     2.32.0         
    SharpZipLib                            0.86.0         
    SqlServerCE                            4.0.0.0        
    Tidy.Net                               1.0.0          
    UrlRewritingNet.UrlRewriter            2.0.60829.1    
    xmlrpcnet                              2.5.0
    

    b) after described operations:

    PM> Get-Package | Format-Table -AutoSize
    
    Id                                     Version        
    --                                     -------        
    AspNetWebApi.SelfHost                  4.0.20710.0    
    AutoMapper                             3.0.0          
    ClientDependency                       1.8.3.1        
    ClientDependency-Mvc                   1.8.0.0        
    dotless                                1.4.1.0        
    Examine                                0.1.62.2941    
    HtmlAgilityPack                        1.4.6          
    ImageProcessor                         1.9.5.0        
    ImageProcessor.Web                     3.3.1.0        
    log4net-mediumtrust                    2.0.0          
    Lucene.Net                             2.9.4.1        
    Microsoft.ApplicationBlocks.Data       1.0.1559.20655 
    Microsoft.AspNet.Mvc                   4.0.30506.0    
    Microsoft.AspNet.Mvc.FixedDisplayModes 1.0.1          
    Microsoft.AspNet.Razor                 2.0.30506.0    
    Microsoft.AspNet.WebApi                4.0.30506.0    
    Microsoft.AspNet.WebApi.Client         4.0.30506.0    
    Microsoft.AspNet.WebApi.Core           4.0.30506.0    
    Microsoft.AspNet.WebApi.SelfHost       4.0.30506.0    
    Microsoft.AspNet.WebApi.WebHost        4.0.30506.0    
    Microsoft.AspNet.WebPages              2.0.30506.0    
    Microsoft.Bcl                          1.1.9          
    Microsoft.Bcl.Async                    1.0.165        
    Microsoft.Bcl.Build                    1.0.14         
    Microsoft.Net.Http                     2.0.20710.0    
    Microsoft.Net.Http                     2.2.22         
    Microsoft.Web.Infrastructure           1.0.0.0        
    MiniProfiler                           2.1.0          
    Moq                                    4.1.1309.0919  
    MySql.Data                             6.6.5          
    Newtonsoft.Json                        4.5.11         
    Newtonsoft.Json                        6.0.4          
    Node.js                                0.10.21        
    Npm.js                                 1.3.15.10      
    NUnit                                  2.6.2          
    Selenium.WebDriver                     2.32.0         
    SharpZipLib                            0.86.0         
    SqlServerCE                            4.0.0.0        
    Tidy.Net                               1.0.0          
    Umbraco.RelationEditor                 1.1.5550.28992 
    UmbracoCms.Core                        7.0.2          
    UrlRewritingNet.UrlRewriter            2.0.60829.1    
    xmlrpcnet                              2.5.0          
    
    
    PM>
    

    More additional info:

    References of Umbraco.Web.UI project after fresh install:

    enter image description here

    References after installing Relation Editor:

    enter image description here

    If I try to bring them back, I get this error on some of these:

    enter image description here

    So only these could be returned:

    enter image description here

    And finally thiese erorrs:

    Error 29  An assembly with the same simple name 'businesslogic, Version=1.0.5133.26610, Culture=neutral, PublicKeyToken=null has
    already been imported. Try removing one of the references or sign them
    to enable
    side-by-side. f:\DEV\src\packages\UmbracoCms.Core.7.0.2\lib\businesslogic.dll Umbraco.Web.UI
    
    Error 30  An assembly with the same simple name 'cms, Version=1.0.5133.26611, Culture=neutral, PublicKeyToken=null has
    already been imported. Try removing one of the references or sign them
    to enable
    side-by-side. f:\DEV\src\packages\UmbracoCms.Core.7.0.2\lib\cms.dll   Umbraco.Web.UI
    
    Error 31  An assembly with the same simple name 'controls, Version=1.0.5133.26613, Culture=neutral, PublicKeyToken=null has
    already been imported. Try removing one of the references or sign them
    to enable
    side-by-side. f:\DEV\src\packages\UmbracoCms.Core.7.0.2\lib\controls.dll  Umbraco.Web.UI
    
    Error 32  An assembly with the same simple name 'interfaces, Version=1.0.5133.26607, Culture=neutral, PublicKeyToken=null has
    already been imported. Try removing one of the references or sign them
    to enable
    side-by-side. f:\DEV\src\packages\UmbracoCms.Core.7.0.2\lib\interfaces.dll    Umbraco.Web.UI
    
    Error 33  An assembly with the same simple name 'umbraco, Version=1.0.5133.26615, Culture=neutral, PublicKeyToken=null has
    already been imported. Try removing one of the references or sign them
    to enable
    side-by-side. f:\DEV\src\packages\UmbracoCms.Core.7.0.2\lib\umbraco.dll   Umbraco.Web.UI
    

    Pleease let me know how I can fix this, I need to be able to edit relations in backoffice really bad.

    Umbraco 7.2.5. Windows 8.1 x64 IIS 8.5 VS 2013

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 14, 2015 @ 21:28
    Jan Skovgaard
    0

    Hi Roman

    May I ask why you're downloading and compiling Umbraco directly from the source code? What is the purpose? I don't think you can trust what you get when you're doing a 7.2.5 installation since it's not stable yet - According to https://our.umbraco.org/download It's only 59% done and scheduled for release next thursday :)

    So that might be the issue - So maybe it's worth trying to see if this happens on a fresh installation of 7.2.4 a well?

    /Jan

  • Lars-Erik Aabech 349 posts 1100 karma points MVP 7x c-trib
    Apr 14, 2015 @ 21:57
    Lars-Erik Aabech
    100

    Hi,

    First of all, I'm really sorry (and embarrased) that stuff hit you. There's a new version without dependencies on nuget now. Try installing 1.1.5582.37466 .

    However, I really recommend using Umbraco via nuget too, as @Jan is hinting at. :)

    Lars-Erik

  • Roman 9 posts 79 karma points
    Apr 15, 2015 @ 14:04
    Roman
    0

    Hi, Jan and Lars-Erik!

    Thank you for your answers.

    Jan, I started using Umbraco usual way - with binaries. But after some time I stuck into one problem - I wanted to know from razor template, when I rendered site navigation bar, whether or not this page has "list-view-enabled" property set to True. So in backoffice its children aren't displayed in the tree, but in a pretty table in the body of page. So I wanted to do same thing on frontend, and I didn't know how. I posted a quiestion and got no answer, so I had the only choice - dig into the code and understand how umbraco backend itself does it. More about it here: https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/63340-How-to-know-is-current-document-list-view-enabled

    Another thing - I needed to have blur functionality, which Umbraco has, having the ImageProcessor library inside. But it's blur is terrible (on the left):

    enter image description here enter image description here

    Especially compared to ImageMagick's blur (on the right). And this effect can be seen on these little pictures, imagine what I had on full-screen images my website has.

    So I deleted ImageProcessor binaries from Umbraco, downloaded source code, added it to Umbraco solution, installed Magick.NET-Q16-AnyCPU from Nuget to ImageProcessor project and replaced some code to another:

        /// <summary>
        /// Processes the image.
        /// </summary>
        /// <param name="factory">The current instance of the <see cref="T:ImageProcessor.ImageFactory" /> class containing
        /// the image to process.</param>
        /// <returns>
        /// The processed image from the current instance of the <see cref="T:ImageProcessor.ImageFactory" /> class.
        /// </returns>
        public Image ProcessImage(ImageFactory factory)
        {
            // MY EDIT: 
    
            // Size IS ONLY USED
            // Sigma IS IGNORED
            // Threshold IS IGNORED
    
            Bitmap image = (Bitmap)factory.Image;
            ImageConverter converter = new ImageConverter();
            System.Diagnostics.Debug.WriteLine("Started converting");
            byte[] imageBytes = (byte[])converter.ConvertTo(image, typeof(byte[]));
            System.Diagnostics.Debug.WriteLine("Converting done");
            image.Dispose();
            System.Diagnostics.Debug.WriteLine("Dispose done");
    
            try
            {
                using (MagickImage IMImage = new MagickImage(imageBytes))
                {
                    System.Diagnostics.Debug.WriteLine("IMImage created");
                    GaussianLayer gaussianLayer = this.DynamicParameter;
                    double size = gaussianLayer.Size;
                    double radius = size * 2.5;
                    System.Diagnostics.Debug.WriteLine("size: " + size + " radius: " + radius);
                    IMImage.Blur(radius, size);
                    System.Diagnostics.Debug.WriteLine("Blur done");
                    imageBytes = IMImage.ToByteArray();
                    System.Diagnostics.Debug.WriteLine("To byte array done");
                    image = (Bitmap)(converter.ConvertFrom(imageBytes));
                    System.Diagnostics.Debug.WriteLine("Convert from bytes to Bitmap done");
                }
    
            }
            catch (Exception ex)
            {
                throw new ImageProcessingException("Error processing image with " + this.GetType().Name, ex);
            }
    
            return image;
    
    
            // OLD THING
    /*
            Bitmap image = (Bitmap)factory.Image;
            Bitmap newImage = null;
    
            try
            {
                newImage = new Bitmap(image);
                GaussianLayer gaussianLayer = this.DynamicParameter;
    
                Convolution convolution = new Convolution(gaussianLayer.Sigma) { Threshold = gaussianLayer.Threshold };
                double[,] kernel = convolution.CreateGuassianBlurFilter(gaussianLayer.Size);
                newImage = convolution.ProcessKernel(newImage, kernel);
    
                image.Dispose();
                image = newImage;
            }
            catch (Exception ex)
            {
                if (newImage != null)
                {
                    newImage.Dispose();
                }
    
                throw new ImageProcessingException("Error processing image with " + this.GetType().Name, ex);
            }
    
            return image;
    */
        }
    

    And finally I got this blur which is high-quality AND 6 TIMES FASTER. This operation doesn't require having Umbraco sources itself, but it's just to show why I need to have source code - sometimes it's the only way to get your job done. Expecting situations like this to come in future I decided to primarily use source code instead of binaries. One more thing - I thought 7.2.5 was stable :) Thats my mistake. But that wasn't the reason here.

    Lars-Erik, I installed 1.1.5582.37466 just like you said and it worked on Umbraco sources 7.2.5 like a charm! Thanks for this great project!

  • James Jackson-South 489 posts 1747 karma points c-trib
    Nov 06, 2015 @ 01:14
    James Jackson-South
    1

    Hi Roman,

    It would have been really useful if, instead of saying the blur is terrible on an unrelated forum, you had actually been a responsible developer and come to me on the ImageProcessor github page and raised an issue.

    Your approach isn't particularly helpful to anyone else and doesn't really demonstrate a need for the source code.

    You could have had it sorted AND helped other people if you'd just got in touch.

    James

  • Sebastiaan Janssen 5045 posts 15476 karma points MVP admin hq
    Apr 16, 2015 @ 17:22
    Sebastiaan Janssen
    0

    As said: you REALLY don't want to use Umbraco from source at all, you will never be able to easily upgrade to a newer version and if there's a critical security fix you're completely on your own as we generally don't provide the code to fix a security problem for a while so that people have a chance to upgrade before the "bad guys" figure out the problem.

    Please reconsider. If you neex ImageMagick, then spend your energy on compiling a custom component for it, Umbraco has loads and loads of hooks for you to use.

    Anyway, this is just another warning that running your own highly customized build is a bad idea, do with it what you will but dont say we didn't warn you. :-)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 16, 2015 @ 18:02
    Jan Skovgaard
    0

    Hi Roman

    Perhaps image processor can help you achieve what you need? James South has written a bit about how to pre-process images here for instance http://24days.in/umbraco/2014/all-your-images-are-belong-to-umbraco/ and you can read more about it here http://imageprocessor.org/

    Hope this can be of use.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft