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.
Events Not All Firing In 2.1B Plugin
monquixote
New
I've been trying to use Peregrines Discussion Tooltip and finding that it doesn't work because the callback doesn't seem to fire ( DiscussionsController_BeforeDiscussionContent_Handler )
I switched to using the "Example" plugin which does a similar thing and though that fires it uses 'DiscussionsController_AfterDiscussionTitle_Handler' which is not where I want it. It seems that though the example plugin works if I change it to use any of the other callbacks in WriteDiscussion() the callback never fires.
So far I have tried:
'BeforeDiscussionName'
'BeforeDiscussionContent'
'AfterCountMeta'
What am I doing wrong?
0
Comments
does your theme modify the views? check what views exist in your theme. They might have removed the events.
grep is your friend.
Ah that might be it.
I'm using Flat VI
EDIT: I've had a look and there is nothing obvious as it only seems to have a Master template and nothing custom in the discussions.
I use it on a 2.1b1 install and it works well
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
have you tried disabling other plugins? there might be a conflict.
grep is your friend.
I'll try that this evening thanks.
You may also get confused about what controller is activating, like if it's actually CategoriesController but your think it's DiscussionsController. You can use Base_BeforeDiscussionContent_Handler to make it trigger regardless of controller being used.
Thanks I'll try that
I've tried disabling all other plugins so it's not that.
There is sometimes consistency issues around that. E.g.
https://github.com/vanillaforums/Garden/issues/1633
grep is your friend.
I think you need to provide a link to see the site and inspect the code. I can also say that it may well be a theme problem and the link of the tooltip may be hiding under something or elsewhere than it should be based on the theme.
There is nothing to prevent it from showing the tooltip when hovering. All it is , is a link and the info in the tooltip is the title of the link....so make sure that it is not the theme by switching to another one and test if it works on that. Looking in the code alone will yield nothing. You need to test it with other themes ....
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Are you hovering your mouse over the eye on the left of the discussion. I also have no problem with a test with the theme you suggested in vanilla 2.1b1 - flatvi theme. Absolutely no changes to theme or core or plugin. new install they all work perfectly.
Why do you think events are not firing - did you try echoing something in the events.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
There is no eye logo visible to click.
I'm certain the event isn't firing because I can change the code to include a division by zero without an error.
Using the "Example" plugin the callback 'DiscussionsController_AfterDiscussionTitle_Handler' works, but if I change it to anything else.
I presume you have this line
Also follow Lincoln advice an set it to
Base_
grep is your friend.
Can we have a link to see the site? Have you looked in the source code with a web inspector if the image is being called or if it appears in the source code ?
I have installed this in many sites both 2.0 and 2.1 without issues . The image may not be called if your forum is in a subdirectory so you may need to fix that image link to include the forum part.
Unless you provide screenshots or a link to the installation , it is a shot in the dark and you will keep chasing ...
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I have modded the "example" plugin into something that works for me now.
Here is my copy , install this and see if it will work for you. I modified the css for the 2.1 install I have , it might work for you too.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌