Mail-In to Forum does not follow thread when original post has moved
- Status
- Pending
- Subject
- Mail-In to Forum does not follow thread when original post has moved
- Version
- 1.9.x
- Category
- Error
- Patch
- Feature
- Forum
Mail-in - Submitted by
- walls1500
- Volunteered to solve
- walls1500
- Rating
- Description
I am using tikiwiki for a project at work, and one of the features we needed was the "mail-in" forum posting. The way we use this is a sales rep will e-mail an issue to a PDL. One of the e-mail addresses in the PDL is the pop account for one of the forums for our site. The site moderator reads the new "post" (e-mail) and decides which forum the discussion belongs in and moves the post to the "correct" forum.
The problem is that once moved, replies via the PDL do not follow the original thread (to the moved forum). The best case is that they end up in the "mail-in" forum location.
- Solution
This is what I did to solve the problem for me. You can choose to ignore the issue altogether or solve it a different way. This is my first "bug report" to tikiwiki, so I didn't just want to jump in and plop down a solution for you. Please carefully review it because I'm not 100% sure it was the right fix to make:
In lib/commentlib.php/Comments::process_inbound_file():
// Determine if the thread already exists.
$parentId = $this->getOne(
"select `threadId` from `tiki_comments` where
`object`=? and `objectType` = 'forum' and
`parentId`=0 and `title`=?",
array($forumId, $title)
);// By default, use the original forumId.
$curForumId = $forumId;
if (!$parentId)
{
// If we didn't find a parent for this item, go see if this title
// exists in any forum.
$parentId = $this->getOne(
"select `object` from `tiki_comments` where
`objectType` = 'forum' and `title`=?",
array($title)
);if ($parentId)
{
// Found it! Mark the current forumId as the retunred value.
$curForumId = $parentId;// Now find the id of the original post.
$parentId = $this->getOne(
"select `threadId` from `tiki_comments` where
`objectType` = 'forum' and `title`=?",
array($title)
);
}
}From this point on in the function, all references to "$forumId" need to be replaced with "$curForumId".
- Importance
- 2
- Priority
- 10
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 894
- Created
- Wednesday 04 October, 2006 14:23:27 UTC
by Unknown - LastModif
- Monday 31 December, 2007 14:49:06 UTC