ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Problem with author_id="CURRENT_USER"

June 24, 2011 9:09am

Subscribe [2]
  • #1 / Jun 24, 2011 9:09am

    misc

    54 posts

    Dear EE team

    I am working with EE Version 2.1.3 / Built 20110411 and have the following problem:

    {exp:channel:entries channel="test" author_id="CURRENT_USER" limit="1"}
    {title}
    {if no_results}
    no results
    {/if}
    {/exp:channel:entries}

    This code creates a correct result, if the current user already has an own channel entry. If not, it shows not the no-results-value but an entry of another user.

    I’ve tried also to add:

    dynamic="no" // -> with the same result //

    and

    require_entry="yes" // -> delivers no results //

    Thank you very much for your help.

    Kind regards,
    MISC

  • #2 / Jun 27, 2011 5:25am

    John Henry Donovan

    12339 posts

    misc,

    I just tested this with EE2.2 and cannot replicate. What does your URL look like?

    For my test I just put the code you have above into a blank template and nothing else. Can you try the same please?

    Do you have any add-ons?

  • #3 / Jun 27, 2011 7:34am

    misc

    54 posts

    Thank I will check it (I have Socialee installed, perhaps this module creates the problem).

  • #4 / Jun 27, 2011 9:49pm

    Lisa Wess

    20502 posts

    Thanks, misc.  Let us know what you find out after you check it out.

  • #5 / Jul 05, 2011 9:44am

    misc

    54 posts

    Dear Solspace Team

    After hours and hours, I think that I have found the problem:

    “Cache Dynamic Channel Queries” was enabled. After disabling this function, it works properly now.

    Thanks for your support.

    Kind regards,
    MISC

  • #6 / Jul 05, 2011 5:11pm

    Lisa Wess

    20502 posts

    Well we’re not the Solspace team, but thank you for following up with us on that!  Definitely something to bear in mind in future troubleshooting.

    If anything else comes up, please don’t hesitate to let us know.  Thanks!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases