Hello rebeccaschiffman! π
Which version of WordPress and PHP are you using?
Can you please check this fix:
Open the file wp-content/plugins/asgaros-forum/includes/forum-widgets.php.
At the end of the file remove this code:
add_action('widgets_init', function() {
global $asgarosforum;
if (!$asgarosforum->options['require_login'] || is_user_logged_in()) {
register_widget('AsgarosForumRecentPosts_Widget');
}
});
And add this code instead:
function init_asgarosforum_recentposts_widget() {
global $asgarosforum;
if (!$asgarosforum->options['require_login'] || is_user_logged_in()) {
register_widget('AsgarosForumRecentPosts_Widget');
}
}
add_action('widgets_init', 'init_asgarosforum_recentposts_widget');
Feedback if this is working correctly would be nice so I can release a fixed version as soon as possible! π
Hello.
WordPress 4.4.2
PHP 5.2
I see I have the option to use 5.3 or 5.4 on godaddy
Which should I choose if 5.2 is the problem?
Changing the version of PHP to 5.3/5.4 should resolve this bug as well because anonymous functions cannot be used in PHP less than 5.3.
Oops, I didn’t see your code fix above and already initiated the switch to 5.3, sorry about that! I should know in the next hour if that worked.
No problem! π
I checked it on a server with PHP 5.2 and the fix is working well. I also added a patch to the development version:
https://github.com/Asgaros/asgaros-forum/commit/f32f60c8c61e1ed328cd0219db476e1bcd1842e8
It will be included in the upcoming v1.0.10 release.
Thank you very much for your bug report!
Oh no, I’m now locked out of my site all together.
I updated PHP to 5.3
I was able to activate the plugin. I didn’t see Forum appear on the menu on the left so I clicked “Dashboard” and now I have this, but on an entire blank page:
Parse error: syntax error, unexpected T_FUNCTION in /home/content/28/5685028/html/veganingredientcheck/wp-content/plugins/asgaros-forum/includes/forum-widgets.php on line 104
I clicked the back-browser and got back to the admin but anything I click leads to that error code. Like if I click “posts” it goes to that.
Are you sure that PHP 5.3 is already activated? Sometimes it needs a couple of minutes or there is still some cached content.
You can try to replace the problematic code first because it should fix that bug anyway.
I think that code did the trick!
Yes the 5.3 was activated and the way the error came up changed.
It IS indeed working now. One other question – can non-wordpress users use the forum? I tried to log in from another browser and it just wanted me to log in with wordpress account, I couldn’t just use an e-mail address…
At the moment it is not possible to create threads/posts as a guest.
The forum itself is using the user management of WordPress, so everyone who should be able to post in the forums need a WordPress account on your website.