Jump to content
thirty bees forum
  • 0

Question

Posted

When installing a module that overwrites blocknewsletter module, I get this error:

The following module(s) could not be installed properly:
    googlecaptcha :
        Unable to install override: Failed to evaluate override file /home/iwona/public_html/tbshop/modules/googlecaptcha/override/modules/blocknewsletter/blocknewsletter.php: syntax error, unexpected token "extends", expecting "{" at line 2

Code of the file blocknewsletter.php

<?php

class BlocknewsletterOverride extends Blocknewsletter
{
    public function confirmSubscription($email)
    {
        if (Module::isEnabled('googlecaptcha') && ($module = Module::getInstanceByName('googlecaptcha')) && $module->hookValidate('newsletter')) {
            $module->captchaValidate(Context::getContext()->controller->errors);
        }
        if (Context::getContext()->controller->errors) {
            return false;
        }
        return parent::confirmSubscription($email);
    }
}


Thirty bees version: 1.6.0
Thirty bees revision: db85aa271005ab890a8c3a9711a3cca9722d5095
Build for PHP version: 8.3

 

8 answers to this question

Recommended Posts

  • 0
Posted
7 minutes ago, datakick said:

It's a bug in core, I've managed to reproduced on my dev env. I'll prepare a fix and let you know.

Thank you for your feedback.

  • 0
Posted
On 9/24/2024 at 8:35 AM, datakick said:

Should be fixed in bleeding edge, please try

Hi,

Thank you very much, I've just run the tests and it works perfectly.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...