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 19 2017 Permalink
That's really strange. I can't think of anything that could cause that. Keep me posted please!
Nick Swinford
Nick Swinford
September 19 2017 Permalink
Yup, same here.

What's really odd is I have the same site setup with all the components installed locally on 5.6 and it's working fine. It's gotta be some configuration issue on the server, just can't think of what it could be.
Nick Swinford
Nick Swinford
September 20 2017 Permalink
@Rastin, what version of MySQL is Anahitapolis running on?

I've created a new server and I'm getting a new error:

Exception in ComStoriesControllerStory : Expression #8 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'demo.story.name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by of the following query : SELECT DISTINCT IF (story.body '' AND story.body IS NOT NULL,story.id,IF(story.story_comment_id IS NOT NULL AND story.story_object_id IS NOT NULL , CONCAT_WS(',',story.name,story.component,DATE(story.created_on), story.story_object_id), CONCAT_WS(',',story.name,story.component,DATE(story.created_on),CASE TRUE WHEN CONCAT(story.name,story.component) LIKE 'cover_editcom_people' THEN CONCAT(story.story_target_id) WHEN CONCAT(story.name,story.component) LIKE 'avatar_editcom_people' THEN CONCAT(story.story_target_id) WHEN story.name LIKE "avatar_edit" THEN IF(story.story_subject_id = story.story_target_id, "", story.id) WHEN story.name LIKE "actor_follow" THEN story.story_subject_id ELSE CONCAT(story.story_target_id,story in /var/www/demo/vendor/anahita/anahita/src/libraries/default/base/controller/resource.php on line 210

The new server comes with an upgraded version of MySQL, 5.7.19, which has the ONLY_FULL_GROUP_BY sql_mode on by default (https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_only_full_group_by) and seems to be causing some issues.
Rastin Mehr liked this
Rastin Mehr
Rastin Mehr
September 20 2017 Permalink
Version 5.6. We haven't tested with version 5.7 yet. Thank you for reporting this
Rastin Mehr
Rastin Mehr
September 20 2017 Permalink
here is where the query is being constructed: https://github.com/anahitasocial/anahita/blob/master/src/components/com_stories/domains/behaviors/aggregatable.php#L74 I need to go through and debug it for MySql 5.7 or later. If you found the issue first, please do a PR
Nick Swinford
Nick Swinford
September 21 2017 Permalink
I figured it out.

When I updated my site, for some reason the configuration.php file wasn't updated properly and the $template property wasn't added to class. Without this, Anahita didn't know which template files to load and was messing things up.
Rastin Mehr liked this
Rastin Mehr
Rastin Mehr
September 21 2017 Permalink
So is the problem resolved now?
Nick Swinford
Nick Swinford
September 22 2017 Permalink
The main problem I created this thread about, searchbox() being undefined, is resolved.

The secondary issue I ran into when using a fresh server with an upgraded version of MySQL is still an issue we're gonna have to resolve. Should I create a separate thread to report it?
Rastin Mehr liked this
Rastin Mehr
Rastin Mehr
September 23 2017 Permalink
Yes please. This is a bug and we sort of know what's causing it. You can start a thread in the project group.

Powered by Anahita