More in this section

Forums / General Discussions / Error deleting element

Error deleting element

5 posts, 0 answered
  1. Brian Crosby
    Brian Crosby avatar
    29 posts
    Registered:
    02 Jan 2006
    05 Sep 2011
    Link to this post
    I have a custom module using OpenAccess and when I try to delete an entity I get the following error:

    Invalid parameter Name
    Parameter name: paramName 
      at Telerik.Microsoft.Practices.Unity.InterceptionExtension.ParameterCollection.IndexForInputParameterName(String paramName)
       at Telerik.Microsoft.Practices.Unity.InterceptionExtension.ParameterCollection.get_Item(String parameterName)
       at Telerik.Sitefinity.Security.AuthorizationPermissionProvider.AuthorizeInput(IMethodInvocation input)
       at Telerik.Sitefinity.Security.SitefinityAuthorizationCallHandler.Invoke(IMethodInvocation input, GetNextHandlerDelegate getNext)
       at Telerik.Microsoft.Practices.Unity.InterceptionExtension.HandlerPipeline.Invoke(IMethodInvocation input, InvokeHandlerDelegate target)
       at Telerik.Microsoft.Practices.Unity.InterceptionExtension.PolicyInjectionBehavior.Invoke(IMethodInvocation input, GetNextInterceptionBehaviorDelegate getNext)
       at Telerik.Microsoft.Practices.Unity.InterceptionExtension.InterceptionBehaviorPipeline.Invoke(IMethodInvocation input, InvokeInterceptionBehaviorDelegate target)
       at DynamicModule.ns.Wrapped_OpenAccessProvider_0b89c35fd5a849edad2f6201e1d9e5a3.DeleteGroup(AdvertisementGroup group)
       at Modules.Advertisements.Data.AdvertisementsManager.DeleteGroup(Guid id) in AdvertisementsManager.cs:line 226
       at Modules.Advertisements.Web.UI.BackendAdvertisementsControl.DeleteGroup(Guid groupId) in BackendAdvertisementsControl.cs:line 1221
       at Modules.Advertisements.Web.UI.BackendAdvertisementsControl.OnAdGroupGridItemCommand(Object sender, GridCommandEventArgs e) in BackendAdvertisementsControl.cs:line 652


    The entity does not inherit from content item. It's just a plain entity.
  2. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    Registered:
    03 Nov 2014
    07 Sep 2011
    Link to this post
    Hi Brian Crosby,

    This is a very strange error, could you send us the code for your custom module so we could reproduce the problem locally?

    Kind regards,
    Lubomir Velkov
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. Travis
    Travis avatar
    86 posts
    Registered:
    15 Oct 2008
    09 Apr 2012
    Link to this post
    What was the solution to this problem? I am getting the exact same issue, but, related to a class that does inherit from the content class. It seems to only occur when attempting to delete the master item, and I do not get the error when I try to delete a temp item.
  4. Brian Crosby
    Brian Crosby avatar
    29 posts
    Registered:
    02 Jan 2006
    10 Apr 2012
    Link to this post
    I don't remember for sure what the fix was. But I think it might have been an attribute. Try removing any attributes you have on your method and see if that fixes your problem. Sorry I couldn't be more help.

    Cheers,
    Brian
  5. Travis
    Travis avatar
    86 posts
    Registered:
    15 Oct 2008
    18 Apr 2012
    Link to this post
    I fixed this issue after hearing back from Support. Basically, I just had to do a find/replace on the word "product" for the word "partner" (in this case, I based my module on the product module and my module is for "Partners"). Support specifically pointed me to the ParameterPermission Attribute that I decorated my DeletePartner method with, which I had defined as so:

    [ParameterPermission("partner", PartnersConstants.Security.PermissionSetName, PartnersConstants.Security.Delete)]
            public abstract void DeletePartner(PartnerItem partner);

    My "DeletePartner" method in my OpenAccessProvider then needed to have the attribute that is passed called "partner", whereas I had it defined as "product".

    ORIGINAL DELETE PARTNER (Doesn't work):
    public override void DeletePartner(PartnerItem product)

    NEWLY UPDATED DELETE PARTNER:
    public override void DeletePartner(PartnerItem partner)

    Once I did a find/replace in my project, it worked. Hopefully this information will be helpful to someone.
5 posts, 0 answered