• Resolved Anonymous User

    (@anonymized-14169293)


    For this kind of sites is normal to have one domain per site. Email validation doesn’t recognize (subsites) mapped domains, so it always cause an error because the email (subsite) doesn’t belong to the main site domain.

    CF7 only validates with the main site domain.

    https://www.ads-software.com/plugins/contact-form-7/

Viewing 15 replies - 1 through 15 (of 22 total)
  • Hi, we have had exactly the same problem.

    We also have a multisite, with domain mapping and CF7 generated a lot of issues.

    We solved it by setting the validation rule in config.php to false

    see the website of contact form 7

    I’m also having similar issues with multisite/domain mapping (80+ domains). But I’m not sure changing the validation rule is the best solution as the file will be overwritten with future updates.

    I’m going to experiment with some options and will post my results.

    David

    Thought I’d explain how I am using multisite/domain mapping.

    I have multisite setup under a subdomain and all sites are sub-subdomains of the main site. e.g. site1.subdomain.domainname.tdl, site2.subdomain.domainname.tdl etc.

    I also use domain mapping, but checking the Raw headers of the emails that come from Contact Form 7, the “Message-id:” only shows the main site url, not the sub-subdomain site url.

    e.g. Message-ID: <[email protected]>

    This might be because I have “define(‘DOMAIN_CURRENT_SITE’, ‘subdomain.domainname.tdl’);” set in my wp-config file?

    CF7 will show a validation error if I use [email protected] in the From field (I am using Reply-To: [your-email] in Additional Headers).

    But CF7 validation likes noreply@site1.subdomain.domainname.tdl, my concern is that this will be different from the Message-ID so could still be classes as spam?

    I think for me, I am looking for a way to set a default From email, perhaps in wp-config.php and then use a short_code in the From filed of each form that CF7 is happy to validate.

    Hope this makes sense? Any suggestions/ideas would be great.

    Regards,
    David

    I understand your problem. We couldn’t figure it out.

    so we went for adding this to the config.php file

    /** The Contact Form 7 plugin configuration check. */
    define( ‘WPCF7_VALIDATE_CONFIGURATION’, false );

    @sense4seo thanks for this ??

    To confirm for anybody else struggling with validation on a WordPress multisite/network.

    Add the following to your websites wp-config.php file before the line: /* That’s all, stop editing! Happy blogging. */

    /** The Contact Form 7 plugin configuration check. */
    define( 'WPCF7_VALIDATE_CONFIGURATION', false );
    Thread Starter Anonymous User

    (@anonymized-14169293)

    Hope the author could take this into consideration, should be easy take each site domain to do the validation, instead just take the main site domain. Also, it’s in total compliance of best practices.

    Thread Starter Anonymous User

    (@anonymized-14169293)

    @takayukister Do you think it could be fixed/supported?

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Thread Starter Anonymous User

    (@anonymized-14169293)

    Still getting the same error for subsites (This email address does not belong to the same domain as the site.)

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    How did you implement domain mapping?

    Hi, thanks for the dev version.

    Testing (on a live site), I still get the warning if I use:-
    [email protected] (I am using WordPress MU Domain Mapping on WordPress 4.3)

    But no errors when using [email protected] or [email protected] <= this I think is what I should be using as the Message-ID: is
    <[email protected]> (the main Network url)

    I’ll keep testing and report any error.

    Regards,
    David

    Discovered all sites have the error after installing the Dev update, but just clicking “Update” on the form clears the error.

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Ah, yes, configuration validation runs when you save the contact form, so don’t forget to click the “Save” button.

    Thread Starter Anonymous User

    (@anonymized-14169293)

    “Re-saving” is not working for me (testing on a live site).

    – Multisite subdirectory
    – Domain Mapping Donnchas plugin – https://www.ads-software.com/plugins/wordpress-mu-domain-mapping/
    – Settings: Permanent redirect and redirect admin pages to original domain are checked.

    Hi @QROkes, I wonder if it’s something to do with subdirectory?

    I am using subdomain.website.com so need to use [email protected] in the From: filed.

    I am guessing you can probably just use [email protected]

    I good way to check what domain the emails are being sent from is to send a test and check the email headers and look for Message-ID which will probably have a long number @yourwebsite.com

    Regards,
    David

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘Multisite with domain mapping validation’ is closed to new replies.