Suitecrm: Cookies for subpanels not working.

Created on 6 Dec 2016  路  10Comments  路  Source: salesagility/SuiteCRM

Issue

Cookies not working on subpanels if you set a subpanel to be closed/openned will always change back to default

Expected Behavior

Store the current state in cookies

Actual Behavior

Not storing the current state in cookies

Possible Fix

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>

Steps to Reproduce

Just acess any page that has subpanels.

Context

Just a visual correction.
low

Your Environment

  • SuiteCRM Version used: 7.7.6
  • Browser name and version : Chrome Version 54.0.2840.99 m (64-bit)
  • Environment name and version : php56w, Mysql 5.7
  • Operating System and version : CentOS 7
Important Fix Proposed Bug

Most helpful comment

Dont hurry, this issue including fix is only 6 month old ;)

All 10 comments

@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:

  • Firefox latest, SuiteCRM 7.9, SuiteP theme, applied the change and did a Quick Repair and Rebuild.
  1. Go to a contact's detail view, all subpanels appear collapsed
  2. Expand a couple of subpanels
  3. Go to Contacts list view
  4. Go back in the same contact's detail view. I expected to find those two subpanels expanded, but I get the same thing as before - every subpanel is collapsed.

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ajprouty87 picture ajprouty87  路  3Comments

ArturoBurela picture ArturoBurela  路  3Comments

Mausino picture Mausino  路  3Comments

likhobory picture likhobory  路  3Comments

connorshea picture connorshea  路  3Comments