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?