Ok, next up.. lol. Sorry to make it seem like all I'm doing is pointing out problems - because overall this is an excellent product. We have an issue where a user submitted their own new product which we approved. That seemed to work fine. However, when the user (or anyone for that matter) go to leave a review of the product, we (including myself as an admin) get this error:
We had an issue posting your review, please try again or contact support and use code 164251-E.
That error, according to your code seems to relate to something having to do with not being able to add new posts to the thread (build_new_post() function not adding the post?). When I turn on debugging, the only additional info I get in the error is Array (not the contents of the array).
The thread appears to be open and able to be posted in, according to mysql:
mysql> select open from thread where threadid = xxxxxx;
+------+
| open |
+------+
| 1 |
+------+
1 row in set (0.00 sec)
mysql> select visible from thread where threadid = xxxxxx;
+---------+
| visible |
+---------+
| 1 |
+---------+
1 row in set (0.00 sec)
|