2019-11-29, 07:48 PM
Hey guys.
I use this plugin since two years now:
https://community.mybb.com/mods.php?action=view&pid=67
I just Updated my MyBB forum from 1.8.17 to 1.8.21 and now the AJAX Function of the Thank you Button doesnt work anymore.
It now behaves like I had disabled AJAX.
I looked into the PHP code and it appears that the plugin first checks if I have AJAX enabled ($mybb->settings['use_xmlhttprequest'] == 1). Which I have.
If it is enabled it SHOULD use "do_action" for actions. If it is disabled it SHOULD use "direct_action" for actions.
The thing is: $mybb->settings['use_xmlhttprequest'] is definitely enabled and it still uses the direct_action approach, which is very annoying for my users because after every "thank you" the page reloads and jumps to a different position than the user was before.
What I've already tried:
- Setting $mybb->settings['use_xmlhttprequest'] to 0 or 1
- Deactivating and then activating the Plugin
- Changing the Line "if($mybb->settings['use_xmlhttprequest'] == 1)" to "if(1 == 1)"
Nothing of this seems to work. Any help?
Update: I checked further. So in the PHP File it chooses the correct path for the Button Implementation.
So the button is set to
So I think the Javascript is somehow broken.
I use this plugin since two years now:
https://community.mybb.com/mods.php?action=view&pid=67
I just Updated my MyBB forum from 1.8.17 to 1.8.21 and now the AJAX Function of the Thank you Button doesnt work anymore.
It now behaves like I had disabled AJAX.
I looked into the PHP code and it appears that the plugin first checks if I have AJAX enabled ($mybb->settings['use_xmlhttprequest'] == 1). Which I have.
If it is enabled it SHOULD use "do_action" for actions. If it is disabled it SHOULD use "direct_action" for actions.
The thing is: $mybb->settings['use_xmlhttprequest'] is definitely enabled and it still uses the direct_action approach, which is very annoying for my users because after every "thank you" the page reloads and jumps to a different position than the user was before.
What I've already tried:
- Setting $mybb->settings['use_xmlhttprequest'] to 0 or 1
- Deactivating and then activating the Plugin
- Changing the Line "if($mybb->settings['use_xmlhttprequest'] == 1)" to "if(1 == 1)"
Nothing of this seems to work. Any help?
Update: I checked further. So in the PHP File it chooses the correct path for the Button Implementation.
So the button is set to
$post['thanks'] = "<a id=\"add_thx{$post['pid']}\" href=\"showthread.php?action=thank&tid={$post['tid']}&pid={$post['pid']}\">
<div class=\"thx_buttons\" id=\"sp_{$post['pid']}\"><span class=\"gracias\"> {$lang->thx_button_add}</span></div></a>";
Just like before I updated the Forum.So I think the Javascript is somehow broken.