Upgraded from 7.13 to 7.14 - Now "Case" Page Grid Won't Load

After upgrading, I noticed that the ā€œCaseā€ page will not load the ā€˜resultsā€™ grid.
The ā€˜pageā€™ loads, but not the Grid with the list of cases, filters etc.
There is no HTML delivered at all for the grid, there are no errors in the JS console.
If I turn AJAX ā€˜onā€™, I get a blank floating box on the page that says there is an error.

Iā€™m seeing these 2 errors in the log:
Wed Sep 13 13:07:05 2023 [10179][1][FATAL] Exception handling in /var/www/html/include/MVC/Controller/SugarController.php:397

Wed Sep 13 13:07:05 2023 [10179][1][FATAL] Exception in Controller: Syntax error in template ā€œfile:/var/www/html/cache/themes/BadKarmaTheme/modules/Cases/SearchForm_advanced.tplā€ on line 246 ā€œ{php}$this->_tpl_vars[ā€˜user_optionsā€™] = get_user_array(false);{/php}ā€ unknown tag ā€˜phpā€™

When viewing the files referenced in the error, I see that the controller line looks like an error handler, and the file in the cache seems to be a template for the case page.

Iā€™m not 100% sure how to proceedā€¦
Is it possible to run the upgrade ā€˜againā€™, and hope some upgrade issue is solved?
Any other advice??

Delete that cache file with the error, then try again.

Also, check if you have custom code with old versions of tpls, these have to be updated for the new Smarty version in 7.14.

Wowā€¦thank you for the fast response!!

Yes, I should have mentioned, but I did indeed delete the cache file, quick rebuild, and reloaded the page, but have the same result.

Iā€™m donā€™t believe Iā€™ve changed any of the tpl filesā€¦perhaps something is being ā€˜fedā€™ into it thatā€™s an issue?
I opened that specific tpl file, and I see this line on 54 below:

My code editor is highlighting the ā€œ[ā€ in the regex aboveā€¦is there perhaps a syntax issue here?
(It seems OK to meā€¦but perhaps Iā€™m missing something?)

Any thoughts?

What is the Bad Karma Theme?

Which screen are you on, when that error occurs?

Do you get the same error, with the default theme?

BadKarma is just a copy of SuiteP with some custom colors etc.

The errors happen when I load the ā€œCaseā€ page.

Iā€™ve tried to switch to SuiteP, and I see the same issue.
Seems to be limited to the ā€œCaseā€ page.

I switched the error reporting to ā€˜debugā€™, and hereā€™s what I got (Below):

=======================================================
Do you think these are of concern?:
Wed Sep 13 14:02:00 2023 [11266][1][WARN] CSS File Day/yui.css not found

=======================================================

Wed Sep 13 14:02:00 2023 [11266][1][INFO] Query:SELECT id, first_name, last_name, user_name from users WHERE status=ā€˜Activeā€™ AND portal_only=0 ORDER BY first_name, last_name ASC
Wed Sep 13 14:02:00 2023 [11266][1][INFO] Query Execution Time:0.00026416778564453
Wed Sep 13 14:02:00 2023 [11266][1][DEBUG] SugarBean[Case].load_relationships, Loading relationship (notes).

Wed Sep 13 14:02:00 2023 [11266][1][WARN] One2MBeanRelationship getQuery: Trying to get property of non-object
Wed Sep 13 14:02:00 2023 [11266][1][INFO] Query:SELECT id FROM notes WHERE notes.parent_id = ā€˜ā€™ AND notes.deleted=0 AND notes.parent_type = ā€˜Casesā€™
Wed Sep 13 14:02:00 2023 [11266][1][INFO] Query Execution Time:0.00030112266540527

=======================================================

Wed Sep 13 14:02:00 2023 [11266][1][INFO] Query:SELECT id, name FROM saved_search
WHERE
deleted = ā€˜0ā€™ AND
assigned_user_id = ā€˜1ā€™ AND
search_module = ā€˜Casesā€™
ORDER BY name
Wed Sep 13 14:02:00 2023 [11266][1][INFO] Query Execution Time:0.00034594535827637
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEBUG] Hook called: SavedSearch::before_retrieve
Wed Sep 13 14:02:00 2023 [11266][1][DEBUG] Retrieve SavedSearch : SELECT saved_search.* FROM saved_search WHERE saved_search.id = ā€˜2efd1aeb-476b-2239-14cb-62264f8c43aeā€™ AND saved_search.deleted=0
Wed Sep 13 14:02:00 2023 [11266][1][DEBUG] Limit Query:SELECT saved_search.* FROM saved_search WHERE saved_search.id = ā€˜2efd1aeb-476b-2239-14cb-62264f8c43aeā€™ AND saved_search.deleted=0 Start: 0 count: 1
Wed Sep 13 14:02:00 2023 [11266][1][INFO] Query:SELECT saved_search.* FROM saved_search WHERE saved_search.id = ā€˜2efd1aeb-476b-2239-14cb-62264f8c43aeā€™ AND saved_search.deleted=0 LIMIT 0,1
Wed Sep 13 14:02:00 2023 [11266][1][INFO] Query Execution Time:0.00012803077697754
Wed Sep 13 14:02:00 2023 [11266][1][DEBUG] Hook called: SavedSearch::after_retrieve
Wed Sep 13 14:02:00 2023 [11266][1][WARN] Trying to get property of non-object: list view data ā€œorder byā€ is not defined
Wed Sep 13 14:02:00 2023 [11266][1][WARN] Trying to get property of non-object: list view data ā€œsort orderā€ is not defined
Wed Sep 13 14:02:00 2023 [11266][1][INFO] Query:SELECT id, name FROM saved_search
WHERE
deleted = ā€˜0ā€™ AND
assigned_user_id = ā€˜1ā€™ AND
search_module = ā€˜Casesā€™
ORDER BY name
Wed Sep 13 14:02:00 2023 [11266][1][INFO] Query Execution Time:0.00022411346435547
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][FATAL] Exception handling in /var/www/html/include/MVC/Controller/SugarController.php:397
Wed Sep 13 14:02:00 2023 [11266][1][FATAL] Exception in Controller: Syntax error in template ā€œfile:/var/www/html/cache/themes/BadKarmaTheme/modules/Cases/SearchForm_advanced.tplā€ on line 246 ā€œ{php}$this->_tpl_vars[ā€˜user_optionsā€™] = get_user_array(false);{/php}ā€ unknown tag ā€˜phpā€™
Wed Sep 13 14:02:00 2023 [11266][1][DEBUG] Hook called: Cases::handle_exception

=======================================================
Wed Sep 13 14:02:01 2023 [11253][9690c31f-95c9-fe24-bf3f-6464e8381002][DEBUG] Hook called: Calls::before_acl_check
Wed Sep 13 14:02:01 2023 [11253][9690c31f-95c9-fe24-bf3f-6464e8381002][WARN] Undefined data index ID for list view data.
Wed Sep 13 14:02:01 2023 [11253][9690c31f-95c9-fe24-bf3f-6464e8381002][DEBUG] Hook called: Calls::process_record

=======================================================
Wed Sep 13 14:02:01 2023 [11253][9690c31f-95c9-fe24-bf3f-6464e8381002][INFO] Query:select count(securitygroups.id) as results from securitygroups inner join securitygroups_users on securitygroups.id = securitygroups_users.securitygroup_id and securitygroups_users.deleted = 0 and securitygroups_users.user_id = ā€˜9690c31f-95c9-fe24-bf3f-6464e8381002ā€™ inner join securitygroups_records on securitygroups.id = securitygroups_records.securitygroup_id and securitygroups_records.deleted = 0 and securitygroups_records.record_id = ā€˜af8f5e46-d1be-ce2f-9aba-64fa1b023700ā€™ and securitygroups_records.module = ā€˜Callsā€™ where securitygroups.deleted = 0
Wed Sep 13 14:02:01 2023 [11253][9690c31f-95c9-fe24-bf3f-6464e8381002][INFO] Query Execution Time:0.00030708312988281
Wed Sep 13 14:02:01 2023 [11253][9690c31f-95c9-fe24-bf3f-6464e8381002][DEBUG] Hook called: Calls::before_acl_check
Wed Sep 13 14:02:01 2023 [11253][9690c31f-95c9-fe24-bf3f-6464e8381002][WARN] Undefined data index ID for list view data.
Wed Sep 13 14:02:01 2023 [11253][9690c31f-95c9-fe24-bf3f-6464e8381002][DEBUG] Hook called: Calls::process_record

Tried to pluck out some ā€˜warningsā€™ that might help??

Full Dump too long to load here.

Thoughts??

Perhaps this is closer to the right area??

Wed Sep 13 14:02:00 2023 [11266][1][DEBUG] Hook called: SavedSearch::after_retrieve
Wed Sep 13 14:02:00 2023 [11266][1][INFO] Query:SELECT id, name FROM saved_search
WHERE
deleted = ā€˜0ā€™ AND
assigned_user_id = ā€˜1ā€™ AND
search_module = ā€˜Casesā€™
ORDER BY name
Wed Sep 13 14:02:00 2023 [11266][1][INFO] Query Execution Time:0.00034594535827637
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEBUG] Hook called: SavedSearch::before_retrieve
Wed Sep 13 14:02:00 2023 [11266][1][DEBUG] Retrieve SavedSearch : SELECT saved_search.* FROM saved_search WHERE saved_search.id = ā€˜2efd1aeb-476b-2239-14cb-62264f8c43aeā€™ AND saved_search.deleted=0
Wed Sep 13 14:02:00 2023 [11266][1][DEBUG] Limit Query:SELECT saved_search.* FROM saved_search WHERE saved_search.id = ā€˜2efd1aeb-476b-2239-14cb-62264f8c43aeā€™ AND saved_search.deleted=0 Start: 0 count: 1
Wed Sep 13 14:02:00 2023 [11266][1][INFO] Query:SELECT saved_search.* FROM saved_search WHERE saved_search.id = ā€˜2efd1aeb-476b-2239-14cb-62264f8c43aeā€™ AND saved_search.deleted=0 LIMIT 0,1
Wed Sep 13 14:02:00 2023 [11266][1][INFO] Query Execution Time:0.00012803077697754
Wed Sep 13 14:02:00 2023 [11266][1][DEBUG] Hook called: SavedSearch::after_retrieve
Wed Sep 13 14:02:00 2023 [11266][1][WARN] Trying to get property of non-object: list view data ā€œorder byā€ is not defined
Wed Sep 13 14:02:00 2023 [11266][1][WARN] Trying to get property of non-object: list view data ā€œsort orderā€ is not defined
Wed Sep 13 14:02:00 2023 [11266][1][INFO] Query:SELECT id, name FROM saved_search
WHERE
deleted = ā€˜0ā€™ AND
assigned_user_id = ā€˜1ā€™ AND
search_module = ā€˜Casesā€™
ORDER BY name
Wed Sep 13 14:02:00 2023 [11266][1][INFO] Query Execution Time:0.00022411346435547
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][DEPRECATED] Using row number in fetchByAssoc is not portable and no longer supported. Please fix your code.
Wed Sep 13 14:02:00 2023 [11266][1][FATAL] Exception handling in /var/www/html/include/MVC/Controller/SugarController.php:397
Wed Sep 13 14:02:00 2023 [11266][1][FATAL] Exception in Controller: Syntax error in template ā€œfile:/var/www/html/cache/themes/BadKarmaTheme/modules/Cases/SearchForm_advanced.tplā€ on line 246 ā€œ{php}$this->_tpl_vars[ā€˜user_optionsā€™] = get_user_array(false);{/php}ā€ unknown tag ā€˜phpā€™

So, I switched to SuiteP, to see what errors I gotā€¦and It seems to be the same:

Wed Sep 13 16:36:24 2023 [13289][1][FATAL] Exception handling in /var/www/html/include/MVC/Controller/SugarController.php:397

Wed Sep 13 16:36:24 2023 [13289][1][FATAL] Exception in Controller: Syntax error in template ā€œfile:/var/www/html/cache/themes/SuiteP/modules/Cases/SearchForm_advanced.tplā€ on line 246 ā€œ{php}$this->_tpl_vars[ā€˜user_optionsā€™] = get_user_array(false);{/php}ā€ unknown tag ā€˜phpā€™

Any thoughts?

Can you go to studio cases layouts filter then advanced search and remove assigned user from the filter save and deploy and see if the page works

Thanks for the thought!

Interesting ideaā€¦Tried that, but no luck.
Same condition.

Try removing all of the users fields(assigned user , created by, modified by) from advanced search

While You were typingā€¦I removed all but 1 field, and the grid is now loading!

So are you thinking that there is some issue with the data in one of the records, or is there perhaps something ā€˜wrongā€™ with the filter system??

How might you recommend I move forward?


Open this file on your crm and edit the if statement below to if(true)

Now add the fields back and see how the view looks

THANK YOU Sooo much for the help!!

Will have to try this tomorrowā€¦(I have to get on the road now).
Iā€™m guessing this is this a ā€˜temporaryā€™ test, since it wouldnā€™t be upgrade proofā€¦(I think)ā€¦
Assuming this does, in fact, allow those fields back in, what does that mean? (and would there be further steps Iā€™d then consider?)

Thanks again!!!

@TobyTkd are you using the Cases module in legacy view, or with the new UI?

I think your problem is simple: new SuiteCRM version, new Smarty version. This update required many updates to the tpl files. Either one of these fixes is missing (they forgot to do it) or you happen to have old code running for some reason.

@TobyTkd is using SuiteCRM 7.14 so the legacy or new UI is not applicable (it is definitely legacy with tpls etc)

The file i pointed out is in the 7.14 version.
The question that needs answering is which field is going to the else in the file that I pointed out because the smarty file being loaded in the else has the php tag (and according to smarty documentation has been removed in smarty 4) .
After identifying the field. He needs to go to the vardefs of that field or the searchdefs or seagoirchfields and see what is different in this field that is causing going to the else statement

Right! Sorry

Maybe we could see how this code was changed in other tpl in this latest release, to see what they did with the {php} tag elsewhere

1 Like

@abuzarfaris & @pgr
Okā€¦I believe Iā€™ve made this change.

Added the ā€œCreated Byā€ field back into the filter, (dd a quick rebuild, just in case), and now the page is Failing to load the grid again.

(Did I make a dumb syntax mistake?)

Any thoughts on next steps?
Iā€™m thinking to dump out what itā€™s being sentā€¦but perhaps you have a better insight?

You can start by reverting the change and letting the normal code run to check if your error goes away.

Then you can think about how to achieve whatever it was you were trying to achieve with your code changeā€¦

Okā€¦so:
Iā€™ve reverted the ā€˜if (true)ā€™ test, back to original code.

When adding the ā€œCreated Byā€ field back into the filter, the Case page still fails to load.
I then removed that field from the filter, the Case page then DOES load.

If I add the ā€œCreated Byā€ Field to the ā€œQuick Filterā€, the Case page will load with the grid, but the ā€œFilterā€ pop up will not load Quick Filter content/options. Similar results with ā€œModified Byā€ Field.

Thoughts?