1.6.1.3
Supports Elgg version: 1.6.1.
Replaces a piece of code which caused blog comments to disappear due to some odd coding choices in core 1.6.1; previous versions of this widget set the view metadata to 'object/blog' -- the default for blogs -- which resulted in comments not being displayed, unlike for blog posts with no 'view' metadata set.
If you have had blog comments disappear, the preferred method to fix those posts is to simply view them through the updated blog widget; this removes the offending metadata using the Elgg API.
Unfortunately, if your users have too many "damaged" blog posts to view through the widget, you may consider deleting metadata for those blog posts of the form 'view' => 'object/blog'.
Step 1: Backup your database!
Please please please please backup your database if you are going to delete rows directly; unfortunately, I can't guarantee that this solution is 100% safe/correct.
Step 2: find offending metadata
select a.id from elgg_metadata as a, elgg_metastrings as b, elgg_metastrings as c where b.string='view' and a.name_id = b.id and c.string='object/blog' and a.value_id = c.id
Step 3: delete offending metadata
delete from elgg_metadata where id in (results from step 2)
View Brian Jorgensen's plugins
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
How can we access only blogs created by user or his friends.
Thanks
DANGER, WILL ROBINSON, DANGER -This plugin will corrupt your blog entities making either the comments unviewable or the entire blog disappear. Specifically, the $post->view is being overwritten/added with a custom view "au_blog_widget/view" which, even after the plugin has been disabled, is not reverted.
Also note that this widget is no longer necessary as the latest versions of Elgg have a blog widget.
I think there's a widget included for that in 1.7.x
@Sean: Really? I though that was solved months ago (see release notes above). If you provide a patch or message me with specific details I will release a newer version.
Opps, I had been testing against v1.6.1.2 but this bug is fixed in this version (v1.6.1.3). I checked v1.6.1.3 by checking for the offending code in view.php file ($post->view) but missed the "remove_metadata" call in "au_blog_widget/blog.php".
Alls good.
There is now run-once plugin to fix blog entries that may have been corrupted by an earlier version of au_blog_widget. Click on my icon and select the "make_blogs_visible" plugin. Cheers!
Thanks, Sean! Here's a direct link to Sean's plugin.