Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » Error when adding new group after upgrading to 9.9.x

Error when adding new group after upgrading to 9.9.x

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have just upgraded a solution from 9.8.7 to 9.9.3 and I cannot edit the Ecom Groups nor add new Ecom Groups anymore.

I get some error related to permissions.

 

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:
 

[NullReferenceException: Object reference not set to an instance of an object.]
   Dynamicweb.Admin.eComBackend.MainPermissionHelper.GetPermission(Group group, String path) +337
   Dynamicweb.Admin.eComBackend.EcomGroupEdit.GetPermission(Group group, String parentId, String path) +172
   Dynamicweb.Admin.eComBackend.EcomGroupEdit.Page_Load(Object sender, EventArgs e) +1770
   System.Web.UI.Control.OnLoad(EventArgs e) +107
   System.Web.UI.Control.LoadRecursive() +89
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1532

 

How can I fix it?

Thank you,

Adrian

Edit-group-error.png

Replies

 
Steffen Kruse Hansen Dynamicweb Employee
Steffen Kruse Hansen
Reply

Hi Adrian,

I have just tried to see if I could reproduce this on my own solution running 9.9.3, and I have no problems creating or editing Ecommerce groups.

Have you set permissions on any groups, or do you use some special GroupIds? 

Best regards,

Steffen
 

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Steffen,

On a new solution, it works without problems. That's why I mentioned the upgrade. I am wondering if something has not been updated properly.

I am using my Angel account but I do have permissions set for admins. And we are using some custom GroupID when defining groups from Integration but I also have Groups that have been added through the interface and their numbering seems in order. On the solution we have upgraded from (8.9.7) adding or editing groups manually works just fine using the same approach (admin user and add/create flow).

Anything else you can think of?

Thank you,
Adrian

 

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Steffen,

A bit more context into it.

I can Edit existing groups and I can add Subgroups to existing groups.

I cannot add top level groups.

Also, I have tried checking the permissions on the Shop (right click on the Shop and choose permissions).

And I got this error:

Specified argument was out of the range of valid values.
Parameter name: key must be between 0 and 255 characters.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: key must be between 0 and 255 characters.
Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: key must be between 0 and 255 characters.]
   Dynamicweb.Core.Ensure.That(Boolean condition, String message) +135
   Dynamicweb.Security.Permissions.UnifiedPermissionIdentifier..ctor(String key, String name, String subName) +167
   Dynamicweb.Admin.PermissionEdit.CurrentUserHasPermissions(IPermissionControlled permissionObject) +137
   Dynamicweb.Admin.PermissionEdit.Page_Load(Object sender, EventArgs e) +800
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533
 
Nicolai Pedersen
Reply

Have you enabled the new permissions?

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Yes. They were enabled before upgrading.
We have dug more into it, and apparently, there are some calls in the interface missing ShopID. The javascript calling the URLs is not getting the SHOPID

This call: /Admin/Content/Permissions/PermissionEdit.aspx?Key=&Name=Shop&SubName=&Title=Permissions%20for%20Atomico%20-%20Shop%20(11482)&AvailableLevels=&ManagementArea=Ecommerce fails

while this call: /Admin/Content/Permissions/PermissionEdit.aspx?Key=SHOP1&Name=Shop&SubName=&Title=Permissions%20for%20DecoCenter%20(173)&AvailableLevels=&ManagementArea=Ecommerce is ok

I am not sure why this is not working after the upgrade. That's why I am suspecting an incomplete update on some tables. I have rerun the updates twice already.

As a workaround, we have edited the function in "C:....\Application(9.9.3)\Admin\Module\eCom_Catalog\dw7\js\Main.js"

from:

eCommerce.SystemTree.prototype.get_showAllShops = function(){

return this.getShopFilter().toLowerCase();

}

to

eCommerce.SystemTree.prototype.get_showAllShops = function(){

return this.getShopFilter().toLowerCase() == 'all' || !this.getShopFilter();

}

But this is a temporary patch as all permissions set on the ProductCatalog will not work anymore.

Adrian

 

You must be logged in to post in the forum