badgerandblade
Customer
We have a custom very simple plugin that has worked fine for years but DOES NOT work when the user tagging addon is installed. The error logs show that PHP couldn't find the USERTAG class. Here is the error:
Here is our code, which runs at the paidsub_build hook.
As you can see, it simply sets up a threadmanager instance and uses it to make a new thread. As I said, this code has worked fine for years. Only when the advanced user tagging pro product is installed does it not work. More importantly for troubleshooting, is that if I add the subscription to a user via the admincp, the code runs fine, no errors. Only when the Paypal IPN fires does it error out. Again, when the advanced user tagging pro addon is installed, adding a paid subscription to user via admincp, the code runs fine but when the code is run through the paypal IPN, it errors out complaining about not being able to find the USERTAG class. When the advanced user tagging pro product is disabled, the code works fine in both scenarios.
Code:
PHP Fatal error: Class 'USERTAG' not found in /home/site/public_html/vb/dbtech/usertag_pro/actions/parse/hash.php on line 11
Here is our code, which runs at the paidsub_build hook.
PHP:
if($subscriptionid == 17) {
$post_forumid = 167;
$post_userid = 40409;
$post_userinfo = fetch_userinfo($post_userid);
$post_foruminfo = fetch_foruminfo($post_forumid);
$subject = 'New TESTING OFFSITE subscription for ' . $user['username'];
$message = '[url=http://www.site.com/vb/member.php/' . $user['userid'] . '-' . $user['username'] . ']' . $user['username'] . '[/url] has just purchased a vendor subscription';
$threadman =& datamanager_init('Thread_FirstPost', $this->registry, ERRTYPE_SILENT, 'threadpost');
$threadman->set_info('forum', $post_foruminfo);
$threadman->set_info('is_automated', true);
$threadman->set_info('skip_moderator_email', true);
$threadman->set_info('mark_thread_read', true);
$threadman->set_info('parseurl', true);
$threadman->set('allowsmilie', true);
$threadman->set('userid', $post_userinfo['userid']);
$threadman->setr_info('user', $post_userinfo);
$threadman->set('title', $subject);
$threadman->set('pagetext', $message);
$threadman->set('forumid', $post_foruminfo['forumid']);
$threadman->set('visible', 1);
$threadman->set('ipaddress', '');
$threadman->save();
}
As you can see, it simply sets up a threadmanager instance and uses it to make a new thread. As I said, this code has worked fine for years. Only when the advanced user tagging pro product is installed does it not work. More importantly for troubleshooting, is that if I add the subscription to a user via the admincp, the code runs fine, no errors. Only when the Paypal IPN fires does it error out. Again, when the advanced user tagging pro addon is installed, adding a paid subscription to user via admincp, the code runs fine but when the code is run through the paypal IPN, it errors out complaining about not being able to find the USERTAG class. When the advanced user tagging pro product is disabled, the code works fine in both scenarios.
Last edited: