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§ion=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?
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.
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.
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.
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 }
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:
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:
is a 500 Internal Server Error response with the following JSON content:
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.
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
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:
Without that fix, the Exception is thrown at GetRelations function in RelationsController class:
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.
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.
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.
OK, no worries.
Thanks for solving it, though. :)
You made it, thanks. :)
It's officially included in next release.
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:
Regards and thanks for your job
Hi,
can you tell an estimated date when we can expect a new version for Umbraco 7.3.x?
Thanks, Regards Andreas
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.
is working on a reply...