Not a bug User approval queue is empty

loulou

Member
Affected version
2.2.10
This appeared only after 2.2.10 upgrade.
All other approval queue list (post, threads...) are working.
Only new users list is empty.
*Default master style.
*$config['enableListeners'] = false;
approval_q.jpg


PHP:
XF\Db\InvalidQueryException: Template public:approval_item_user error: MySQL statement prepare error [1176]: Key 'user_id_log_date' doesn't exist in table 'xf_ip' src/XF/Db/AbstractStatement.php:230
Generated by: - Aug 8, 2022 at 1:16 AM
Stack trace
            SELECT ip
            FROM xf_ip FORCE INDEX(user_id_log_date)
            WHERE content_type = ?
                AND content_id = ?
                AND action = ?
                AND user_id = ?
            ORDER BY log_date DESC
            LIMIT 1
        
------------

#0 src/XF/Db/Mysqli/Statement.php(198): XF\Db\AbstractStatement->getException('MySQL statement...', 1176, '42000')
#1 src/XF/Db/Mysqli/Statement.php(41): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1176, '42000')
#2 src/XF/Db/Mysqli/Statement.php(56): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Db/AbstractAdapter.php(152): XF\Db\AbstractAdapter->query('
            SELECT ip
    ...', Array)
#5 src/XF/Repository/Ip.php(106): XF\Db\AbstractAdapter->fetchOne('
            SELECT ip
    ...', Array)
 
Last edited:
Well, for some reason, the keys :
KEY user_id_log_date (user_id,log_date),
KEY ip_log_date (ip,log_date),
KEY content_type_content_id (content_type,content_id)
are not there ! So I've added them manually. Solved
 
Back
Top Bottom