vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Private Messages Enhancements - Private Message Attachments (https://vborg.vbsupport.ru/showthread.php?t=284138)

hubba 07-28-2012 12:55 AM

>Duplicate entry 'PMAttachments' for key 'class'

Same...

WolfWiz 07-30-2012 12:42 AM

No Joy on install, great product if it worked something that has been lacking in VB for a long time. Wish it was working .

wii 08-13-2012 06:51 AM

So, it doesn't work ?

nevbear666 09-06-2012 12:58 PM

yep, does not work, actual error:

Code:

Database error in vBulletin 4.2.0:

Invalid SQL:

        UPDATE pm AS pm
        SET attach = (SELECT COUNT(*) FROM attachment WHERE contentid = pm.pmid AND attachment.contenttypeid = );

MySQL Error  : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 2
Error Number  : 1064
Request Date  : Thursday, September 6th 2012 @ 09:48:49 AM
Error Date    : Thursday, September 6th 2012 @ 09:48:51 AM
Script        : http://#########/admincp/plugin.php?do=productimport
Referrer      : https://#########/admincp/plugin.php?do=productadd
IP Address    : ###.###.###.###
Username      : ########
Classname    : vB_Database
MySQL Version : 5.0.95-community

the problem is, that:

vB_Types::instance()->getContentTypeId('PMAttachments_PrivateMessage' )

returns an empty value.

for everyone with that duplicate errors, thats because database fields get added to existing tables before the script breaks.

need to remove a few:
from table "pm" remove "attach" and "attachmap"
from usergroup remove "advpmpermissions"
from packages remove the entry "PMAttachments"
from contenttype remove the entry "PrivateMessage"

the productinstaller of vbulletin is unable the remove database entries when theyre duplicate, even if you choose overwrite as an option, plus the script actually breaks before putting the entry into the products manager...

ps: bitte koenntest du die titel fuer die plugins ins englische umbenennen, fuer unsere uebersee freunde;-)

nevbear666 09-06-2012 03:04 PM

ps: even after fixing the obvious errors (VBForum_PrivateMessage instead of PMAttachment_PrivateMessage...), opening the newattachment.php link causes an error

Code:


#########, you do not have permission to access this page. This could be due to one of several reasons:

    Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
    If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

looking at the link i see a major difference between a working and non working url for calling newattachment.php:

doesnt work:
Code:

https://############/newattachment.php?values[u]=81&contenttypeid=16&poststarttime=1346946787&posthash=345jkasdf345jklsdgdr945
does work:
Code:

https://###############/newattachment.php?values[f]=15&contenttypeid=1&poststarttime=1346947324&posthash=345kldg893u56ioijgtkgtje
just a first glimpse...

tbworld 10-02-2012 04:17 AM

Thanks Andreas!

I have completed a similar hack for my company (in the core files, not a plugin). Your code examples helped me tremendously. Very, very grateful! :) Let me know if I can reciprocate.

ehpoole 10-04-2012 05:53 PM

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.

heugabel 10-16-2012 02:41 PM

1 Attachment(s)
works good :D

mat8861 10-18-2012 11:53 AM

Quote:

Originally Posted by heugabel (Post 2373457)
works good :D

on which vb version ?

SpaceStar 11-09-2012 09:44 PM

I too got an SQL error. Amazing some people put their unfinished and error-prone product to public use and then not willing to help. Bad product.


All times are GMT. The time now is 01:19 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01092 seconds
  • Memory Usage 1,753KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete