The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Proiblems with Templater after datamager thread post
Im creating a custom Post-Registration Application system for our use.
On submit all the info is stored in custom profile fields, A post is made with the information in our application review forum. However Im having a problem with the Template in this system. If I render the template before the post the post doesnt happen. If I render the template after the post, the render doesnt happen. IE Blank white page PHP Code:
PHP Code:
|
#2
|
|||
|
|||
Well, the reason you don't see the post if you render first is because print_output() exits the script, so it doesn't return. Maybe the reason you get a blank page if you render last is because something before it is causing an error, but I don't see offhand what's wrong. If error messages are turned off, maybe you're not seeing the error message?
Edit: if you're seeing the post when you post first, then maybe that means the problem is with one of the build counter functions. Maybe you need to inlcude includes/functions_databuild.php? |
#3
|
||||
|
||||
This is what I use in my mods to make the post, build the thread counters, and if chosen, update the posters post count..
PHP Code:
|
#4
|
|||
|
|||
I found the issue. One of my fellow coders was using $userdata[] in their code globally on a userdata_postsave plugin. This was throwing a fatal error Call to a member function fetch_field() on a non-object I changed my $userdata to $usrdata and the problem went away completely.
However I did notice one other thing in the logs. I get 10 or so of these 14:49:26 PHP Warning: Illegal offset type in isset or empty in /var/www/dev.elitetestingservices.com/public_html/vb/phrase.php on line 339 error 14:49:26 PHP Warning: Illegal offset type in /var/www/dev.elitetestingservices.com/public_html/vb/phrase.php on line 334 Im calling phrases in part of my code, maybe you can tell me what Ive done wrong PHP Code:
|
#5
|
|||
|
|||
I'm not familiar with the vB_Phrase class, but looking at the code, it seems that that warning is happening because you're passing null as the second parameter to fetchPhrase(). You say it works so I guess it's OK to do that, but I don't know what that's supposed to do or what you could do instead.
|
#6
|
|||
|
|||
its a parameters for passing {option} type of things to the phrase. However these phrases do not use them. I could try something else in there I guess I added null to get rid of the Missing 2nd argument warnings
|
#7
|
|||
|
|||
Well, now that I think about it a little more, I really was making a guess. It may not be the null. But I suppose it's easy enough to try.
|
#8
|
|||
|
|||
Oh, yeah, I was being an idiot. I'm pretty sure the problem is really that the first argument should be a string but you're passing the vB_Phrase object. It looks llike the parameters should be the phrase group and the phrasekey, which I believe is the phrase name.
|
#9
|
|||
|
|||
I believe you are correct after I look at the documentation again.
static fetchPhrase (line 333) Fetches a rendered phrase. If the phrase is not in the local phrase cache, then the phrasekey cache is loaded and purged. return: - The translated phrase access: public static string fetchPhrase (string $phrasegroup, string $phrasekey, [array $parameters = array()]) string $phrasegroup: The phrase group where the phrase is located string $phrasekey: The phrasekey of the phrase array $parameters: mixed - Array of parameters to parse into the phrase That will teach me to code until 4am lol ***EDIT*** PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|