The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
undefined method db::query_first_slave() in class_dm_threadpost.php
Hi,
Version = 3.8.4 (PL1) I am attempting to use the data manager to create a new thread in the forums. A user add an entry to an external calendar and I want to create a new thread in the forums for the external calendar entry. I have some test code that has vBulletin data manager code only and that works fine. The thread is successfully added to the database .... PHP Code:
PHP Fatal error: Call to undefined method db::query_first_slave() in [forums path]/includes/class_dm_threadpost.php on line 74 I have ensured that the call to vBulletin's global.php is not inside a function. Here is some of the code from my calendar script ... PHP Code:
|
#2
|
||||
|
||||
Me again.
Not really sure if chdir()'ing to the vBulletin's directory before including global.php will help; try and see if this works: PHP Code:
|
#3
|
|||
|
|||
Quote:
Unfortunately though, it did not work Any other thoughts as to why this could be occurring? I've been reading and searching through this forum and I saw a somewhat similar issue whereby the outcome was that the person was also creating and using a mysql connection via php's mysql_connect command and that apparently this command can re-use currently open database connections. My mysql_connect command has the new_link parameter set to true to ensure that an new connection is made and an existing one isn't re-used. Is it possible that vBulletin doesn't have the same parameter set and it's trying to re-use the mysql connection I have already opened? |
#4
|
||||
|
||||
Could it be that your custom script uses a global $db variable too; overwriting the one that vBulletin references via $vbulletin->db ?
Does simply initializing vBulletin inside your script (require_once '/global.php') throw this Fatal Error ? (commenting out all DataManager related code) I'm running out of ideas. :erm: Sorry. We may need someone who's more experienced in vB to look into this. |
#5
|
||||
|
||||
Have you tried taking out the lines connecting to your database and just using vb's method to connect to the database? Since you are calling vb scripts in your page, you are using two different methods to connect to the database and that may be causing problems.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|