Copied to clipboard

Flag this post as spam?

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


  • José A. 11 posts 31 karma points
    Oct 16, 2015 @ 12:44
    José A.
    0

    It seems it does not work anymore in Umbraco 7.3

    We were running Umbraco.RelationEditor.1.1.5550 in Umbraco 7.2.8 perfectly. We upgraded to 7.3 and since then, whenever we do 'right-click -> Edit relations' on a node all we see is a red lining text telling:

    Server error:  Contact administrator, see log for full details.
    Failed to retreive relations for content id nnnn
    

    However, there is nothing logged in UmbracoTraceLog.txt nor the Windows Eventlog nor anywere we could imagine.

    If we sniff the actual traffic bettween the web client and the server, the response we receive afther the:

    GET /umbraco/backoffice/relationseditor/relations/getrelations?parentId=1167&section=content&treeType=content HTTP/1.1
    

    is a 500 Internal Server Error response with the following JSON content:

    {"Message":"An error has occurred."}
    

    Hence, it is not an actual 500 Internal Server Error thrown by IIS itself, but an error thrown somewhere intentionally by code.

    Has someone experienced the same problem? Can someone confirm if this Project runs fine on 7.3?

    Thanks.

  • Lars-Erik Aabech 343 posts 1088 karma points MVP 4x c-trib
    Oct 16, 2015 @ 12:55
    Lars-Erik Aabech
    0

    Hi,

    Thanks for reporting this.

    I haven't dove into it yet, but I suspect it's due to some breaking change with the database schema. We use Relation Editor a lot ourselves, so I guess I'm due for an upgrade soon. Can't promise when, though.

    Lars-Erik

  • José A. 11 posts 31 karma points
    Nov 03, 2015 @ 11:34
    José A.
    0

    Hi Lars,

    Just for your information, I've downloaded your Project and set up a development scenario trying to fix it myself. I traced the problem down to the class Mappings where you declare the TreeNodeObjectTypes.

    In my case everything started working just by adding an extra new TreeNodeType("content", "content") line so that the whole TreeNodeObjectTypes reads as follows:

    public static readonly Dictionary<TreeNodeType, UmbracoObjectTypes> TreeNodeObjectTypes = new Dictionary<TreeNodeType, UmbracoObjectTypes>
    {
        { new TreeNodeType(null, null), UmbracoObjectTypes.Document },
        { new TreeNodeType("content", null), UmbracoObjectTypes.Document },
        { new TreeNodeType("content", "content"), UmbracoObjectTypes.Document }, // This is my new line
        { new TreeNodeType("media", null), UmbracoObjectTypes.Media },
        { new TreeNodeType("settings", "nodeTypes"), UmbracoObjectTypes.DocumentType },
        { new TreeNodeType("settings", "mediaTypes"), UmbracoObjectTypes.MediaType }
    };
    

    Without that fix, the Exception is thrown at GetRelations function in RelationsController class:

    if (
      !Mappings.TreeNodeObjectTypes.TryGetValue(treeNodeType, out fromType)
      || fromType == UmbracoObjectTypes.Unknown
    )
      throw new Exception("Cannot get relation types for unknown object type");
    

    because the treeNodeType that is trying to be retrieved is the kind of TreeNodeType("content", "content").

    I don't know Umbraco nor your Project as deep as being able to assure that this is the only fix and that it does not have any drawbacks elsewere. It simply does the job and I have not found any other weird behaviour with it.

    Maybe when you have time to properly fix the Project and release the next version, you can save some time and start debugging around these two classes.

    Regards.

  • Lars-Erik Aabech 343 posts 1088 karma points MVP 4x c-trib
    Nov 03, 2015 @ 11:37
    Lars-Erik Aabech
    0

    Thanks, looks good.
    I guess HQ fixed a "bug" I had worked around. :)

    Feel free to make a pull request of it.
    I'll pull it when I get the time to do another release.

  • José A. 11 posts 31 karma points
    Nov 03, 2015 @ 11:43
    José A.
    0

    I don't know how to do a pull request. I'm new to these collaborative frameworks as GitHub. I just downloaded your Project and set up everything manually to be able to debug the problem. I don't know how to upload those changes back.

    Please take this in mind as there might be no 'pull request' from me. I'll try to, but can't promise anything.

  • Lars-Erik Aabech 343 posts 1088 karma points MVP 4x c-trib
    Nov 03, 2015 @ 11:51
    Lars-Erik Aabech
    0

    OK, no worries.
    Thanks for solving it, though. :)

  • Lars-Erik Aabech 343 posts 1088 karma points MVP 4x c-trib
    Nov 03, 2015 @ 11:55
    Lars-Erik Aabech
    0

    You made it, thanks. :)

    It's officially included in next release.

  • GTona 6 posts 76 karma points
    Nov 20, 2015 @ 08:22
    GTona
    0

    Hi Lars, we are working with the fix suggested by by José A. Ther is still an issue when relations are enabled in a child document type. In this case the section parameter in GetRelations function of RelationsController class is null . We fixed this situation adding the following line of code in Mappings class:

    { new TreeNodeType(null,"content" ), UmbracoObjectTypes.Document }
    

    Regards and thanks for your job

  • Andreas Pfanner 196 posts 313 karma points
    Dec 15, 2015 @ 15:52
    Andreas Pfanner
    0

    Hi,

    can you tell an estimated date when we can expect a new version for Umbraco 7.3.x?

    Thanks, Regards Andreas

  • Lars-Erik Aabech 343 posts 1088 karma points MVP 4x c-trib
    Dec 16, 2015 @ 08:56
    Lars-Erik Aabech
    0

    Sorry, I won't give you a date. Got enough paying customers to satisfy deadlines for. ;)

    However, we'll be upgrading our own "starter site" during January/February and I'm sure RelationEditor gets upgraded along the way.

Please Sign in or register to post replies

Write your reply to:

Draft