Upgrade 7.7.9 to 7.8.1 - no longer able to search accounts, contacts, leads, opportunities, etc.

After successfully upgrading from 7.7.9 to 7.8.1 - when trying to search for “accounts” or “leads” or “opportunities” or “contacts” using the drop down menus I got a message that said

An error has occurred:
There was an error processing your request, please try again at a later time. If the error persist, please have your administrator disable Ajax for this module.

So, I disabled Ajax - no help. Now I an unable to enable Ajax. Now when I try to search I get a blank page.

Solutions?

Usually that type of error would give you something in the error logs.

  1. What does your suitecrm.log say at the point of that error appearing?
  2. Try doing a hard refresh browser cache (that would be going into your browser settings/history and delete all temp files.
  3. Screenshot of the error would be great and do you have customisations in the Search view?

Or this could be related to your Access Roles.

  1. What Roles do you have currently on these modules?
    Try this fix if you have at least one stating ‘Owner’
    https://github.com/salesagility/SuiteCRM/pull/3117

Sorry, we thought we had reported the suite.crm log errors. We did do a hard refresh of the browser cache. We do have customized search view, just with two additional fields. Since we were unable to quickly fix we reverted back to 7.7.9. So, we won’t be able to provide any more useful information. We will wait for the next update and try that. Thanks,

I was able to retrieve the error message from suitecrm.log - here it is - thanks,

<<<>>>>
PHP Fatal error:
Uncaught Error: Call to undefined method ListViewSmarty::ListViewSmarty() in /var/www/html/blah/suitecrm/custom/modules/Accounts/AccountsListViewSmarty.php:8
Stack trace:
#0 /var/www/html/blah/suitecrm/custom/modules/Accounts/views/view.list.php(16): AccountsListViewSmarty->AccountsListViewSmarty()
#1 /var/www/html/blah/suitecrm/include/MVC/View/SugarView.php(167): AccountsViewList->preDisplay()
#2 /var/www/html/blah/suitecrm/include/MVC/Controller/SugarController.php(363): SugarView->process()
#3 /var/www/html/blah/suitecrm/include/MVC/Controller/SugarController.php(310): SugarController->processView()
#4 /var/www/html/blah/suitecrm/include/MVC/SugarApplication.php(105): SugarController->execute()
#5 /var/www/html/blah/suitecrm/index.php(52): SugarApplication->execute()
#6 {main}
thrown in /var/www/html/blah/suitecrm/custom/modules/Accounts/AccountsListViewSmarty.php on line 8, referer: https://www.blah.com/suitecrm/index.php?module=Home&action=index

[Fri Feb 17 20:35:58.532751 2017] [:error] [pid 21410] [client 76.20.195.44:61776] PHP Fatal error:
Uncaught Error: Call to undefined method ListViewSmarty::ListViewSmarty() in /var/www/html/blah/suitecrm/custom/modules/Accounts/AccountsListViewSmarty.php:8
Stack trace:
#0 /var/www/html/blah/suitecrm/custom/modules/Accounts/views/view.list.php(16): AccountsListViewSmarty->AccountsListViewSmarty()
#1 /var/www/html/blah/suitecrm/include/MVC/View/SugarView.php(167): AccountsViewList->preDisplay()
#2 /var/www/html/blah/suitecrm/include/MVC/Controller/SugarController.php(363): SugarView->process()
#3 /var/www/html/blah/suitecrm/include/MVC/Controller/SugarController.php(310): SugarController->processView()
#4 /var/www/html/blah/suitecrm/include/MVC/SugarApplication.php(105): SugarController->execute()
#5 /var/www/html/blah/suitecrm/index.php(52): SugarApplication->execute()
#6 {main}
thrown in /var/www/html/blah/suitecrm/custom/modules/Accounts/AccountsListViewSmarty.php on line 8

<<>>>>

Hey there,

Unfortunately waiting for an upgrade will not help you in this situation.

The Fatal is coming from a customisation in your instance.

From the logs you’ve provided:

/var/www/html/blah/suitecrm/custom/modules/Accounts/AccountsListViewSmarty.php

^^^ That file is customised - to what extent I don’t know. How I know this is because it is sitting in the custom directory. So there is obviously something in that which is making everything fail.

You will need to speak to the developer whom provided it to you.

If I could get you to go into a bit more detail. The only customization we did was to add some fields and re-arrange some fields in the Accounts, Contacts, and Opportunities modules. However, we have done no customization in years and yet we have been able to update using the wizard. Generally I update each time a new update is noted in the newsletter.

Is there any thing in particular we should be looking for? Any tests we could run to locate the source of the problem? Would removing the customization folder be a good test to see if that is the source of the problem?

Sure.

The 7.8.x upgrades had a few changes made to how templates are rendered that perhaps is causing the issue with customised views.

From the logs you provided:

Uncaught Error: Call to undefined method ListViewSmarty::ListViewSmarty() in /var/www/html/blah/suitecrm/custom/modules/Accounts/AccountsListViewSmarty.php:8
Stack trace:

^^^ This file is NOT a core file i.e. it was added AFTER a vanilla install not by the system. Now this maybe a case of a very old instance you have upgraded over and over but I would still highly be unlikely as this file is not often in the custom directory until it was specifically changed to be so.

I understand that you say that you have only changed fields in the layouts, but that doesn’t change the fact that the error is coming from that file.

What I suggest you do is compare that file to the core file inside of Accounts module to see the differences. If there are then you can try and deleting/renaming that file and allow the system just to use the core file.

My only warning here is that you will need to also check the following file:

#0 /var/www/html/blah/suitecrm/custom/modules/Accounts/views/view.list.php(16):

In case it calling a ‘custom’ directory also.

Hope that helps.

I had the same problem, at first with Cases. A quick look at my PHP error log and subsequent code dive told me the override method CasesListViewSmarty in custom/modules/Cases/CasesListViewSmarty.php, was lacking any __construct() function.

Adding the following immediately after the opening bracket of the class definition (class CasesListViewSmarty extends ListViewSmarty) fixed this for me:

function __construct() {
parent::construct();
}

A little more investigation indicated the same is true in Projects, Accounts, Opportunities, Leads, Prospects, Meetings and Contacts. In the above suggestion, simply replace the word ‘Cases’ with each of these, add the __construct() function to each respective class and you should be good to go.