Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contact form changes password confirmation emails #252

Closed
arentsen opened this issue Oct 19, 2023 · 2 comments
Closed

Contact form changes password confirmation emails #252

arentsen opened this issue Oct 19, 2023 · 2 comments
Labels

Comments

@arentsen
Copy link

arentsen commented Oct 19, 2023

Description

Any emails that are sent out by the system (such as a password reset link) have the correct subject, but the contents of the emails gets overwritten by the contents of the contact confirmation email. I just used the examples from the manual, nothing fancy. Somehow, it seems that this variable {{ emailParts[1]|default|raw }} changes something globally and any email that gets send out uses it. Any help would really be appreciated

I also installed the honeypot plugin.

I found the file Module.php in the modules/email folder with the following contents. Not sure if it should be there:

<?php

/*
namespace modules\email;

use Craft;
use yii\base\Module as BaseModule;

/**
 * contact-form module
 *
 * @method static Module getInstance()
 */


class Module extends BaseModule
{
    public function init(): void
    {
        Craft::setAlias('@modules/email', __DIR__);

        // Set the controllerNamespace based on whether this is a console or web request
        if (Craft::$app->request->isConsoleRequest) {
            $this->controllerNamespace = 'modules\\email\\console\\controllers';
        } else {
            $this->controllerNamespace = 'modules\\email\\controllers';
        }

        parent::init();

        // Defer most setup tasks until Craft is fully initialized
        Craft::$app->onInit(function() {
            $this->attachEventHandlers();
            // ...
        });
    }

    private function attachEventHandlers(): void
    {
        // Register event handlers here ...
        // (see https://craftcms.com/docs/4.x/extend/events.html to get started)
    }
}

Steps to reproduce

Additional info

  • Craft version: 4.5.7
  • PHP version: 8.0.2
  • Database driver & version:
  • Plugins & versions: Contact-form plugin 3.0.1
@arentsen arentsen added the bug label Oct 19, 2023
@arentsen
Copy link
Author

No progress here. I disabled both the Contact Form and Contact Form Extensions plugins, but the "Send activation email" for a new user still gets overwritten by the template that is used for the contact notification email.

@i-just
Copy link
Contributor

i-just commented Mar 7, 2024

Hi, thanks for reaching out. As per craftcms/cms#14504 Contact Form Extensions plugin is a 3rd party plugin, so this will have to be looked into from their end.

@i-just i-just closed this as completed Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants