Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

on some posts the like doesn't work

This discussion is related to the I Like This ( Plugin ) addon.
nickortnickort New
edited April 2013 in Vanilla 2.0 - 2.2

Like doesn't always work, specifically a post with an image as the content, you click like, it does the loading.gif, and then returns back to just having a like button. Is this an issue with my forum somewhere, or is this an issue anyone else has had?

_edit:_ I misspoke, the entire thread is refusing likes. Other threads seem to be fine though.

edit: edit: Looks like the first page of that thread receives likes, but page 2 and on is where the issue lies. Any ideas?

«1

Comments

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2013

    @nickort hi and welcome you have questions and so de we , could you supply this for us to better help you

    http://vanillaforums.org/discussion/23158/question-guidelines-101#latest

    I use this plugin and have had no issues. You problem could be cache or browser related.

  • peregrineperegrine MVP
    edited April 2013

    If someone figures out why things (likes, posts, file uploads etc) hang intermittently on a non busy server you would be providing a great solution.

    My experimentation was with vanilla 2.0.18.4, one user, and not busy, and plenty or room on the server. So; I figure, I've ruled out the case of too many users, other users hogging database, etc.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    I am using the badge plugin as well as the like this plugin Vanilla version 2.018.4 from a donkey controlled internet in Mexico and can't report the same issue . no hangs as the progress icon gyrates for 3 seconds I can like dislike on anything and as a user too. Makes me think it may have to do with thine pc-asious system ?

  • peregrineperegrine MVP
    edited April 2013

    V.
    what version of likes plugin? what other plugins do you have enabled? Do you have stop autodraft?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2013

    I have the last version of the like this plugin Version 0.6 October 2012, with my image mods of course, and the flag plugin,Pbadges 2.0 with images from 1.0. Cleditor,apt ads, PrivacyNotice, FrontPage,Games,Bonk,AllViewd,Tagging,Who'sOnline,Shout2Van. I likely missed one...

    No I don't have to stop auto draft. I use Safari on a mini mac and firefox too. No problems with any. I can't tell what IE does the mac version is not the same as pc so not worth bothering. I don't support it anyhow. So as far as this plugin I have had no such problems even with my mods to the buttons.

    When I like the image button goes away and the unlike comes up, if I unlike the button for like appears...just got an idea !! I will make an unlike button by flipping the thumb over :))

  • peregrineperegrine MVP
    edited April 2013

    Does the op have the karma plugin enabled as well? version 0.6 has a tie in with karma?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Wonder why some of us do and some of us don't.

    I firmly believe it has to do with each person's OS. I will try to test this on a pc and try to experience the issue. I also believe apple has done a lot towards certain intent coding standards and is the reason why everything on the net works with a mac. But I may just be in love with my mini mac. .... :)

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    @nickort I hope you fixed your issue if not please help us help you , thanks :)

  • Wow, didn't realize you guys would be this quick! No I don't have the karma plugin enabled. We are running emotify, tagging, statistics, and WSYWIG is turned on. Nothing too interesting I presume, but this is my first time dabbling with Vanilla.

    @vrijvlinder thanks for the link!
    We're using Vanilla Forums version Version 2.0.18.4
    Custom Theme based on DarkMist, but quite heavily modified.

    Expected behavior happens on most every post I have liked, but one thread in particular is extremely replicable. Click the link, animation appears, goes back to a like button with no increment counter.

    I am going to run a test on multiple browsers now and see if it's just me. No javascript errors appear in the console at this point.

    vrijvlinder
  • update: same issue in IE10, FireFox, and Chrome. I'm starting to think it's server side, I'm going to dig into the code a little bit and see if I can debug anything.

    UnderDoghgtonight
  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2013

    I am going to run a test on multiple browsers now and see if it's just me.

    Please let us know :)

    keep in mind that one can't like oneself and/or remove someone else's like.

    UnderDognickort
  • Yeah, not sure if you saw my last post, but it wasn't browser related, and it was other users posts that I'm testing on. I'll update once I find something new to report though! Thanks for the help!

    vrijvlinder
  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    yes , apparently this has happened to someone else so if you find something don't forget to share the solution, and if we find something you will be first to know :)

    nickort
  • I absolutely will! Nothing worse than coming to a thread in search for answers and finding a "Figured it out" and nothing else. uggh.

    vrijvlinder
  • nickortnickort New
    edited April 2013

    What I have discovered so far, likes that are working send a request with this at the end of the formatted string:

    comment/1239?DeliveryType=BOOL&DeliveryMethod=JSON".

    likes that do not work, however:

    Like/comment?DeliveryType=BOOL&DeliveryMethod=JSON".

    they are missing the comment ID.

    vrijvlinder
  • another interesting bit, the like url is /discussion/Like//comment/858 between that double slash there should be an ID for the parent post. I'm assuming it's losing the parent ID because of it being on the second page.

    vrijvlinder
  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    And you have the latest version of the plugin right? maybe @hbf who created this plugin would be kind enough to take a look. There may be some js conflict somewhere. You could narrow down the options by disabling all plugins and enabling one by one to see which may be the culprit. I have all the plugins you mentioned on, so if there are others you may have on, try this and see if the problem remains or goes away.

  • @vrijvlinder said:
    And you have the latest version of the plugin right? maybe hbf who created this plugin would be kind enough to take a look. There may be some js conflict somewhere. You could narrow down the options by disabling all plugins and enabling one by one to see which may be the culprit. I have all the plugins you mentioned on, so if there are others you may have on, try this and see if the problem remains or goes away.

    Have you tried liking posts from a category. Three likes in a row?

    Have you tried liking, "unliking", liking, and have you tried it on the second page.

    Try to use the same scenario as the user with the problem.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @peregrine

    Actually, for me the three likes are working perfectly fine, and liking and unliking are both working. It's just once there are enough comments to make it to a second page that it loses the parent ID for the thread and renders the likes broken.

  • @vrijvlinder said:
    And you have the latest version of the plugin right? maybe hbf who created this plugin would be kind enough to take a look. There may be some js conflict somewhere. You could narrow down the options by disabling all plugins and enabling one by one to see which may be the culprit. I have all the plugins you mentioned on, so if there are others you may have on, try this and see if the problem remains or goes away.

    It doesn't look like a js conflict, the js actually is a small file that just does a jquery .get() via json. If I try to echo the parent ID in php it also doesn't find it. It's somewhere in the handling of grabbing the post parent.

  • peregrineperegrine MVP
    edited April 2013

    I see you got it solved.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    nickort
  • So, I got it working on my site, no idea if this is anyone elses issue or not, but i basically rewrote line 205 in the default.php for the plugin to this

    $DiscussionID = $Sender->DiscussionID;
    //$DiscussionID = $Sender->EventArguments['Discussion']->DiscussionID;
    

    Now I'm worried that the Event Arguments were there for a reason, but I guess time will tell.

    peregrinehgtonightvrijvlinderWaltz
  • peregrineperegrine MVP
    edited April 2013

    Your absolutely right - on page 1 of comments

    $Sender->EventArguments['Discussion']->DiscussionID; has a value

    on page 2 of comments and beyond it is null.

    but

    Sender->DiscussionID - always has a value.

    nice fix!

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    nickort
  • hbfhbf wiki guy? MVP

    what version of vanilla are you running for which this is an issue?

    i'm using this plugin on my forum and can like posts on any page (page 9707 is the current number to beat)...

    as far as the use of event arguments, i don't recall it being used for a particularly special reason. the key thing is to get the discussion id and comment id reliably.

  • peregrineperegrine MVP
    edited April 2013

    try page 2 of the comments of the same discussion. (not page 2 of discussion topics) . I edited above.

    vanilla 2.0.18.4 and version 0.6

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • hbfhbf wiki guy? MVP

    you dont have an option to like or unlike on the discussions pages... it's only show in the discussion controller.

    so im confused by what you are saying.

    I have many, many individual discussion which span several (some thousands) of pages... i like this plugin works on all of them in my forum.

  • peregrineperegrine MVP
    edited April 2013

    If I have 10 comments per page in a discussion. On page 2 e.g. the 15 comment.

    on mine at 205

    $DiscussionID = $Sender->EventArguments['Discussion']->DiscussionID;
    var_dump($Sender->EventArguments['Discussion']->DiscussionID); // null on second page
    var_dump($Sender->DiscussionID);  // always shows an id.
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    nickort
  • hgtonighthgtonight ∞ · New Moderator

    This may be a bug. I would see if this still happens on 2.1 and file an issue in github.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • peregrineperegrine MVP
    edited April 2013

    @hgtonight said:
    This may be a bug. I would see if this still happens on 2.1 and file an issue in github.

    It may not be a bug in core, if ($Sender->EventArguments['Discussion']->DiscussionID) is null.

    It may be part of core design.

    It may also be a result of certain config settings that some of us have.

    Perhaps when you change comments on discussion page to less than 50 (which is the default), the problem occurs. I don't have 50 comments per page, I set it to 10 comments per page, so I could test multiple pages easier.

    but under some circumstances - mine and the op

    $Sender->EventArguments is null on the 2nd and following pages of comments.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    nickort
  • hgtonighthgtonight ∞ · New Moderator

    I suppose the event isn't fired on the second page so the ajax comment loading doesn't mess things up? I am speculating now. ;D

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

«1
Sign In or Register to comment.