I've successfully installed the Tab Hider and it seems great. I've hidden some tabs from some user groups.
The only trouble is that when one of those users edits the tabs they ARE able to see and then saves and publishes the page, the contents of the hidden tab (specifically using the media picker) are cleared.
Anyone have any ideas why this might be, or how to fix it?
Is it the standard media picker that you're using or one of the ones from the projects section (eg the uComponents node picker)? If you can let me know, I'll have a look and see if I can work out what's going on!
I've run tests with all of the built in DataTypes (haven't tested any of the third party ones from the package repository).
It looks like all of the pickers (media, content, members) and the true/false datatype have issues when they're hidden and lose their values. All of the other datatypes can be hidden fine, with no problems.
The issue with the true/false is because the value of the field is set in the render method of the DataType, and as the tab the control is in is hidden, it doesn't get rendered, so the value is never set.
The pickers are more complicated, as they use all sorts of Javascript, but I think the problem is essentially the same (the source in codeplex is down, so I'm checking against an older version of the site code, so not 100% on this one), in that the control doesn't get its value set properly, because it isn't being rendered out to the browser.
As both of these issues are due to the core code, there's not a great deal I can do to fix them. I might be able to create a patched version of the umbraco.usercontrols dll when the source is back up (but that would cause problems if you ever want to upgrade), but I will try and submit a patch to the core to fix the issues once the source control is back up.
I've had a look and I can hide the tabs using just client side JS rather than on the server side, but that will mean that any validation that is on the hidden tab (such as required fields) will be fired, so the user will be told about an error in a tab they don't have access to. If that's not a problem, let me know, and I'll add a config option to the package so that you can switch between server and client side disabling (it'll be tonight though, as I don't have the up to date source on the laptop I'm on at the moment).
Update: looks like I've found a way to kill the validators as well on the disabled tab (will add a config flag to make that optional), will let you know tonight as soon as I've finished the new version and got it up here!
Righty, I have updated the DLL to use client side hiding instead of server side, which avoids the problem with the missing values. I've also added some extra bits as well (see the project page for full details). You can download the latest version (1.2) from the project page. Let me know if that works!
I've installed the new version and that now seems to do the trick - many thanks.
I'll test a bit more later, and I'm going through this with my client later today - I don't expect any issues from what I've seen so far, but will let you know if there are any!
Settings on hidden tabs are deleted
I've successfully installed the Tab Hider and it seems great. I've hidden some tabs from some user groups.
The only trouble is that when one of those users edits the tabs they ARE able to see and then saves and publishes the page, the contents of the hidden tab (specifically using the media picker) are cleared.
Anyone have any ideas why this might be, or how to fix it?
Thanks
Allan
Is it the standard media picker that you're using or one of the ones from the projects section (eg the uComponents node picker)? If you can let me know, I'll have a look and see if I can work out what's going on!
:)
Thanks Tim. It's the standard media picker.
Thanks! I'll have a look and see if I can replicate that and see what the issue is. What version of Umbraco are you using?
It's version 4.5.2. I'm due to be handing a site over to a client tomorrow, so any help with getting this fixed asap would be greatly appreciated.
Many thanks
Allan
No problems, I'm at work in a clients office today, will have a look if I get a spare five minutes, otherwise, I'll look into this tonight for you!
:)
Hi Allan,
I've run tests with all of the built in DataTypes (haven't tested any of the third party ones from the package repository).
It looks like all of the pickers (media, content, members) and the true/false datatype have issues when they're hidden and lose their values. All of the other datatypes can be hidden fine, with no problems.
The issue with the true/false is because the value of the field is set in the render method of the DataType, and as the tab the control is in is hidden, it doesn't get rendered, so the value is never set.
The pickers are more complicated, as they use all sorts of Javascript, but I think the problem is essentially the same (the source in codeplex is down, so I'm checking against an older version of the site code, so not 100% on this one), in that the control doesn't get its value set properly, because it isn't being rendered out to the browser.
As both of these issues are due to the core code, there's not a great deal I can do to fix them. I might be able to create a patched version of the umbraco.usercontrols dll when the source is back up (but that would cause problems if you ever want to upgrade), but I will try and submit a patch to the core to fix the issues once the source control is back up.
I've had a look and I can hide the tabs using just client side JS rather than on the server side, but that will mean that any validation that is on the hidden tab (such as required fields) will be fired, so the user will be told about an error in a tab they don't have access to. If that's not a problem, let me know, and I'll add a config option to the package so that you can switch between server and client side disabling (it'll be tonight though, as I don't have the up to date source on the laptop I'm on at the moment).
Update: looks like I've found a way to kill the validators as well on the disabled tab (will add a config flag to make that optional), will let you know tonight as soon as I've finished the new version and got it up here!
:)
Great - that all sounds excellent. Thanks Tim!
Righty, I have updated the DLL to use client side hiding instead of server side, which avoids the problem with the missing values. I've also added some extra bits as well (see the project page for full details). You can download the latest version (1.2) from the project page. Let me know if that works!
:)
Hi Tim,
I've installed the new version and that now seems to do the trick - many thanks.
I'll test a bit more later, and I'm going through this with my client later today - I don't expect any issues from what I've seen so far, but will let you know if there are any!
Thanks again for your speedy fix.
Allan
is working on a reply...