vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Confused : $post[field10] randomly not populated? please help (https://vborg.vbsupport.ru/showthread.php?t=149278)

SDB 06-09-2007 10:13 AM

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?

SDB 06-09-2007 11:15 AM

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?

NolF 06-09-2007 11:39 AM

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?

SDB 06-09-2007 01:59 PM

Guys, thanks for the replies.

Quote:

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:


All times are GMT. The time now is 10:25 AM.

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.00970 seconds
  • Memory Usage 1,720KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete