Built-In Property 'User' Not Working
Permalink
I am having issues with Concrete5's Build-In 'User' Property on the composer form for new pages. When clicking "Select User" the page navigates to . But that page is completely blank.
When you go into the attributes tab and click "Select User" under "Author" it also has the URL, but instead of reopening the page, it launches the user selector within the current page. This, I believe, is accomplished using the following JavaScript:
The 'User' option in the Composer has very similar JavaScript associated with it, replacing only the selectors.
I can't find anything that is keeping the functionality form working as expected on the Composer section, like it does on the Attributes section when creating a new page.
Has anyone else run into this or have any ideas on what might be the problem?
http://website.com/ccm/system/dialogs/user/search
When you go into the attributes tab and click "Select User" under "Author" it also has the URL
http://website.com/ccm/system/dialogs/user/search
$(function() { $("#ccm-user-selector-uID").dialog(); $("#ccm-user-selector-uID").on('click', function() { var selector = $(this); ConcreteEvent.unsubscribe('UserSearchDialogSelectUser.core'); ConcreteEvent.subscribe('UserSearchDialogSelectUser.core', function(e, data) { var par = selector.parent().find('.ccm-summary-selected-item-label'), pari = selector.parent().find('[name=uID]'); par.html(data.uName); pari.val(data.uID); e.stopPropagation(); jQuery.fn.dialog.closeTop(); }); ConcreteEvent.subscribe('UserSearchDialogAfterSelectUser', function(e) { jQuery.fn.dialog.closeTop();
Viewing 15 lines of 18 lines. View entire code block.
The 'User' option in the Composer has very similar JavaScript associated with it, replacing only the selectors.
$(function() { $("#ccm-user-selector-ptComposer[13][user]").dialog(); $("#ccm-user-selector-ptComposer[13][user]").on('click', function() { var selector = $(this); ConcreteEvent.unsubscribe('UserSearchDialogSelectUser.core'); ConcreteEvent.subscribe('UserSearchDialogSelectUser.core', function(e, data) { var par = selector.parent().find('.ccm-summary-selected-item-label'), pari = selector.parent().find('[name=ptComposer[13][user]]'); par.html(data.uName); pari.val(data.uID); e.stopPropagation(); jQuery.fn.dialog.closeTop(); }); ConcreteEvent.subscribe('UserSearchDialogAfterSelectUser', function(e) { jQuery.fn.dialog.closeTop();
Viewing 15 lines of 18 lines. View entire code block.
I can't find anything that is keeping the functionality form working as expected on the Composer section, like it does on the Attributes section when creating a new page.
Has anyone else run into this or have any ideas on what might be the problem?
They aren't valid ID's and thus jQuery couldn't find them. A hacky solution to solve the issue was to replace lines 38 and 39 in `concrete/src/Form/Service/Widget/UserSelector.php` with
Which allows for it to search out any elements that have an ID that matches that string.