[Solved] CNS_TOPIC_POST.tpl is receiving empty POSTER and POSTER_TITLE parameters...
Posted
#5344
(In Topic #1222)
Standard member

Where are those parameters passed into the template?
Hello all,It came to my attention this weekend that my Conversr forums have become broken somehow. I've spent a good portion of my day trying to figure out the cause, but I'm getting nowhere fast.
The problem is that the POSTER and POSTER_TITLE parameters are being passed to CNS_TOPIC_POST.tpl as empty for some reason. As a result, the {+START,IF_NON_EMPTY,{POSTER}} statement is returning false and not displaying member info for each individual forum post. You can see an example here, where there's an empty blue column on the left side of each post where the member info is supposed to be.
Curiously enough, if I remove the IF_NON_EMPTY check, I see the member avatars only, meaning that POST_AVATAR is still being returned properly.
I see in my database (in the cms_f_posts table) that p_poster is a number, and p_poster_name_if_guest is the member's name in text. I've been mucking around in PHP files all day, including (but not limited to) cns_topicview.php, cns.php, and cns_forums.php; it's not clear to me where exactly the parameters being served to CNS_TOPIC_POST.tpl are coming from. (Searching around on the GitHub repository suggests sources/hooks/systems/preview/cns_post.php simply because it returns an array that's almost all of the parameters available in the template editor for CNS_TOPIC_POST.tpl, but I don't know why we'd be using a preview hook for the topicview page.)
This issue occurred somewhat recently, but I haven't yet pinpointed what exactly caused the problem. I'm assuming it was a recent upgrade, as I did install a minor point release last week. The only other thing I can think of would be my trying to tweak the URLs in search.php last month, but I wasn't trying to touch the forums at that point and I ended up reverting my changes anyway.
As another note, the titles on all of my topicview pages now display as "<Actual Title> - Comments - Comments - Comments - Comments…" for some reason, and every reply to a topic also has its title set to "- Comments". I have no idea if that's related or not, but I know it wasn't the case before.
I'm not a PHP guru, so any pointers in the right direction for tracking down the issue(s) would be greatly appreciated!
Edit: I just discovered that moving sources_custom to sources_custom.bak fixes this issue, so I'm now going through and trying to diff everything in my sources_custom against the plain sources versions. I expected that the issue was caused by something I changed, but I'm still on the hunt for what got updated that triggered the breakage.
Last edit: by jacobgkau
Posted
Standard member

Sorry for the noise.
Posted
Standard member

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved
just peace, unity, tolerance and love" - The Beloved
1 guest and 0 members have just viewed this.
