Searching worked before I upgraded to CWIS 3.0. Now when I try to search, I get
Fatal error: Call to undefined method ApplicationFramework::SearchGroups() in /opt/www/htdocs/MORE/dev/objects/SavedSearch.php on line 560
I did echo get_class($this); on the SavedSearch.php page and it gives ApplicationFramework as the class even though the class should be SavedSearch, so I'm at a loss as how to fix this.
Thanks for any help.
It looks like you have some custom user interface code that is calling
GetSearchGroupsAsTextDescription()
without aSavedSearch
object.This call either needs to be attached to a
SavedSearch
object (if there is one to use in that context), or replaced by a call toSavedSearch::TranslateSearchGroupsToTextDescription()
. It looks like you're having a problem onindex.php?P=SavedSearch
. If so, comparing the contents of your customSavedSearch.html
withinterface/default/SavedSearch.html
will probably reval the problem.If you know which release of CWIS was used as the base for your custom user interface, that would help too. With that information, I could probably point out the specific lines that need to be changed.
FWIW, ApplicationFramework is the expected result of '
echo get_class($this);
' from inside a file inpages/
. Since CWIS 2.0.0,index.php
has used theApplicationFramework
to assemble pages, so that every page will have a consistent environment.Thanks again for the quick reply.
The error is not occuring on the SavedSearch.php page in /pages but in /objects and the calling page is AdvancedSearch.php, index.php?P=AdvancedSearch.
The line calling saved search is:
The line you've pasted from pages/AdvancedSearch.php was from CWIS 2.0.4.
In CWIS 3.0.0, it reads:
# build search criteria string to display to user
$G_SearchCriteria = SavedSearch::TranslateSearchGroupsToTextDescription(
$G_SearchGroups, TRUE, FALSE);
Something strange is going on. The most likely possiblitiy is that
CWIS-3.0.0.zip
was not fully extracted. If that were the case, however, you should have seen error messages about incorrect checksums frominstallcwis.php
.I would suggest unzipping CWIS-3.0.0.zip again, checking carefully for any errors.
You were right that it was using the old version of AdvanceSearch.php. Our local/pages/AdvancedSearch.php page was taking precidence over pages/AdvancedSearch.php. Would your suggestion be to clear out all the files from local/pages?
Thanks Again,
Steve
It's not generally a good idea to have duplicates of the files under
pages/
living underlocal/pages/
. When the site is upgraded, this has the effect of combining parts from two different versions of CWIS, which can result in very strange behavior.With older versions of CWIS, it was sometimes necessary to do this anyway, to extend the functionality of particular pages. We have tried to make this customization possible via our Plugin system instead, so that it is never necessary to duplicate something from
pages/
underlocal/pages/
.If there are no customizations in your duplicate pages, then simply deleting them should resolve the problem.