Thread: Private Messages Enhancements - Private Message Attachments
View Single Post
  #58  
Old 10-04-2012, 05:53 PM
ehpoole's Avatar
ehpoole ehpoole is offline
 
Join Date: Feb 2012
Location: Anderson, SC
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Aside from the headaches of cleaning up our database tables from a previous failed Product XML Upload failure due to "Database Error" so as to return all the table entries and fields to a virgin state, I also ran into the following faults in the original XML file:
  1. Very Minor - Descriptions alternate between German and English in both the XML file and portions of the instructions files -- all the Plugin titles are in German for instance. I don't want to harp (or even really complain for that matter) on this one because language is inherently relative to the observer, but I figured I should probably mention it for consistency's sake.
  2. On Lines 160 and 261 of the XML file, the SQL Query does not properly reference tables that have a vBulletin TABLE_PREFIX attached to them... The initial FROM statement is correct, but the "as attachment" portion of the Query is missing, so the query fails a bit further in when the table.fieldid "attachment.contenttypeid" is called. This will only fail for sites that have defined a TABLE_PREFIX value, but should be corrected.
  3. The more troublesome one (for me) was on Line 160 (again) where "attachment.contenttypeid" is set:

    PHP Code:
    attachment.contenttypeid " . vB_Types::instance()->getContentTypeId('PMAttachments_PrivateMessage') . "
    It appears that the call to getContentTypeId is coming too early in the process, as the value returned is an empty string rather than the intended value. However, this same code works later on come line 261, so clearly it is an order-of-execution issue. This suggests that this query should be moved until after the "pmattachments" row has been added to the "packages" table so that the call does not fail.

    I temporarily worked around this issue by hard coding the next Auto Increment value to be assigned to the next record ID for the "packages" table so that I could at least get the Product installed ("13" in my case, after some earlier failed attempts and cleanups).
I apologize for having to submit these changes rather than a corrected XML Product File. I am comfortable enough to make minor tweaks to the XML files, but I am not comfortable enough with my knowledge of the XML file's layout to make wholesale changes so that I can change the order of execution of the "contenttype" table's record insertion. Especially not comfortable enough to submit something that others will run on their servers!



Despite my concerns, I do greatly appreciate your sharing this plugin with us as our users genuinely want the functionality without having to wait for vBulletin to get around to releasing such. I hope my suggested amendments will help both yourself and other users trying to install the product. The instructions user nevbear666 provided for backing out the database changes were most valuable to eventually getting the product installed (after making my above changes), they certainly saved me some time.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01145 seconds
  • Memory Usage 1,781KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete