Plugin

Developer
Supported

Remember Me

ExpressionEngine 1.x, ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Wouter Vervloet

     

You must be logged in to post.

Not sure what’s happening

Support Request

Center Stage Guitar
Center Stage Guitar

Hi…
I have a template that displays list of channel entries. Each entry has a link to add to a playlist -

<a href="{path='centerstage/remember-me-api/add/{entry_id}'}">Add to Playlist</a

The href directs to the api page-

{if segment_3 == 'add'}
  {exp
:remember_me:save entry_id='{segment_4}' list='playlist' append="yes" return='centerstage/play-list'}
{
/if}
{if segment_3 
== 'remove'}
  {exp
:remember_me:remove entry_id='{segment_4}' list='playlist' return='centerstage/play-list'}
{
/if}
{if segment_3 
== 'clearall'}
  {exp
:remember_me:remove list='playlist' return='centerstage/play-list'}
{
/if} 

The issue is, after I login and go to the playlist page, it shows all the entries of that channel, not the ones I’ve saved. If I hit the clear all link on the page, they all go away right away and the you have no saved entries message comes up. If I go to the entries page and save an entry and it directs me to the playlist page, all the entries show back up again. It seems kind of random. Sometimes, just 1 or 2 entries show when I add an entry, but never the entry I just added. If I clear all and they go away. When I come back after adding one, the ones I just deleted show again. If I go into EE and edit the template and go back to the site and refresh the page, the correct entries show. It’s almost like a caching issue.

Here’s the code on the playlist page-

{if "{exp:remember_me:load channel='guitar_lessons'’ list='playlist'}" !=''}
      {exp
:channel:entries channel='guitar_lessons' entry_id='{exp:remember_me:load channel="guitar_lessons"’ list="playlist"}' parse='inward' dynamic='no'}
        {entry_id}
      {
/exp:channel:entries}
    {if
:else}
      Sorry
your playlist is currently empty.
   
{/if} 
Wouter Vervloet
# 1
Developer
Wouter Vervloet

Hi,
I think I know what is going on… The save, load and remove tags save the entries to the database along with a member_id, but since you weren’t logged in before, those entries aren’t inserted into the database.

– Wouter

Center Stage Guitar
# 2
Center Stage Guitar

Thanks for the reply. I logged in and tried it again while logged in and it still doesn’t show the latest add. Only the one before. Even if I clear all and go and add a new one, the one I deleted shows and not the latest one. I went into EE’s utilities and cleared the EE cache and then it showed the correct ones. Is there a cache setting somewhere that’s caching things? I have the template caching turned off. Thanks again for your help.

Wouter Vervloet
# 3
Developer
Wouter Vervloet

If you turn on the Template Debugger, can you see what is being parsed by the exp:channel:entries tag?

– Wouter