Socialcode Activity Comment 2.2 plugin for Jomsocial – Like activity error 505 fix

I’ve got a lot of unpleasant things to say about 3rd party Joomla developers. And this is an example of why.

In Socialcode’s Activity Comment plugin for JomSocial (plg_activitycomment), when you unlike an activity, it appears to work. However, what it does is remove the likes-holder div immediately with Javascript (jQuery in fact), delete the like item from the database, then throw a 505 Internal Server Error. At this point you are supposed to get a response with the new string of likes, as other people may still like the activity, but these won’t be displayed until you refresh the page.

Most people probably don’t even realise it’s broken, as unless you have FireBugs console or net panels open, you get no notification of the error.

The problem occurs because the likeitem() function requires helper functions from a separate file, which the coders failed to include.So it’s remarkably easy to fix, once you work this out, simply add the line

to the function in /plugins/community/activitycomment.php, which will now look like this:

I discovered this problem while updating my hacks to include a dislike button at the request of a client who’s community members wanted it.If you are interested in having the hack for your own JomSocial site, leave a comment and I’ll get in touch.

4 thoughts on “Socialcode Activity Comment 2.2 plugin for Jomsocial – Like activity error 505 fix”

  1. Hi Dave i just came accross your interesting post as I was about to buy social code’s pugin for my site but i didn’t think it worked with 2.2 yet? Anyway is it possible to send me the hack please? Seems odd that in jomsocial you are unable to reply to comments instream without being friends first. I had some new joiners on the site who said hello and noone could reply to them! they didn’t come back! Are you available for private jomsocial work?regardsCraig

  2. The ability to reply to comments without being friends is down to the plugin parameters.Go to:Administrator > Extensions > Plugin Manager > JS Activity Commentsand set:Respect user privacy: NoThis is ideal if you are trying to build a much more "open" network, or pretty much any network when it is in its infancy, as easy interaction is key to building a loyal regular user base. As your network grows you will most likely find that users will demand more privacy from the thronging hordes and you will want to tighten things up.I’m actually referring to version 2.2 of the plugin, not JomSocial 2.2. We haven’t installed JomSocial 2.2, and after the ridiculous amount of work getting it to play nicely, don’t really intend to, at least for a long time.I can’t send you the Dislike hack itself, (for a start I have no way of contacting you!) as it’s not an installable file, but a matter of hacking a number of files, and they vary slightly from version to version. I can’t even send you my files as they have all been hacked for a number of other additional functions and improvements, some of which require hacking JomSocial as well as plg_activitycomment.It’s a fairly simple hack to acheive in principle – you just need to duplicate all the functions in the PHP and Javascript, add a dislikes table to your database, and add the buttons to the template. I’d be more than happy to discuss hacking the plugin for you, or any other work, so please do get back in touch.

  3. "The ability to reply to comments without being friends is down to the plugin parameters.Go to: Administrator > Extensions > Plugin Manager > JS Activity Commentsand set: Respect user privacy: thanks but that dont work

  4. Hmm. It ought to, but unfortunately I can’t go mucking with our user’s privacy settings to check for you. Best check with SocialCode, see if they can give you a proper answer. Bit of a nuisance that…

Leave a Reply

Your e-mail address will not be published. Required fields are marked *