Resource icon

[AA] Notable Members [Paid] 1.3.1

No permission to buy ($7.50)
Does that happen with my add on uninstalled and just the post ratings one running?
Hi there, no I'm not seeing anything when just running post ratings, there are queries related to that and other add-ons but they don't trigger anything with the slow query log, that I can see.

Code:
# User@Host: @ localhost []
# Query_time: 0.017634  Lock_time: 0.000090 Rows_sent: 10  Rows_examined: 5514
SET timestamp=1406034395;
SELECT post.*
                ,
                    bb_code_parse_cache.parse_tree AS message_parsed, bb_code_parse_cache.cache_version AS message_cache_version,
                    user.*, IF(user.username IS NULL, post.username, user.username) AS username,
                    user_profile.*,
                    signature_parse_cache.parse_tree AS signature_parsed, bb_code_parse_cache.cache_version AS signature_cache_version,
                    0 AS like_date,
                    social_forum.logo_date,
                    social_forum.logo_width,
                    social_forum.logo_height,
                    social_forum.logo_crop_x,
                    social_forum.logo_crop_y,
                    social_forum.title AS social_forum_title,
                    social_forum_combination.cache_value AS secondary_social_forums
                    ,(select sum(count_received) from dark_postrating_count where user_id = post.user_id and rating in (20,1,2)) as positive_rating_count
              
                    ,(select sum(count_received) from dark_postrating_count where user_id = post.user_id and rating in (15,16,17,18,19,23,22,14,3)) as negative_rating_count
                ,
            pr2.rating,
                pr.*, post.post_id
            FROM xf_post AS post
          
                    LEFT JOIN xf_bb_code_parse_cache AS bb_code_parse_cache ON
                        (bb_code_parse_cache.content_type = 'post' AND bb_code_parse_cache.content_id = post.post_id)
                    LEFT JOIN xf_user AS user ON
                        (user.user_id = post.user_id)
                    LEFT JOIN xf_user_profile AS user_profile ON
                        (user_profile.user_id = post.user_id)
                    LEFT JOIN xf_bb_code_parse_cache AS signature_parse_cache ON
                        (signature_parse_cache.content_type = 'signature' AND signature_parse_cache.content_id = post.user_id)
                    LEFT JOIN xf_social_forum AS social_forum ON
                        (social_forum.social_forum_id = user_profile.primary_social_forum_id)
                    LEFT JOIN xf_social_forum_combination AS social_forum_combination ON
                        (social_forum_combination.social_forum_combination_id = user_profile.social_forum_combination_id)
            LEFT JOIN dark_postrating pr2 ON (post.post_id = pr2.post_id and pr2.user_id = 0)
    LEFT JOIN (
        select
            pivot_pr.post_id
    , sum(case when pivot_pr.rating = 15 then 1 else 0 end) dark_postrating_15_count
    , sum(case when pivot_pr.rating = 16 then 1 else 0 end) dark_postrating_16_count
    , sum(case when pivot_pr.rating = 17 then 1 else 0 end) dark_postrating_17_count
    , sum(case when pivot_pr.rating = 18 then 1 else 0 end) dark_postrating_18_count
    , sum(case when pivot_pr.rating = 19 then 1 else 0 end) dark_postrating_19_count
    , sum(case when pivot_pr.rating = 20 then 1 else 0 end) dark_postrating_20_count
    , sum(case when pivot_pr.rating = 23 then 1 else 0 end) dark_postrating_23_count
    , sum(case when pivot_pr.rating = 22 then 1 else 0 end) dark_postrating_22_count
    , sum(case when pivot_pr.rating = 1 then 1 else 0 end) dark_postrating_1_count
    , sum(case when pivot_pr.rating = 14 then 1 else 0 end) dark_postrating_14_count
    , sum(case when pivot_pr.rating = 2 then 1 else 0 end) dark_postrating_2_count
    , sum(case when pivot_pr.rating = 3 then 1 else 0 end) dark_postrating_3_count
  
                  
        from dark_postrating pivot_pr
        use index (`post_id_rating`)
        left join xf_post pivot_post on (pivot_pr.post_id = pivot_post.post_id)
        where pivot_post.thread_id = 25304
        group by pivot_pr.post_id
    ) pr on (pr.post_id = post.post_id)

  
            WHERE post.thread_id = '25304'
                AND (post.position >= 180 AND post.position < 190)
                AND (post.message_state IN ('visible'))
            ORDER BY post.position ASC, post.post_date ASC;
# Time: 140722  9:06:36
 
You'd have to look at the notable members page with that tab selected.

I can click through the main tab with ease if that's what you mean, the only time it visibly hangs the forum and leaves something in the slow log is when I go for one of the listing tabs like most liked. Only seems to be when I combine the two plugins I have the problem. Other than that this works fine without the post ratings.

Code:
# User@Host:  @ localhost []
# Query_time: 0.008422  Lock_time: 0.000020 Rows_sent: 18  Rows_examined: 18206
SET timestamp=1406034537;
SELECT language_id, title, phrase_text
            FROM xf_phrase_compiled
            WHERE title IN ('notable_members', 'specified_member_cannot_be_found_enter_entire_name', 'most_messages', 'most_points', 'staff_members', 'see_all_online_users', 'find_member', 'name', 'todays_birthdays');

Code:
# User@Host: @ localhost []
# Query_time: 0.003710  Lock_time: 0.000013 Rows_sent: 22  Rows_examined: 11729
SET timestamp=1406034570;
SELECT template_map_id
            FROM xf_template_map
            WHERE title IN ('member_list_item', 'member_notable');
 
So when they are both enabled, and you view "Most Liked", it hangs. This doesn't happen when you only have post ratings enabled?

This add on only works with the default tabs. It doesn't work with any other add ons that add their own tabs to the notable members page, it shouldn't conflict, but it just doesn't do anything in those cases (or at least that's how it should be).
 
So when they are both enabled, and you view "Most Liked", it hangs. This doesn't happen when you only have post ratings enabled?

This add on only works with the default tabs. It doesn't work with any other add ons that add their own tabs to the notable members page, it shouldn't conflict, but it just doesn't do anything in those cases (or at least that's how it should be).

If I disable post rating, enable this mod, it takes a couple seconds to load the first time, as you mention it does, then it's fast as default install, except all the dead members are gone. No issues.

If I just run post ratings alone, no issue with the tabs, loads just fine. No issues.

I guess this query below is when it all first loaded with just your add on enabled, then it ran great after that.
Re enable post ratings and above problem reappears. Do you think it could be some nginx/php-fpm caching issue? I don't see anything in the logs but weirder things have happened. Mysql doesn't seem to care besides the slow log.

Code:
# User@Host: @ localhost []
# Query_time: 14.599294  Lock_time: 0.000022 Rows_sent: 20  Rows_examined: 687135
SET timestamp=1406040572;
SELECT user.*
                    ,
                        MAX(post.post_date) as last_post_date
                FROM xf_user AS user
              
                            LEFT JOIN xf_post AS post ON
                                    (post.user_id = user.user_id)
                WHERE (user.is_banned = 0) GROUP BY user.user_id
                HAVING last_post_date >= 1404744555
            ORDER BY user.trophy_points DESC LIMIT 20;
 
HAVING last_post_date >= 1404744555

This is incredibly slow on big boards. Try switching it to use "Any Activity" instead of "Last Post". If that works fine, let me know. I'll try to work on optimizing that.
 
This is incredibly slow on big boards. Try switching it to use "Any Activity" instead of "Last Post". If that works fine, let me know. I'll try to work on optimizing that.
Not too much of a difference, still seems to hang about. Good luck though, if you come up with a solution I'll be first in line to get this happening!

Code:
# Time: 140722 11:04:08
# User@Host: @ localhost []
# Query_time: 6.571188  Lock_time: 0.000091 Rows_sent: 20  Rows_examined: 553682
SET timestamp=1406041448;
SELECT user.*
                    ,
                    user_profile.*,
                    user_option.*,
                    user_privacy.*
                ,(select sum(count_received) from dark_postrating_count where user_id = user.user_id and rating in (20,1,2)) as positive_rating_count
           
                    , ((select sum(count_received) from dark_postrating_count where user_id = user.user_id and rating in (20,1,2)) + user.like_count) as positive_rating_count_incl_likes
           
                ,(select sum(count_received) from dark_postrating_count where user_id = user.user_id and rating in (15,16,17,18,19,23,22,14,3)) as negative_rating_count
           
            ,(select sum(count_received) from dark_postrating_count where user_id = user.user_id) as total_rating_count
       
                FROM xf_user AS user
               
                    LEFT JOIN xf_user_profile AS user_profile ON
                        (user_profile.user_id = user.user_id)
                    LEFT JOIN xf_user_option AS user_option ON
                        (user_option.user_id = user.user_id)
                    LEFT JOIN xf_user_privacy AS user_privacy ON
                        (user_privacy.user_id = user.user_id)
                WHERE 1=1 GROUP BY user.user_id
               
            ORDER BY positive_rating_count_incl_likes DESC LIMIT 20;
 
Is this server error in the ren-deferred routine caused by this notable members addon?
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Unknown column 'last_post_date' in 'having clause' - library/Zend/Db/Statement/Mysqli.php:77
Generated By: Unknown Account, Today at 3:54 AM
Stack Trace
#0 /home/sites/avforums/public_html/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('??????SELECT us...')
#1 /home/sites/avforums/public_html/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(XenDebug_Db_Mysqli), '??????SELECT us...')
#2 /home/sites/avforums/public_html/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('??????SELECT us...')
#3 /home/sites/avforums/public_html/library/XenDebug/Db/Mysqli.php(13): Zend_Db_Adapter_Abstract->query('??????SELECT us...', Array)
#4 /home/sites/avforums/public_html/library/XenForo/Model.php(219): XenDebug_Db_Mysqli->query('??????SELECT us...', Array, 2)
#5 /home/sites/avforums/public_html/library/XMNotableMembers/Model/User.php(63): XenForo_Model->fetchAllKeyed('??????SELECT us...', 'user_id')
#6 /home/sites/avforums/public_html/library/XMNotableMembers/Deferred/Members.php(35): XMNotableMembers_Model_User->getUsers(Array, Array)
#7 /home/sites/avforums/public_html/library/XenForo/Model/Deferred.php(256): XMNotableMembers_Deferred_Members->execute(Array, Array, 7.9999949932098, '')
#8 /home/sites/avforums/public_html/library/XenForo/Model/Deferred.php(390): XenForo_Model_Deferred->runDeferred(Array, 7.9999949932098, '', false)
#9 /home/sites/avforums/public_html/library/XenForo/Model/Deferred.php(335): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#10 /home/sites/avforums/public_html/deferred.php(23): XenForo_Model_Deferred->run(false)
#11 {main}
Request State
array(3) {
["url"] => string(37) "https://www.avforums.com/deferred.php"
["_GET"] => array(0) {
}
["_POST"] => array(3) {
["_xfRequestUri"] => string(119) "/forums/blu-rays-dvds-streaming-services.168/?last_post_date%5B0%5D=%3E%3D&last_post_date%5B1%5D=1410329427&order=title"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
 
Try changing the admin option from last post date to last activity date. I'll fix the bug but that'll at least make the page accesssible.
 
@Daniel Hood

I've been getting this error for a while now, I just keep forgetting to post it here.

Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Unknown column 'last_post_date' in 'having clause' - library/Zend/Db/Statement/Mysqli.php:77
Generated By: Unknown Account, Today at 9:38 AM
Stack Trace
#0 /home/rpnation/public_html/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('\r\n\t\t\t\tSELECT us...')
#1 /home/rpnation/public_html/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '\r\n\t\t\t\tSELECT us...')
#2 /home/rpnation/public_html/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('\r\n\t\t\t\tSELECT us...')
#3 /home/rpnation/public_html/library/XenForo/Model.php(219): Zend_Db_Adapter_Abstract->query('\r\n\t\t\t\tSELECT us...', Array, 2)
#4 /home/rpnation/public_html/library/XMNotableMembers/Model/User.php(63): XenForo_Model->fetchAllKeyed('\r\n\t\t\t\tSELECT us...', 'user_id')
#5 /home/rpnation/public_html/library/XMNotableMembers/Deferred/Members.php(35): XMNotableMembers_Model_User->getUsers(Array, Array)
#6 /home/rpnation/public_html/library/XenForo/Model/Deferred.php(295): XMNotableMembers_Deferred_Members->execute(Array, Array, 7.99999809265, '')
#7 /home/rpnation/public_html/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 7.99999809265, '', false)
#8 /home/rpnation/public_html/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, NULL, '', false)
#9 /home/rpnation/public_html/deferred.php(23): XenForo_Model_Deferred->run(false)
#10 {main}
Request State
array(3) {
["url"] => string(37) "https://www.rpnation.com/deferred.php"
["_GET"] => array(0) {
}
["_POST"] => array(4) {
["_xfRequestUri"] => string(15) "/account/alerts"
["_xfNoRedirect"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
}
}
 
In the options for this add-on, change the last activity type from last post to last activity. It's a conflict with that feature.
 
Top Bottom