Topics

Tribe Support

Tribe Support's Topics

Nick Swinford

Nick Swinford

September 15 2017

Error after upgrade

I just updated a install from 4.2 to 4.3 after upgrading from PHP 5.5 to 5.6 and now I'm getting the below error. Been debugging it for a few days and can't figure out what the issue is.

1: Call to undefined function searchbox() in on line 151: Call to undefined function searchbox() in /var/www/demo/www/templates/base/html/tmpl/navbar.php on line 15

There's no errors in the error log and nothing else that jumps out as the cause. If I go to a page that doesn't have the searchbox, such as /people/session, the page displays without any styling.

Any help would be appreciated. Thanks.

Rastin Mehr
Rastin Mehr
September 15 2017 Permalink
Nick Swinford
Nick Swinford
September 15 2017 Permalink
Yeah, I know, but why would it be calling it as an actual function instead of running it as a filter?

All the files are there and are linked properly. I just don't know why the template stack isn't running properly.
Rastin Mehr
Rastin Mehr
September 16 2017 Permalink
Are any of the filters starting with @ symbol working or is it only the searchbox() ?
Nick Swinford
Nick Swinford
September 16 2017 Permalink
It looks like none of them are working.
Rastin Mehr
Rastin Mehr
September 16 2017 Permalink
Could it be a php configuration issue?
Nick Swinford
Nick Swinford
September 16 2017 Permalink
I went line by line comparing the php.ini files for the PHP 5.5 and 5.6 and the only difference was the log file. I fixed the log file and now the above error is successfully logging to it, but no additional information is given.

I'm at a loss.
Nick Swinford
Nick Swinford
September 16 2017 Permalink
ComBaseTemplateFilterAlias::__construct is being executed.

EDIT: To be able to determine the code was running, I put error_log("ComBaseTemplateFilterAlias::__construct"); at the begging of the constructor and checked the log file for it's presence after refreshing the page. Oddly, it logged it 5 times.
Rastin Mehr
Rastin Mehr
September 16 2017 Permalink
yes they may run multiple times as layouts are being combined. Can you make a fresh Anahita installation and see if everything is working there or not?
Nick Swinford
Nick Swinford
September 16 2017 Permalink
Technically, this is a fresh install of Anahita. Every time I push a commit to the server, composer loads a fresh version of anahita and the cli links everything up together. Do you mean like without any apps or a new database?
Rastin Mehr
Rastin Mehr
September 16 2017 Permalink
yes a fresh installation of pure Anahita, not an upgrade of your codebase. You can install a couple of apps too.
Nick Swinford
Nick Swinford
September 16 2017 Permalink
I've removed all my apps and switch to a new database and I'm getting the same issue.

Its almost like the @ operator isn't functioning properly.
Rastin Mehr
Rastin Mehr
September 16 2017 Permalink
Maybe it is somehow stripping out the @ symbol from the templates before applying the filter.
Rastin Mehr
Rastin Mehr
September 16 2017 Permalink
By the way, have you completely cleared the cache on server and turned it off too?
Nick Swinford
Nick Swinford
September 16 2017 Permalink
No, what cache?
Rastin Mehr
Rastin Mehr
September 16 2017 Permalink
Or disable all php cache opcache, apcu
Nick Swinford
Nick Swinford
September 16 2017 Permalink
Could caching cause this issue?
Rastin Mehr
Rastin Mehr
September 16 2017 Permalink
Sometimes. I know when I upgraded Anahitapolis, that was the problem.
Rastin Mehr
Rastin Mehr
September 18 2017 Permalink
Any updates on this issue Nick? Also have you tried php7? PHP5 has officially reached its end of life https://secure.php.net/supported-versions.php
Nick Swinford
Nick Swinford
September 19 2017 Permalink
I've disabled all the caching and I've upgraded to 7. I'm still getting the error. Gonna try to create a new server from scratch and see if I can get it to work.

Powered by Anahita