Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
No Like Option on Topic Creator in 2.1
oboyledk
New
I've noticed that after doing the suggested updates to make the plugin work with 2.1, The Like button won't display on the Topic thread of any post (The first post before comments)
It seems as though the check for "Self" is always coming back true and thus not displaying the option to like the Topic post of a thread.
Any ideas on how to resolve this?
Tagged:
0
Comments
without having an instance of 2.1 up and running i can only give a few options to look into.
there should be two reasons the 'like' option wont appear
1. it thinks the person viewing is the same person that created the post
2. the method that inserts the tag is not being triggered.
you can check both by inserting a little echo statement before the user check, make sure it contains some static text along with the variable(s) of interest.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained
Thanks testing it out now
So It looks like the method isn't being called in the original post for each thread.
I can see my test echo and its values but not in the top thread
That makes perfect sense. The top thread (first post in the discussion thread) comes from a different table than the other posts (comments).
There was an error rendering this rich post.
yes, it seems like the data model was tightened a bit in 2.1, where in 2.0.18 the DiscussionController_CommentOptions_Handler was being raised whether is was a Discussion item or an actual Comment, now a separate handler DiscussionController_DiscussionOptions_Handler needs to be tapped into to get that first discussion post options.
Thanks to @oboyledk for hunting me down and sponsoring the upgrade/fix and giving me access to his server to fix it. A new version .6 has been uploaded to the addons repository. I haven't tested it against the current version 2.0.18 yet, but it should be backwards compatible. The only risk i see is if both handlers are being raised on the first post you may get a double like button. if that's the case you can revert to .5 or i may upload a .7 that handles that more gracefully.
anyhoo, all seems to be well at this point. i'm sounding the all clear and everyone can return to the building now.
Vanilla Wiki, Tastes Great! 31,000 viewers can't be wrong. || Plugin Development Explained