Wiccle.com in Facebook Wiccle.com in Twitter Wiccle.com in LinkedIn Wiccle.com in Youtube RSS from Wiccle.com Wiccle.com in Atom
 
 
 

Thread: Member order by Last Active displays Last Registered not last active [Solved]

Started: March 7, 2010, 07:54 PM  ⋅  Zone: Public Forums  ⋅  Category: Bugs & Troubleshooting  ⋅  Posts: 6  ⋅  Views 829
Started by: john  ⋅  Description: There was a file forgotten from the 1.20->1.21 upgrade bundle. Here you have it, and a bit more to top it off.
Post #1
Member: john  ⋅  Date: March 7, 2010, 07:54 PM  ⋅ Subject: "Member order by Last Active displays Last Registered not last active"

In page - Members Home - I have a box which displays members last registered instead of Last Active (when Last Active has been selected).

The box preferances are:

Box Type:  Member

Module:  (blank)

Order by:  Last Active (newest first)

Limit by:  Global

Format:  Member Short

 

I'm reasonably sure this worked in 1.20.

Post #2
Member: Markus  ⋅  Date: March 8, 2010, 01:18 AM  ⋅ Subject: "Re: Member order by Last Active displays Last Registered not last active"

That's odd. The settings are correct. Here's the debugging as it goes along, for all you debuggers out there who want to understand what your system does.

I have created two test pages in our demo, Last Active and Last Registered. Now, when I'm logged in as admin and append &debug=on to the end of the URL, I get to look at the MySQL queries. They are:

SELECT *, member_display_name AS member_name FROM w_members GROUP BY member_id ORDER BY member_last_active DESC LIMIT 0, 20 // @Module::get_elements / 638@class_templates.php

SELECT *, member_display_name AS member_name FROM w_members GROUP BY member_id ORDER BY member_registered DESC LIMIT 0, 20 // @Module::get_elements / 638@class_templates.php

As you can see, the queries are correct. I could go hunt the timestamps down in the database, but let's extend the skin_members.php / member_short instead to display the last active time so we get something useful out of this session. You can do this mod to your own site if you want. I am adding in (wherever you wish, line #102 is as good a spot as any):

Last Active: [[MEMBER_LAST_ACTIVE]]

Now, this will just put the timestamps in. What we need is one of them preprocessors! class_modules.php, line #566 onward we have the default function member_preprocess(), and I'm  going to stick it there for now so it's in global use. I'm actually just copypasting the timestamp convertor from the post_preprocessor right next door, and entering this in (anywhere in the function):

    $data['member_last_active'] = Utility::make_date($core['module']['format_post_date'], $data['member_last_active'], 30);

Now we can actually get to see the last active dates in their profiles. Can you please look those up on your site and see what they say? (I'm assuming you would actually like to have this shown there.) As you can see on the demo pages I linked to above, the ordering seem to be lagging in the default 1.21 setup, and this must be because of some session cache handling changes I did for 1.21. I am looking at that now, and will get back to you in a jiffy on where the actual problem lies.

I have also inserted the above into the upcoming 1.21.1 files, so this will be available out of the box for the next release. (With the exception that I of course added the "Last Active" into language files and put in a language tag instead.)

Post #3
Member: Markus  ⋅  Date: March 8, 2010, 01:46 AM  ⋅ Subject: "Re: Member order by Last Active displays Last Registered not last active"

There is a bug in the iWiccle 1.20 class_iwiccle.php file that causes last_active status to not update. If you have upgraded from 1.20 to 1.21 prior to this message, you will need to grab an additional file that was missing from the upgrade bundle. If you did a fresh 1.21 install, this feature is working fine and you don't need to do anything.

----

The last_active status (and new mail status) should be updating every 60 seconds. You can change that in variables.php / $core['sys']['member_refresh_intv'] = 60; if you want.

The case here is this: it was not working in 1.20, and it is working in 1.21, but I forgot to add the updated class_iwiccle.php into the upgrade bundle. Naturally the last active time was then the same as last registered, as it never got updated again.

Download the forgotten file here: iwiccle_121_class_iwiccle_patch.zip

And just upload it over your existing /core/class_iwiccle.php file. Sorry about that! Need to triple check through the upgrade bundles in the future to make sure nothing goes amiss. I have now updated the upgrade bundle with this, and added a note of the same to the patch page.

There went cold and forgotten my cup of hot instant soup that I meant to sip down after reading your post and nailing this, but what the heck — another bug down!! Cheers, and let's all have a cup of cold soup for my bug allergies and a better iWiccle.

Post #4
Member: john  ⋅  Date: March 8, 2010, 03:51 AM  ⋅ Subject: "Re: Member order by Last Active displays Last Registered not last active [Solved]"

Yes, we now have Last Active displaying correctly!  Smile

Thanks Markus.

Post #5
Member: Markus  ⋅  Date: March 8, 2010, 12:29 PM  ⋅ Subject: "Re: Member order by Last Active displays Last Registered not last active [Solved]"

Great! Have you by the way checked your e-mails yet?

Post #6
Member: john  ⋅  Date: March 8, 2010, 08:58 PM  ⋅ Subject: "Re: Member order by Last Active displays Last Registered not last active [Solved]"

Hi Markus, yes I have checked my mail and responded.

Many thanks.

 

Bugs & Troubleshooting

Add to Favorites
Public Forums
Category  ⋅  Please report all bugs and discuss any problems in this forum.
 

Public Forums

Add to Favorites
Public Forums
Zone  ⋅ Public forum sections for support and discussions. Available for everyone.
 

Zone Categories

 
Questions? Ask us!
Back to Top