Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » Error loading addin with User Selector

Error loading addin with User Selector

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

Running DW 9.2.8, I have a custom address validator that has a user selector property like this:

[AddInParameter("User group to ignore"), AddInParameterEditor(typeof(UserGroupParameterEditor), "")]
public string UserGroupToIgnore { get; set; }

When I try to configure a new instance of the provider in the management center under Order | Address Validation I get the following error:

UserSelectorSettings is not defined

            var UserSelectorUser_group_to_ignore = new UserSelectorSettings('UserSelectorDivUser_group_to_ignore', 'User_group_to_ignore', 'Nothing selected', '', '', '', '', '', false, 'UserSelectorUser_group_to_ignore', true, 'UserSelectorDivUser_group_to_ignore_Outer', false, 'User_group_to_ignorehiddenAdded', 'User_group_to_ignorehiddenRemoved', '', false, false, null, false, false); $('UserSelectorUser_group_to_ignore_btn1').observe('click', function () { UserSelectorUser_group_to_ignore.addGroup(); });$('UserSelectorUser_group_to_ignore_btnRemove').observe('click', function () { UserSelectorUser_group_to_ignore.removeUser(); });UserSelectorUser_group_to_ignore.set_uniqueID('User_group_to_ignore');
            UserSelectorUser_group_to_ignore.set_moreTextFormat('...and %% more');
            UserSelectorUser_group_to_ignore.setNoneSelected();UserSelectorUser_group_to_ignore.renderItems('','');document.getElementById('User_group_to_ignorehiddenAdded').value = '';

I can fix the issue and make the user selector work again by adding the following two lines to EcomAddressValidator_Edit.aspx in the Admin folder:

<script src="/Admin/Images/Controls/UserSelector/UserSelector.js" type="text/javascript"></script>
<script src="/Admin/Resources/js/layout/Actions.js" type="text/javascript"></script>

Can this be fixed in the core product? Also, it seems only the Scheduled Task web form has support for the user selector but I think other pages for custom add-ins, like payment and shipping, will probably need the same references.

Thanks,

Imar


Replies

 
Nicolai Pedersen
Reply

Yes, just fixed with TFS#31759 coming in a hotfix near you soon!

Thanks for the fix!

BR Nicolai

 

You must be logged in to post in the forum