View Full Version : Confused : $post[field10] randomly not populated? please help
Hi
I have the following code in my postbit_legacy template :
<if condition="$post[field10] == ''">
Seemingly completely randomly, when the thread loads, the $post[field10] variable is not populated.
In fact it seems that none of the user fields under the $post object are populated.
They are either populated for all posts on the thread, or for none, and I can't find any pattern to it.
Any help / pointers would be really great.
Simon
Dismounted
06-09-2007, 11:08 AM
Are you trying to test if it's populated or not populated in that conditional?
Hi, thanks for the reply.
Basically, yes. (Are you going to tell me off!? :D)
Simon
Dismounted
06-09-2007, 11:30 AM
Where are you putting the variable?
Something similar happened to me (I think) It had to do with permisions, I put the field as "private field" so users without the permisions wouldn't get the $post[fieldx] working since it wouldn't show to them with their permisions.
Worth a shot, although I don't think (after rereading your problems) this would be the cause.
Antivirus
06-09-2007, 12:40 PM
Are the custom user fields bitfield values?
Guys, thanks for the replies.
Where are you putting the variable?
Not sure what you mean by this. The variable is an added user field, and that conditional statement is in the postbit_legacy template. If this hasn't asnwered your question could you explain it differently for me please?
--
NolF
The feild is indeed private, so that only admin can amend it for each account.
--
Antivirus
No, they are text fields.
--
To be clear.. this works intermitently, and "seemingly" randomly.
In other words if I included the test code :
<if condition="$post[field10] == ''">
XXX
<else />
YYY
</if>
Then sometimes the thread would load and there would be XXX next to the user's name, and another time the same thread loads, the same user would have YYY next to their name without any changes taking place in the database for those fields against that user.
:confused:
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.