Project

General

Profile

Actions

Bug #1857

closed

Reply By Email not setting up topic info correctly in forum replies

Added by Boone Gorges about 12 years ago. Updated almost 12 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
BuddyPress (misc)
Target version:
Start date:
2012-04-24
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

When replying to a forum post via Reply By Email on cdev, you get something that looks like this:

boonebgorges posted on the forum topic "" in the group boone hidden test via email:

"abc" 

To view or reply to this topic, log in and go to:
http://cdev.gc.cuny.edu/groups/boone-hidden-test/forum/topic//?topic_page=0#post-2705

Note the empty forum name, etc.

I have had a hard time debugging this. (As a side note, I kept experiencing the strangest thing, where I would make a change to a PHP file - like adding a bp_rbe_log() call - but the next time I sent an email, it's as if I hadn't made the change. Yet the change is there - I can close and reopen the PHP file and still see it. It's almost as if there is some sort of strange server caching going on. Either that or I'm just missing something.)

But here's what comes up in the WP_DEBUG log:

PHP Notice:  Trying to get property of non-object in /.../plugins/bp-reply-by-email/includes/bp-rbe-functions.php on line 689

That's in reference to the $topic variable, which apparently is not being defined correctly. It's the strangest thing, though - clearly, the topic_id is populated (or the post wouldn't be going to the correct topic). I guess there is a problem with bp_forums_get_topic_details(), but nothing is showing up in the logs.

Ray, can I ask you to have a look? Maybe something will jump out at you that hasn't for me. (Copying Chris, who originally raised the issue in the Basecamp thread, I think.)

Actions #1

Updated by Chris Stein about 12 years ago

I noticed it happened but wasn't happening all of the time. In terms of the time I noticed it the following was true:
  • It showed up in email so the response was sent back out to people in the group. But the forum topic is blank in the email subject.
  • It showed up in the group's activity stream
  • It showed up in the person's activity stream
  • It did not show up in the forum.
Looking at it again it seems like the problems may have stemmed from a single post. There is a post by Boone that starts "In light of the review by Tursi"
This one is the first that did not show up in the forum. It is different than the other ones because:
  • The forum topic is in the email subject (in my email the subject was "boonebgorges posted on the forum topic "The Super Duper Awesome Email Client Thread" in the group Email test group via email [CUNY Academic Commons]" )
  • It does NOT show up in the activity stream.

Like the other ones it does not show up in the forum.

Matt then replied to this (I'm assuming because Matt mentions Tursi in the email) and that is the firs that fits the pattern above with no topic. There are two other posts by Matt right after that that also have the problem. Matt, I'm adding you as a watcher. Maybe you can remember which email you replied to in those?
Boone then replied to one of those other two emails and it also continued the problem. Then I replied to Matt's reply with Tursi in it and that also had the problem.

Boone, I don't know if you remember doing anything different with that original Tursi post but so far it seems that is where the issue started and the rest came from that.

Actions #2

Updated by Raymond Hoh about 12 years ago

I have had a hard time debugging this. (As a side note, I kept experiencing the strangest thing, where I would make a change to a PHP file - like adding a bp_rbe_log() call - but the next time I sent an email, it's as if I hadn't made the change. Yet the change is there - I can close and reopen the PHP file and still see it. It's almost as if there is some sort of strange server caching going on. Either that or I'm just missing something.)

I've encountered the same thing during debugging. I should have noted that every time a code change is made to RBE, you must deactivate and reactivate the plugin again.

This is, I believe, because the script is using the code compiled at run-time.


As for the empty forum name and the phantom Tursi topic, that could be a consequence of replying to an older email that had the wrong activity variables as noted by Boone in #1845. I posted a response about this in a reply on Basecamp:
https://castiron.basecamphq.com/projects/3936081-cuny-academic-commons-community-team/posts/61444974/comments#comment_174397682

Boone and Chris, can you recreate this bug on brand-new forum topics?

Actions #3

Updated by Boone Gorges about 12 years ago

Chris, thanks for the response. As Ray notes, the "Tursi" problem is related to #1845, which has been fixed. However, the problem I've described above is happening even in new threads.

I'll try to spend some more time with this issue later today, if Ray hasn't gotten to it first.

Actions #4

Updated by Raymond Hoh about 12 years ago

Boone: I duplicated this on my local install. It appears to be a problem with bp_forums_get_topic_details().

When I switched out bp_forums_get_topic_details() for a direct $bbdb->get_row call, this fixed the issue.

I just pushed this to master - https://github.com/castiron/cac/commit/facc3dc550bcc46542922f72c20450479240b7f0

Can you give it a test when you have a moment?

Actions #5

Updated by Boone Gorges almost 12 years ago

  • Status changed from Assigned to Resolved

Whoop! Works great. Thanks, Ray.

I wish I knew why bp_forums_get_topic_details() wasn't working, but to be honest, I have no desire to spend any time in BB_Query today, thankyouverymuch :)

Actions

Also available in: Atom PDF