Custom contribution in Studio UI is not updating
This is related to a question I posted a few weeks ago, https://answers.nuxeo.com/general/q/2b7e0103f3a84092af278beb46e2dbbf/Can-I-hide-Empty-Trash-from-some-users. We wanted to hide the “Empty Trash” button from everyone that is not an admin. The solution was great until we realized that users with manage permission could still see the button. We changed our filter, we are currently trying this:
<nuxeo-slot-content name="hardDeleteSelectionAction" slot="TRASH_RESULTS_SELECTION_ACTIONS" order="20"> <template> <nuxeo-filter document="[[document]]" permission="Everything" user="[[user]]"> <template> <nuxeo-delete-documents-button documents="[[selectedItems]]" hard></nuxeo-delete-documents-button> </template> </nuxeo-filter> </nuxeo-slot-content>
But we can't get our changes to reflect locally. We have tried to filter to users with ReadWrite as a test and it still didn't change, users with manage could still see the button and when we changed them to edit they couldn't see the button. We tried removing the code entirely and we had the same results. We figure something is cached or somehow stuck but we don't know what to do to get our changes to reflect. Any help on knocking something loose so we can see our changes?
So yes, that's typically something related to cache. Personally, I recommend Clear Cache chrome extension (https://chrome.google.com/webstore/detail/clear-cache/cppjkneekbjaeellbfkmgnhonkkjfpdn?hl=en). It also exists in FF. In the settings, just keep selected:
- App Cache
BTW, you can add multiple entries on a filter for a slot contribution :
<nuxeo-filter document="[[document]]" permission="Everything,ReadWrite" user="[[user]]">
It will work.
Here are some things that you can try to get the update unstuck.
1) Check the nxserver/bundles folder for duplicate JARs of your nuxeo package. I have often had issues where Nuxeo's reload mechanism leaves an old package in there from another branch. 2) Completly uninstall the package and reinstall from the command line 3) Make a completely separate change and see if that shows up. This is more of a sanity check