reCAPTCHA v2 not working with Mootools - Hikashop Module using Mootools

  • Posts: 36
  • Thank you received: 5
5 months 1 week ago #357039

-- HikaShop version -- : 5.0.2
-- Joomla version -- : 3.10.12
-- PHP version -- : 8.1.25
-- Browser(s) name and version -- : Chrome 119.0.6045.200

Hi,

Since some weeks HikaShop ReCaptcha v2 stoped working. I've read this is due to a conflict between Google ReCaptcha v2 Javascrip and Mootools (I got ahold of this from this post in your forum )

I've tried disabling Mootools with Mootools Enabler/Disabler and that solves the issue.

However this comes at the expense of loosing the 'expand'/'contract' ability in the Hikashop Menu Module used in the right side pane of the site, i.e. it just shows all the main categories and 1st child level categories instead of showing just the main ones allowing for expanding to show the 1st child level ones.

The module in question is of the 'HikaShop Content Module' type, configured the way you can see in the attachment 20231129-screenshot-01.png . I'm guessing in this configuration it's using Mootools or in some other way the Mootools Enabler/Disabler the Plugin when enabled is afecting the category display functionalities.
In your demo site I found the section on Categories Listing and having read:

Then, go in the Modules manager of Joomla. and enable the "Categories on 2 levels" HikaShop content module

I wonder if I'm using the same module you refer to or if it's the same if there's other way to configure that will allow for using the Mootools Enabler/Disabler plugin and still have the expand/contract effect we had in the category listing.
Can you please help? Any sugestions for solving this or otherwise changing/upgrading the module I'm using to a another one with similar functionalities are welcome.

Other Alternatives
Note I also tried using OSpam-a-not that you mention in this post in your forum as an alternative to ReCaptcha. At first instalation failed, then I tried some of what is in Joomlashack blog post it did not solve the problem but inspired me to uninstall all Joomlashack plugins / frameworks etc.., cleaning the cache, and'Chek-in' the plugins. Then I installed OSpam-a-not and the instalation went sucessfully. I'm considering testing this plugin as an alternative to ReCaptcha v2, But It's not active currently as I want to leave the current setup as is so you can test if there's a solution for the Category module to work the way intended while blocking Mootools.

Sorry for the long post. I've tried being as thoroughly as possible with the intent of helping out anyone running into the same specific problems I'm having


VC22
Attachments:
Last edit: 5 months 1 week ago by Manuel TT.
The following user(s) said Thank You: easyconnect83

Please Log in or Create an account to join the conversation.

  • Posts: 81605
  • Thank you received: 13083
  • MODERATOR
5 months 1 week ago #357043

Hi,

For the accordion system in the HikaShop content module, we rely on the accordion library provided by Joomla.
On Joomla 4 and 5, the accordion library uses Bootstrap only as Mootools has been removed from Joomla.
On Joomla 3, the accordion library of Joomla comes with both a Mootools one and a Bootstrap one. HikaShop can rely on either of them based on the setting "use bootstrap design v2" setting in the Advanced tab of the HikaShop configuration. We default on Mootools because many templates made for Joomla 3 don't include Bootstrap v2 and in that case, it wouldn't work properly.
Note that other areas of the HikaShop interface on the front take into account this "use bootstrap design v2" setting. So if activating this setting messes things elsewhere, you can also edit the view file category / listing_list.php via the menu Display>Views and add the line:

$this->tabs->mode = 'bootstrap';
after the line:
$this->tabs = hikashop_get('helper.sliders');
This will force the use of the Bootstrap accordion regardless of your version of Joomla or how the "use bootstrap design v2" setting is set.

Ospam-a-not is indeed a good alternative to ReCaptcha.
Also, another solution is to use another accordion module for your categories instead of HikaShop's built in module.
For example:
www.joomlack.fr/en/joomla-extensions-acc...h-accordeon-hikashop
Or: extensions.joomla.org/extension/skyline-...ordion-for-hikashop/
Or: www.osthemeclub.com/product/accordion-menu-for-hikashop/

The following user(s) said Thank You: Manuel TT

Please Log in or Create an account to join the conversation.

  • Posts: 36
  • Thank you received: 5
5 months 6 days ago #357067

Thank you Nicolas and Hikashop team, as always helpfull and clear replies.


VC22

Please Log in or Create an account to join the conversation.

  • Posts: 306
  • Thank you received: 42
  • Hikamarket Multivendor Hikashop Business
5 months 2 days ago #357158

I noticed that disabling Mootools also affects the Advanced Date Picker in that the calendar no longer appears when clicking the button. (I have bootstrap v2 enabled)

Regards
Trevor

The following user(s) said Thank You: easyconnect83

Please Log in or Create an account to join the conversation.

  • Posts: 81605
  • Thank you received: 13083
  • MODERATOR
5 months 2 days ago #357163

Hi,

The Advanced Date Picker doesn't rely on Mootools.
However, if you have a javascript error on the page, it's possible that the Advanced Date Picker javascript code necessary to initialize it won't be run by the browser.
So I would recommend checking the console of your browser for a potential javascript error.
It's likely that the removal of Mootools on your page affected another extension which relied on it, leading to a javascript error, which in turn prevented the Advanced Date Picker from working.
So it's likely there is nothing we can do from our end.

Please Log in or Create an account to join the conversation.

  • Posts: 306
  • Thank you received: 42
  • Hikamarket Multivendor Hikashop Business
5 months 2 days ago #357171

Hi Nicholas

Yes you are correct, there is a console error with Mootools enabled:

Uncaught ReferenceError: Tips is not defined
    <anonymous> https:// . . . //product/edit/cid-512:295

I have switched off captcha and installed Ospam-a-not and as I will be updating the site to J4 shortly I will leave MooTools enabled.

Thanks for your help
Trevor

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum