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.

Failed to filter Logged in user’s entries with CURRENT_USER

November 08, 2010 12:52pm

Subscribe [5]
  • #1 / Nov 08, 2010 12:52pm

    Musa

    124 posts

    Hi,

    I’ve following tag to pull entries added by logged in User -

    {exp:weblog:entries weblog="my_weblog" author_id="CURRENT_USER"}
    my contents
    {/exp:weblog:entries}

    But it fails. It loads other users(previously logged in) data.
    Note: i’ve set to “Cache Dynamic Queries” to “Yes”

    How can i solve this?

    Thanks

    Moved to EE2 Forum by Moderator

  • #2 / Nov 09, 2010 1:29am

    Musa

    124 posts

    Is it a dumb question?? No reply :(

  • #3 / Nov 09, 2010 3:30pm

    Ingmar

    29245 posts

    How can i solve this?

    What version and build of EE are you using? That said, yes, please do try to disable caching.

  • #4 / Nov 10, 2010 1:03am

    Musa

    124 posts

    Using EE 2.x and query cache disabling solve this issue but my opinion - why query cache disabling solve this issue? SQL query supposed to be cached with logged in user id, not with the global constant “CURRENT_USER”, any thoughts?

  • #5 / Nov 10, 2010 11:22am

    Sue Crocker

    26054 posts

    kodegeek, I honestly don’t have an answer for that one.. but let me ask the dev team. Thanks in advance for your patience.

  • #6 / Nov 10, 2010 1:15pm

    Brandon Jones

    5500 posts

    Hi kodegeek,

    There’s definitely interaction there; I suspect one depends on the other. So in this case disabling query caching is going to be necessary.

  • #7 / Nov 10, 2010 1:17pm

    ImpGabe

    171 posts

    If you’re doing this in EE2, might I suggest you use the channel tag instead of the weblog tag.
    Unless you are using that and posted the wrong code. In which case please ignore me.

  • #8 / Nov 10, 2010 1:22pm

    Musa

    124 posts

    Ohhh, I’m so sorry. It was happened for EE 1.x, i didnt try in EE 2.x

  • #9 / Nov 11, 2010 8:09am

    Sue Crocker

    26054 posts

    kodegeek, is this a 1.x or a 2.x issue? I need to put it in the right support forum. But as Brandon mentioned, query caching may still need to be disabled.

  • #10 / Nov 11, 2010 9:04am

    Musa

    124 posts

    Sue Crocker, its 1.x issue for me, i don’t know about 2.x. Yes, It doesn’t happen when query caching disabled but is this normal?

  • #11 / Nov 11, 2010 5:44pm

    Ingmar

    29245 posts

    OK, I’ll move this to the 1.x forum. That said, yes, this is expected behavior. Just disable caching and you should be fine.

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

ExpressionEngine News!

#eecms, #events, #releases