Imported users – top users php hangs the site
Hi,
First of all the plugin and the askbug theme is brilliant!
I’m experiencing an issue with the top users widget. We’ve imported 6k+ users from another forum as we are trying to migrate to askbug.
The plugin only managed to transfer firstname, lastname, username and email address. They were all assigned to the “AnsPress Participants” user role.
Now when we view the fronted it hangs after loading the header, and the error log lists the following message:
[14-Aug-2017 10:56:55 UTC] PHP Notice: Undefined index: title in …/themedir/includes/widgets/top_users.php on line 29
[14-Aug-2017 10:56:55 UTC] PHP Notice: Undefined index: number in …/themedir/includes/widgets/top_users.php on line 30
[14-Aug-2017 10:56:55 UTC] PHP Notice: Undefined index: avatar in …/themedir/includes/widgets/top_users.php on line 31
These lines are:
$title = apply_filters( ‘widget_title’, $instance[’title’] );
$number = $instance[’number’] ;
$avatar_size = $instance[’avatar’] ;
I’m guessing askbug is looking for a field which is normally created with a regular registration and missing when users are imported.
Can you please let me know which field these are so I can add them in manually?
I’m running Askbug Version: 3.0.11
Thanks!
Hello Imran,
I found the issue. Its in Top Users widget. Simply re-save top usres widget in Home Users widget position.
Lemme know.
Thanks Rahul,
Checking the query I managed to find the line of code where the site stops
/public_html/answers/wp-content/plugins/anspress-question-answer/addons/free/
avatar.php, line 234
$this->name = esc_attr( $user->display_name );
The query says its referencing a non-object, but this call is already inside and is_object function.
That’s where the site hangs, no response for any URL, can’t use the backend. The only way to get back in is to remove all lines from the top_users.php widget.
I tried to disable/enabled the dynamic avatar addon and the avatars completely on wordpress level, but no luck.
I’d appreciate any kind of support on this.
I suspect something wrong with your custom code. You can share your site credentials with me at [email protected] and I will check whats happening. Make sure to enable full debug mode.
help me : https://anspress.io/questions/question/wiris-anspress/