Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 11 years ago

Last modified 8 years ago

#5172 closed defect (bug) (fixed)

View conversation link to a non existent page

Reported by: sgr33n's profile sgr33n Owned by: r-a-y's profile r-a-y
Milestone: 1.9 Priority: normal
Severity: major Version: 1.7
Component: Templates Keywords: has-patch commit
Cc:

Description

Hi,

The most of times the "view conversation" link on the activity profile page sends to a non existent page in the format:

www.mybuddypresssite.com/activity/p/22/

Attachments (2)

non-working-activity.jpg (128.5 KB) - added by sgr33n 11 years ago.
5172.01.patch (1.0 KB) - added by r-a-y 11 years ago.

Download all attachments as: .zip

Change History (23)

#1 @r-a-y
11 years ago

  • Component changed from Core to Activity
  • Keywords reporter-feedback added

/activity/p/xx is used as a router to the activity permalink destination.

Is your problem that /activity/p/xx/ does not redirect to a different URL?

#2 @sgr33n
11 years ago

Yes, the link doesn't seem to redirect the right way, but it happen just for some link, some other redirects well. I'm running the latest svn at the moment.

On the "View Conversation link" I can see that the link is always to /activity/xx/ (the router), but a lot of them doesn't route.

#3 @r-a-y
11 years ago

The "View Conversation" link will only show up on activity comments in the activity stream and will link to the parent activity update.

So is the problem that the parent activity update no longer exists, but the activity comment still does?

Did you delete any activity items from the Activity dashboard in the WP admin area?

#4 @sgr33n
11 years ago

I don't think so, this is the MySQL select, id 248 is the non working one, 214 is its parent.

#5 @r-a-y
11 years ago

Hmm, that's odd.

Your "View Conversation" link / item_id for 248 should link to 182 and not 214. I believe a plugin or code snippet is interfering somewhere.

Can you provide steps to duplicate the issue? I just tried creating a new activity update and a few activity comments on the frontend of the site and the links work for me. Are you doing anything else that is different?

Last edited 11 years ago by r-a-y (previous) (diff)

#6 @sgr33n
11 years ago

It's a test database, can I send you a backup for the table?

#7 @r-a-y
11 years ago

A backup of the DB table will not help. I need to be able to duplicate the issue.

Your issue actually might be related to #5014. Did you use the Activity dashboard in the WP admin area to reply to any activity updates?

#8 @sgr33n
11 years ago

Sorry, I never used the Activiy dashboard in the WP admin area, and my installation is really simple.

#9 @sgr33n
11 years ago

Anyway activity id 182 exists and has item_id = 0

#10 @r-a-y
11 years ago

Anyway activity id 182 exists and has item_id = 0

That is odd correct as 182 is the parent activity update.

Can you list the plugins that you are using as well as the theme?

Can you also try creating a new activity update (go to the Activity Directory and make a post)? Next, reply to the update a few times in different levels. Then, check the "View Conversation" links on your profile. I'm trying to determine if this is still happening.

Last edited 11 years ago by r-a-y (previous) (diff)

#11 @sgr33n
11 years ago

The only one could conflict is bbPress, the others are WordPress SEO, Jetpack and Facebook... also a few of mines, but they don't interfect with BuddyPress.

I tried this, but the link is working. What should happen after going to the route link? Can I intercept the error and display a sort of debug?

#12 @sgr33n
11 years ago

I'm reading #5014 but I have groups functionality disabled and I never used the Activity admin panel.

#13 @r-a-y
11 years ago

  • Keywords reporter-feedback removed
  • Milestone changed from Awaiting Review to 1.9
  • Severity changed from normal to major

I've duplicated the problem.

The activity comments form should not show up on singular activity comment entries.

eg.
http://i.imgur.com/DXoXErq.png

If you reply to one of these items (like hitting the reply link in the screenshot above), the problem will occur.

I think this is a pretty big bug. So we'll try and address this for 1.9.

Last edited 11 years ago by r-a-y (previous) (diff)

#14 @sgr33n
11 years ago

Great :)

@r-a-y
11 years ago

#15 @r-a-y
11 years ago

  • Component changed from Activity to Theme
  • Keywords has-patch added
  • Version changed from 1.8.1 to 1.7

This bug is due to changes introduced in r6410 to address #4600.

The easiest fix is to remove the comment count check from the activity entry template.

#16 @boonebgorges
11 years ago

  • Keywords commit added

Thanks for digging into this, r-a-y. I've reproduced the issue myself, and I think you're right about the easiest fix. (Disabling the comment form for 'activity_comment' items is already handled by bp_activity_can_comment(), so the other count is redundant.) The additional check was introduced in r4691, and while I'm not totally sure what the reasoning was for that changeset, it seems to me that it's overly broad.

#17 @r-a-y
11 years ago

  • Owner set to r-a-y
  • Resolution set to fixed
  • Status changed from new to closed

In 7482:

Remove activity comment count check in activity entry template.

Due to changes in r6410 to expand how activity comments are fetched, a
comment count now existed for nested activity comments.

Because the comment count now exists for nested activity comments, this had
the unintended consequence of showing activity comments on singular
activity comment entries. Since the current javascript / AJAX code is
unable to determine the parent activity ID correctly on a singular
activity comment item, this would result in the "View Conversation" link
being incorrect for replies that were made to these items.

This commit resolves this issue by removing the activity comment count
check, which will not output the activity comment form for singular
activity comment entries.

Fixes #5172.

#18 @sgr33n
11 years ago

Everything is ok on the latest svn, thanks :)
But... is it a wanted behavior that when you're not logged in, even if you can see the "view conversation" link, and you can click on it, you will see just the parent status (there are no visible comments)? Doesn't really make sense...

#19 @r-a-y
11 years ago

Thanks for catching this, sgr33n!

See r7483 for the activity permalink / not-logged-in fix.

I linked to the wrong ticket in that commit!

Last edited 11 years ago by r-a-y (previous) (diff)

#20 @sgr33n
11 years ago

Thanks to you :)

#21 @DJPaul
8 years ago

  • Component changed from Appearance - Template Parts to Templates
Note: See TracTickets for help on using tickets.