Cookies not working on subpanels if you set a subpanel to be closed/openned will always change back to default
Store the current state in cookies
Not storing the current state in cookies
on include/SubPanel/tpls/SubPanelTiles.tpl
Line 25 : where you see
<script>document.getElementById("subpanel_{$subpanel_tab}" ).cookie_name="{$subpanel_tab.cookie_name}";</script>
change to:
<script>document.getElementById("subpanel_{$subpanel_tab}" ).cookie_name="{$subpanel_tabs_properties.$i.cookie_name}";</script>
Just acess any page that has subpanels.
Just a visual correction.
low
@leozanutto , the SuiteCRM doesn't have mentioned by you functionality. Only functionality it have is collapsed sub-panels under System settings. However thanks for suggest this improvement, it may be consider as nice addition in the future.
@shogunpol at least in SugarCRM this function was included. Subpanelstates were saved in the cookie. At one point this function did break. so its not a feature request, but a regression bug.
@shogunpol It was working before the 7.7.6 update, breaked after that. Before you dind't have a subpanel template "include/SubPanel/tpls/SubPanelTiles.tpl" was a code generated and worked fine. So I think its a fix. All the code is there it's just a bad named variable.
The fix by leozanutto does work for me.
@gunnicom I tried the fix in your PR but it's not working for me...
This is how I'm testing:
Is this it, or am I doing something wrong in the test? Thanks.
I only use 7.8.x as 7.9 is useless for me without a usable theme.
So i can only say that this is working for 7.8.x
Did you checked the config_override.php
$sugar_config['hide_subpanels_on_login'] = true;
$sugar_config['hide_subpanels'] = false;
if $sugar_config['hide_subpanels'] = true; this will override the cookie info.
Ok, so I checked on my test system which currently runs 7.8.0beta, with SuiteR theme, and the bug is there, and this fix solves it.
Now I would love to know how to fix this for SuiteP... maybe @daniel-samson could give us a hand here...
I think this makes a significant difference for everyday usage, so it would be nice to fix and merge as soon as possible.
Dont hurry, this issue including fix is only 6 month old ;)
@Dillon-Brown did this fix work for you in SuiteP? Or is it just a SuiteR fix? I am in favor of merging anyway, it's better to have a fix from one theme than for none. But it would be nice to solve this for SuiteP also... thanks!
Most helpful comment
Dont hurry, this issue including fix is only 6 month old ;)