Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to clear template cache #10459

Open
gaspare-joubert opened this issue Jun 27, 2024 · 0 comments
Open

Unable to clear template cache #10459

gaspare-joubert opened this issue Jun 27, 2024 · 0 comments
Labels
Type: Bug Bugs within the core SuiteCRM codebase

Comments

@gaspare-joubert
Copy link
Contributor

Issue

Unable to clear template cache using TemplateHandler clearCache method.
This is a bug.
This happens when the optional $view value does not contain file extension '.tpl'.
When DetailView cache template directory was built using $_SESSION['groupLayout'] in TemplateHandler::buildTemplate().
When the CRM instance is not in developer mode.

Possible Fix

In include/TemplateHandler/TemplateHandler::clearCache the IF statements must be updated to add the '.tpl' extension to $view and to check for '$_SESSION['groupLayout']'.

Steps to Reproduce the Issue

1. Make sure the CRM instance is not in Developer Mode in the Admin panel
2. Navigate to a view in the CRM (example Detail or EditView) 
3. Add some functionality for the view to call the clearCache method
4. Confirm in the cache directory during the request that the view's cache template is removed..

Context

I was trying to set a field's property type as 'readonly' in a Service. The change was not showing because the cached template was not being updated.

Version

7.12.8

What browser are you currently using?

Chrome

Browser Version

Version 125.0.6422.141 (Official Build) (64-bit)

Environment Information

MySQL, PHP7.4

Operating System and Version

Ubuntu 22.04.4 LTS

@gaspare-joubert gaspare-joubert added the Type: Bug Bugs within the core SuiteCRM codebase label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bugs within the core SuiteCRM codebase
Projects
None yet
Development

No branches or pull requests

1 participant