Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

/activity content missing

edited April 2012 in Vanilla 2.0 - 2.8

Hello,

I just made an upgrade to the latest version and the /activity feed is now buggy.
See:

http://answers.aerys.in/activity

I followed the instructions to upgrade but I can't get it to work :(
What did I miss?

Thank you !

Tagged:
«1

Answers

  • 422422 Developer MVP

    Your link doesnt work for me.

    Stating something doesnt work isnt very helpful, please try and be specifc

    There was an error rendering this rich post.

  • Hello,

    Stating something doesnt work isnt very helpful, please try and be specifc

    But that's what you just did about my link, isn't it? The link works great. I can't be a lot more specific than giving away a link to the page where the issue is rather explicit.

    If you really can't open that link - which is rather unlikely considering it's just a public web page - here is how I could describe the issue:

    The activity feed is filled with items but those items just feature the avatar of the user. Nothing more. No text, no link. Nothing:

    http://dl.dropbox.com/u/39247193/vanilla_bug_activity.jpg

  • 422422 Developer MVP

    image

    looks like custom theme, perhaps try default theme first

    There was an error rendering this rich post.

  • The default theme as the same issue.
    The content in missing in the source document and as our theme is just custom CSS I don't see how it would affect it in such a way.

    Any another idea please?

  • 422422 Developer MVP

    By the way i cannot open the link, perhaps because i am on mobile. No need to be so hostile.

    There was an error rendering this rich post.

  • By the way i cannot open the link, perhaps because i am on mobile. No need to be so hostile.

    Exactly my point: I was just being as hostile as you just were... giving you a taste of your own medicine :)

    Still, this issue is very bad for us and I really don't get what's wrong with the activity feed.

  • Promethe42 said:
    The default theme as the same issue.
    The content in missing in the source document and as our theme is just custom CSS I don't see how it would affect it in such a way.

    So the default theme has default avatars of the users that posted the activity? Wow! where can I download that default theme?

    I would love to have those avatars in my default theme too!

    Can you turn on the debug mode in your dashboard please, so you can look at the SQL queries that are generated...

    If the queries that are generated are allright (check in your phpMyAdmin) then look at the helper_functions.php in either your theme or the default theme...

    There was an error rendering this rich post.

  • 422422 Developer MVP

    Thanks for the medicine i am cured bye

    There was an error rendering this rich post.

  • So the default theme has default avatars of the users that posted the activity? Wow! where can I download that default theme?

    I would love to have those avatars in my default theme too!

    http://dl.dropbox.com/u/39247193/vanilla_bug_activity_2.jpg

    Here is a screenshot.
    So it is even worse with the default theme.

    Seriously what is wrong with you people?!
    Isn't the purpose of this board to be able to ask questions?
    My first post was a genuine, respectful and polite call for help.
    But both of you act like arrogant douchebags!

    I really don't understand why you're acting so agressively.
    I'm merely trying to "defend" myself here.
    That's not really friendly... far from it...

    Can you turn on the debug mode in your dashboard please, so you can look at the SQL queries that are generated...

    I did not find this option in the dashboard.
    Where is it located?

    If the queries that are generated are allright (check in your phpMyAdmin) then look at the helper_functions.php in either your theme or the default theme...

    There is no helper_functions.php in my theme. All I got are PNGs, CSS, about.php and default.master.php

    Thanks for your help.

  • Promethe42 said:

    Can you turn on the debug mode in your dashboard please, so you can look at the SQL queries that are generated...

    I did not find this option in the dashboard.
    Where is it located?

    sorry, it's not a mode, it's a plugin.

    Plugins => Debugger plugin

    There is no helper_functions.php in my theme. All I got are PNGs, CSS, about.php and default.master.php

    That helper_functions.php file is probably in the default theme then...

    Any special plugins that you have installed?

    There was an error rendering this rich post.

  • I activated the debug plugin but I cannot see any debug display anywhere...
    The only helper_functions.php I found is in /themes/mobile/views/discussions
    It's not even in the default theme...

    I tried to disable every plugin, but I still had the same issue.

  • Ok, last try...

    With the debug plugin enabled, can you switch over to the default theme please.

    No mobile things yet, until you see the sql queries that are executed...



    What are the files in applications/dashboard/views/activity/


    Start considering doing some actual debugging, meaning you echo out some dummy content in the place where you expect the activity from the database...


    It's echoing the user photo's / avatars, so there is information coming from the database
    By knowing the details of the SQL queries (debug plugin), you can see if the SQL queries are correct...
    Now you have to either check the source of the helper_functions.php or (as a last straw) Right click on the userphoto and inspect the element with firebug. Then see in the source which part of the activity details is displayed (html only? No text?)

    There was an error rendering this rich post.

  • edited April 2012

    I switched to the default theme and still no debug.

    If I add a var_dump($Activity) in /applications/dashboard/views/activity/helper_functions.php, I get this:

    object(stdClass)#68 (34) { ["ActivityID"]=> string(3) "340" ["CommentActivityID"]=> NULL ["ActivityTypeID"]=> string(2) "29" ["NotifyUserID"]=> string(3) "139" ["ActivityUserID"]=> string(2) "17" ["RegardingUserID"]=> NULL ["Photo"]=> NULL ["HeadlineFormat"]=> string(76) "{ActivityUserID,user} commented on {Data.Name,text}" ["Story"]=> NULL ["Route"]=> string(35) "/discussion/comment/346#Comment_346" ["RecordType"]=> string(7) "Comment" ["RecordID"]=> string(3) "346" ["CountComments"]=> string(1) "0" ["InsertUserID"]=> string(2) "17" ["DateInserted"]=> string(19) "2012-04-28 08:45:57" ["InsertIPAddress"]=> string(14) "88.177.169.216" ["DateUpdated"]=> string(19) "2012-04-28 08:45:57" ["Notified"]=> string(1) "3" ["Emailed"]=> string(1) "0" ["Data"]=> string(63) "a:1:{s:4:"Name";s:38:"Minko 2.0b depth sorting of draw calls";}" ["FullHeadline"]=> string(0) "" ["ProfileHeadline"]=> string(0) "" ["AllowComments"]=> string(1) "0" ["ShowIcon"]=> string(1) "0" ["RouteCode"]=> NULL ["ActivityType"]=> string(7) "Comment" ["ActivityName"]=> string(17) "actual name" ["ActivityGender"]=> string(1) "m" ["ActivityPhoto"]=> NULL ["ActivityEmail"]=> string(24) "me@email.com" ["RegardingName"]=> NULL ["RegardingGender"]=> NULL ["RegardingEmail"]=> NULL ["RegardingPhoto"]=> NULL }

    $Activity['Story'] is always NULL. If I try to look at the table GDN_Activity in the database, the Story field is indeed NULL most of the time...

  • Ok so the problem is in class.format.php in the Gdn_format::ActivityHeadline method.
    The $FullHeadline, $ProfileHeadline and therefore $MessageFormat variables are empty.

    Therefore, the return sprintf($MessageFormat... call returns an empty string.
    So the activity feed displays nothing but the avatars/dates.

  • The Gdn_format::ActivityHeadline method uses $Activity->FullHeadline and $Activity->ProfileHeadline values but those columns do not exist in the database.

  • edited April 2012

    My investigation continues! :)
    I ran the following SQL request:

    select Name, ProfileHeadline, FullHeadline from GDN_ActivityType;

    And some records have no value for ProfileHeadline and Fullheadline: Default, Registration, Status, Ban, Discussion, Comment, QuestionAnswer, AnswerAccepted.

    I guess that's why $Activity->FullHeadline and $Activity->ProfileHeadline are empty in Gdn_format::ActivityHeadline. How did this happen and how to fix it?

    Thanks!

  • UnderDogUnderDog MVP
    edited April 2012

    I deleted your actual name and your email address from the var_dump (you might not want to get that much spam on that email address, right?


    Are you sure you're looking in the right place? the /activity page is as far as I know, general activity. Anyone can post, share stuff...
    When I posted 2 test activities on my /activity page I got 2 entries in the activity table. The activity type was 7 nothing about headlines, etc.


    The ProfileHeadlines will be used when you're talking about the activity on the actual profile pages... /profile/activity/ as far as I know...


    I would focus on why the $Story is NULL

    There was an error rendering this rich post.

  • When I return "test" in Gdn_format::ActivityHeadline", I see "test" all over the /activity page.
    So yes, the problem is that this function returns an empty string.

    This function returns sprintf($MessageFormat...). But $MessageFormat is bases on $ProfileHeadline or $FullHeadline, and they are both empty. Which explains why $MessageFormat is empty.

    Those variable come from a join between GDN_Activity and GDN_ActivityType. And in the GDN_ActivityType, ProfileHeadline and Fullheadline are empty for some records.

    If I remplace those empty fields by some random value, this very same random value makes its way into the /activity feed.

    So yes, I'm 100% positive those empty fields in GDN_ActivityType records are the problem. Where can I find the SQL init. scripts to get their initial value and patch my database?

    Thanks!

  • UnderDogUnderDog MVP
    edited April 2012

    Something like this?

    INSERT INTO `gdn_activitytype` (`ActivityTypeID`, `Name`, `AllowComments`, `ShowIcon`, `ProfileHeadline`, `FullHeadline`, `RouteCode`, `Notify`, `Public`) VALUES
    (1, 'SignIn', 0, 0, '%1$s signed in.', '%1$s signed in.', NULL, 0, 1),
    (2, 'Join', 1, 0, '%1$s joined.', '%1$s joined.', NULL, 0, 1),
    (3, 'JoinInvite', 1, 0, '%1$s accepted %4$s invitation for membership.', '%1$s accepted %4$s invitation for membership.', NULL, 0, 1),
    (4, 'JoinApproved', 1, 0, '%1$s approved %4$s membership application.', '%1$s approved %4$s membership application.', NULL, 0, 1),
    (5, 'JoinCreated', 1, 0, '%1$s created an account for %3$s.', '%1$s created an account for %3$s.', NULL, 0, 1),
    (6, 'AboutUpdate', 1, 0, '%1$s updated %6$s profile.', '%1$s updated %6$s profile.', NULL, 0, 1),
    (7, 'WallComment', 1, 1, '%1$s wrote:', '%1$s wrote on %4$s %5$s.', NULL, 0, 1),
    (8, 'PictureChange', 1, 0, '%1$s changed %6$s profile picture.', '%1$s changed %6$s profile picture.', NULL, 0, 1),
    (9, 'RoleChange', 1, 0, '%1$s changed %4$s permissions.', '%1$s changed %4$s permissions.', NULL, 1, 1),
    (10, 'ActivityComment', 0, 1, '%1$s', '%1$s commented on %4$s %8$s.', 'activity', 1, 1),
    (11, 'Import', 0, 0, '%1$s imported data.', '%1$s imported data.', NULL, 1, 0),
    (12, 'Banned', 0, 0, '%1$s banned %3$s.', '%1$s banned %3$s.', NULL, 0, 1),
    (13, 'Unbanned', 0, 0, '%1$s un-banned %3$s.', '%1$s un-banned %3$s.', NULL, 0, 1),
    (14, 'WallPost', 1, 1, '%3$s wrote:', '%3$s wrote on %2$s %5$s.', NULL, 0, 1),
    (15, 'ConversationMessage', 0, 0, '%1$s sent you a %8$s.', '%1$s sent you a %8$s.', 'message', 1, 0),
    (16, 'AddedToConversation', 0, 0, '%1$s added %3$s to a %8$s.', '%1$s added %3$s to a %8$s.', 'conversation', 1, 0),
    (17, 'NewDiscussion', 0, 0, '%1$s started a %8$s.', '%1$s started a %8$s.', 'discussion', 0, 0),
    (18, 'NewComment', 0, 0, '%1$s commented on a discussion.', '%1$s commented on a discussion.', 'discussion', 0, 0),
    (19, 'DiscussionComment', 0, 0, '%1$s commented on %4$s %8$s.', '%1$s commented on %4$s %8$s.', 'discussion', 1, 0),
    (20, 'DiscussionMention', 0, 0, '%1$s mentioned %3$s in a %8$s.', '%1$s mentioned %3$s in a %8$s.', 'discussion', 1, 0),
    (21, 'CommentMention', 0, 0, '%1$s mentioned %3$s in a %8$s.', '%1$s mentioned %3$s in a %8$s.', 'comment', 1, 0),
    (22, 'BookmarkComment', 0, 0, '%1$s commented on your %8$s.', '%1$s commented on your %8$s.', 'bookmarked discussion', 1, 0);

    There was an error rendering this rich post.

  • Hi,

    something like this yes but those are not the right values. I made the patch but it looks like the ActivityTypeID and the messages to not match:

    http://answers.aerys.in/activity

    It says "A banned B" everywhere now ^^
    Where did you find this SQL request ?
    Is it meant to work with 2.0.18.4 ?

    Regards,

Sign In or Register to comment.