I am using SuiteCRM 7.11.15 and have noticed a problem when I go to “Profile” -> “Layout Options” and change the “Style” (e.g. from “Day” to “Night”). For pages that don’t use AJAX (e.g. /index.php?module=Home&action=index), the new style is used, but for AJAX pages (e.g. /index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DAccounts%26action%3Dindex%26parentTab%3DMarketing) it isn’t.
When I look at the network activity, the request for “/index.php?action=ajaxui” returns “304 Not Modified”, meaning that the browser will display the cached version of the page, which links to the previous “style.css” file.
Looking at the code, in include/MVC/View/views/view.ajaxui.php, it runs
Thanks for the response. Even assuming that one of the repair options does fix it (and I haven’t seen anything in the code that suggests that it would), it isn’t really a solution, as most users would not have the option to run it.
This is what I was looking for to fix a bug in a custom business segment program I built with dynamic subthemes.
The bug is gone
$sql =
"SELECT contents
FROM user_preferences
WHERE category='global' AND assigned_user_id= '$userID'";
$result = $db->query($sql);
while ($row = $db->fetchByAssoc($result)) {
$prefs = array();
$newprefs = array();
$prefs = unserialize(base64_decode($row['contents']));
$subthemeValue = $prefs['subtheme'];
$newsubtheme = $prefs['subtheme']= ($subt);
$newprefs = $prefs;
$newsubtheme2 = base64_encode(serialize($newprefs));
$update =
"UPDATE user_preferences
SET contents = '{$newsubtheme2}'
WHERE category='global' AND assigned_user_id= '$userID'";
$db->query($update);
$current_user->setPreference('subtheme', $subt, 0, 'global');
$current_user->incrementEtag('mainMenuETag');
$current_user->reloadPreferences();
in short, I have a global value stream dropdown in the header, that users can select what value stream to enter records ( based on security privs). Each value stream has a different subtheme and a custom logo in the top left. the program and tags all worked great but every time I selected a module from the header the subtheme changed back to the first subtheme when the user logged.