WordPress.org

Ready to get started?Download WordPress

Forums

amr users
[resolved] WordPress database error Duplicate entry (5 posts)

  1. Alternatewords
    Member
    Posted 5 months ago #

    I noticed when standard report 2 (Users: Directory) refreshes I see the following lines pop up in my error_log:

    WordPress database error Duplicate entry 'user-02-0' for key 'reportid' for query INSERT INTO wp_amr_reportcache ( reportid, line, csvcontent ) VALUES ('user-02','0','ID,avatar,display_name,user_url,user_registered') made by do_action_ref_array, call_user_func_array, amr_build_user_data_maybe_cache, adb_cache->cache_report_line
    
    WordPress database error Duplicate entry 'user-02-1' for key 'reportid' for query INSERT INTO wp_amr_reportcache ( reportid, line, csvcontent ) VALUES ('user-02','1','\"ID\",\"Avatar\",\"Display Name\",\"Url\",\"Registered days ago\"') made by do_action_ref_array, call_user_func_array, amr_build_user_data_maybe_cache, adb_cache->cache_report_line
    
    WordPress database error Duplicate entry 'user-02-2' for key 'reportid' for query INSERT INTO wp_amr_reportcache ( reportid, line, csvcontent ) VALUES ('user-02',2, ......') made by do_action_ref_array, call_user_func_array, amr_build_user_data_maybe_cache, adb_cache->cache_report_lines, adb_cache->cache_batch_lines

    Would this be due to some users having the same display name?

    http://wordpress.org/plugins/amr-users/

  2. anmari
    Member
    Plugin Author

    Posted 5 months ago #

    hi - sounds like it is trying to recache but a delete of the cache has not happened. Maybe you had a database error?
    goto cache settings and clear all cache entries.

    I also suggest llogging into your phpmyadmin and seeing if you have any 'repair' flags on the cache tables etc.

  3. Alternatewords
    Member
    Posted 5 months ago #

    I think this may have been due to having amr users installed in the past and having done a manual cleanup after removal. I noticed when I installed it again a few days ago it found my old reports but threw some error messages as they actually no longer existed in the db.

    I've followed your recommendations and that seems to have solved the problem.

    Thank you.

  4. Alternatewords
    Member
    Posted 5 months ago #

    Spoken too soon it seems. When I deleted the cache and manually triggered a rebuild everything worked fine, no errors in error_log.

    But, the automatic refreshes keep triggering the duplicate entry error. For now I've switched from 'Do re-cache on user update' to 'Do NOT re-cache on user update' to see if that might be the problem (we have quite a lot of user signing up on our site).

  5. anmari
    Member
    Plugin Author

    Posted 5 months ago #

    Yeah - good idea - there is logic to NOT do recache immediately - first check if one already in progress etc . But better not to have load on system if you have a lot of signups.

    Am working towards a non-cahce method - but that only works efficiently for 'clean' user meta fields (not S2, not cimy etc etc)

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.