Loading...
 

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
(0)
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 (Tiki 19+)
Please demonstrate your bug on show2.tiki.org
 About show2.tiki.org

To help developers solve the bug, we kindly request that you demonstrate your bug on a show2.tiki.org instance. To start, simply select a version and click on "Create show2.tiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show2.tiki.org.

Version: Create show2.tiki.org instance
Demonstrate Bug (older Tiki versions)
Please demonstrate your bug on show.tikiwiki.org
 About show.tikiwiki.org

To help developers solve the bug, we kindly request that you demonstrate your bug on a show.tikiwiki.org instance. To start, simply select a version and click on "Create show.tikiwiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show.tikiwiki.org.

Version: Create show.tikiwiki.org instance
Ticket ID
894
Created
Wednesday 04 October, 2006 14:23:27 GMT-0000
by Unknown
LastModif
Monday 31 December, 2007 14:49:06 GMT-0000

Attachments

 filenamecreatedhitscommentversionfiletype 
No attachments for this item


Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI & 508)
Accounting
Administration
Ajax
Articles & Submissions
Backlinks
Banner
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution
Cookie
Copyright
Credits
Custom Home (and Group Home Page)
Database MySQL - MyISAM
Database MySQL - InnoDB
Date and Time
Debugger Console
Diagram
Directory (of hyperlinks)
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
DogFood
Draw -superseded by Diagram
Dynamic Content
Preferences
Dynamic Variable
External Authentication
FAQ
Featured links
Feeds (RSS)
File Gallery
Forum
Friendship Network (Community)
Gantt
Group
Groupmail
Help
History
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
jQuery
Kaltura video management
Kanban
Karma
Live Support
Logs (system & action)
Lost edit protection
Mail-in
Map
Menu
Meta Tag
Missing features
Visual Mapping
Mobile
Mods
Modules
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Organic Groups (Self-managed Teams)
Packages
Payment
PDF
Performance Speed / Load / Compression / Cache
Permission
Poll
Profiles
Quiz
Rating
Realname
Report
Revision Approval
Scheduler
Score
Search engine optimization (SEO)
Search
Security
Semantic links
Share
Shopping Cart
Shoutbox
Site Identity
Slideshow
Smarty Template
Social Networking
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
Syntax Highlighter (Codemirror)
Tablesorter
Tags
Task
Tell a Friend
Terms and Conditions
Theme
TikiTests
Federated Timesheets
Token Access
Toolbar (Quicktags)
Tours
Trackers
TRIM
User Administration
User Files
User Menu
Watch
Webmail and Groupmail
WebServices
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace and perspectives
WYSIWTSN
WYSIWYCA
WYSIWYG
XMLRPC
XMPP




Useful Tools