setUserPlaceholders

Using the setUserPlaceholders code below any visitor (non-member and member alike) clicking a text link can filter and display all of the articles created by a specific member. It works perfectly except for one thing: the displayed result is prepended with “User not found” and I have no idea why.

It was working fine prior to the last update of the classExtender Extra of which setUserPlaceholders is a part.

[[!setUserPlaceholders? &userId=`[[+createdby]]`]][[+screenName]] has written [[+page.total]] article[[!pluralFilter? &count=`[[+page.total]]`]]

Ideas?

Thanks,

Todd

As far as I know, there were no changes to that snippet since the last version that would cause this. Are you sure it shouldn’t be [[*createdby]]?

If not, what is setting the [[+createdby]] placeholder?

Try adding this line to a page to make sure that placeholder is being set:

<p>Created By: [[+createdby]]</p>

Arghh! Well spotted, Bob.

I changed this:

[[!setUserPlaceholders? &userId=`[[+createdby]]`]][[+screenName]] has written [[+page.total]] article[[!pluralFilter? &count=`[[+page.total]]`]]

to this:

[[!setUserPlaceholders? &userId=`[[*createdby]]`]][[+screenName]] has written [[+page.total]] article[[!pluralFilter? &count=`[[+page.total]]`]]

No more “User not found.”

Thank you.

I’m glad you got it sorted. Is there an error in the docs that led you to use the + sign?

I very much doubt the docs are incorrect and would absolutely bet it was a typo on my part. Though why I would even touch the code when it had been working correctly I can’t say but clearly I did.

Been there; done that. :wink:

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.