• Resolved sima313

    (@sima313)


    Here is my website favot.ru.
    I use author avatar lists in multiple places.
    1. Right side widget – I display top ten users with largest post count
    2. Footer widget – I display 12 random users
    3. Single page – I display full list of all users

    So if I visit my website page where 2 or 3 of this lists are shown there is a problem in the quantity of shown avatars.

    In every list the number is the same and it is equal to one of these lists lengths. For example on the full list page I can see all 42 avatars in full list, in footer random list and in right side top ten list. Althought nubers should be 42, 12 and 10.
    Example. Here is the link -> http://favot.ru/authors/

    Could you please advice what I can do to fix this.

    http://wordpress.org/plugins/author-avatars/

    https://wordpress.org/plugins/author-avatars/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter sima313

    (@sima313)

    Now I avoid this just by showing only one list on every page so that they do not conflict. I did this because I cant leave this problem remaining on my production site. So you can’t see any evidence of this bug on the page http://favot.ru/authors/

    Altough this problem remains. As I noticed simply if there are two lists on the page, both lists are show with the parametres of the one which is closer to the top of the page.

    If possible, please, solve this.

    Plugin Author Paul Bearne

    (@pbearne)

    Thanks for the bug report

    I will have look at the code at see what is happening

    Paul

    Plugin Author Paul Bearne

    (@pbearne)

    had bit of a quick look at the code can’t see a problem

    unless the caching is still not working right

    does it work if you are logged in as an admin (i reset the cache on every page load for admins)?

    Can you send the short-codes that you were using?’

    and can you use the version on github.com in case this fixes it

    https://github.com/pbearne/wp-author-avatars/archive/master.zip

    Thread Starter sima313

    (@sima313)

    1. I use W3 Total Cache plugin. I did not have this bug when I had Object Cache enabled. Now I need to disable object caching. I conclude that author list bug has something to do with object caching.

    2. This bug remains both for admin and for non logged in users.

    3. I installed plugin version from github.com and now it is better.

    4. Now problem remains on the page where I use shortcode with full author list sorted by post numbers. Also on this page I enabled widget which shows the same list but the output number is limited by 10 items.
    So now bug is the following: In the widget there are the same number of avatars shown as in the shortcode list. When I change the number of avatars in shortcode the number of avatars dislayed in widget also changes (althought the max number for widget is set to 10).

    I also found that when I change Sorting order in widget or in shortcode (so that they differ) everything works fine. No conflict in max number parameter.

    Hence I see the bug when there are 2 author lists with the same sorting order. Conflicting parameter is the maximum number of avatars shown.

    You can observe this bug on my test website (copy of prodiction) -> http://sandbox.favot.ru/authors/ (Object caching is disabled. Some avatars does not display because it is not production.)

    The sortcode I use:
    [authoravatars roles=author,contributor,editor,editors,blogger,journalist user_link=authorpage show_name=true show_postcount=true min_post_count=1 order=post_count,desc avatar_size=150]

    Widget config is here:
    https://dl.dropboxusercontent.com/u/40416848/avatar%20list%20widget.png

    Now I fixed this bug by Visibility option of Jetpack plugin. I do not show widget on the page where I use shortcode.
    So now it is not so critical. Although if possible, it is better to fix this bug.

    Plugin Author Paul Bearne

    (@pbearne)

    OK

    I think I see what is happen is that we are ending up with the same cache key/id so the plug-in thinks it the same output and uses the cached version not a new one

    I have just added a new version to github
    https://github.com/pbearne/wp-author-avatars/archive/master.zip

    Please try this if you have time

    I haven’t tested this so be careful

    Paul

    the new file – isn’t working and I am assuming it was intended to fix the exact problem I am having.

    I have 2 different authors. I want to display 1 author on the top of one sidebar, and the other on top of the other sidebar.

    This works if I am logged in as admin.

    However when I log out – both sidebars are showing the same author profile.

    The shortcode I have placed is as follows:

    Left sidebar: [authoravatars hiddenusers=2 show_name=true show_biography=true show_postcount=true link_to_authorpage=false]

    Right sidebar: [authoravatars hiddenusers=1 show_name=true show_biography=true show_postcount=true link_to_authorpage=false]

    You said you reset the cache every pageload for admins (which is why I assume when logged in I don’t have the problem), is it possible to clear the cache every pageload for all users?

    Whichever one I call last seems to be the one displaying.

    Plugin Author Paul Bearne

    (@pbearne)

    I did have the hiddenusers in the cache ID

    I have just added it

    Please try again

    https://github.com/pbearne/wp-author-avatars/archive/master.zip

    Paul

    when I load that plugin, my entire sidebar stops working.

    the exact error I am getting is in UserList.class.php

    PHP Syntax Check: Parse error: syntax error, unexpected ‘get_users’ (T_STRING), expecting ‘(‘ in your code on line 416

    But I am no coder so tracking down where this ‘(‘ is missing, is not so easy for me.

    Got it fixed

    Seemed what you had was
    $users = array get_users( $args );

    And the array needed (); so I changed it to –
    $users = array (get_users( $args ));

    All works fine now. Thanks for this awesome plugin!

    Plugin Author Paul Bearne

    (@pbearne)

    Thanks

    I rushed it at work and messed it up

    I will fix it tomorrow

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Multiple avatar lists conflict with each other’ is closed to new replies.