Skip to:

Opened 4 years ago

Closed 4 years ago

#6874 closed defect (bug) (fixed)

BP_Email: user registration in WP 3.8

Reported by: imath Owned by: djpaul
Milestone: 2.5 Priority: normal
Severity: normal Version:
Component: Core Keywords:


Just tested on:

If as a user i try to register form site.url/register, once the form is submitted i get an email template output to the user ?

See screenshot.

Change History (4)

#1 @DJPaul
4 years ago

Most likely something is causing a PHP fatal or notice. What is in yoru log file?

#2 @imath
4 years ago

@DJPaul it looks like the BP Email Feature is using a function is_customize_preview() that was introduced in WP 4.0.

PHP Fatal error:  Call to undefined function is_customize_preview() in /Users/imath/Plugins/buddypress/src/bp-templates/bp-legacy/buddypress/assets/emails/single-bp-email.php on line 190, referer:

So as we support back to WP 3.9....

#3 @DJPaul
4 years ago

That's unfortunate. The customizer implementation for the email itself doesn't load for WP 3.9:

But since that call in the footer of the email template is only there to make the customizer works (it needs to load some JS files), and since the email customiser code won't already load on WP 3.9, we can modify that line to read if function_exists('is_customize_preview') && is_customize_preview()....

#4 @djpaul
4 years ago

  • Owner set to djpaul
  • Resolution set to fixed
  • Status changed from new to closed

In 10535:

Emails: update template for WP 3.9 support

wp_footer() is included in the email template for when the template
has been loaded inside the Customiser preview frame. The function used
to for this, is_customize_preview, was only introduced in WP 4.0 and
is causing fatal errors in WP 3.9.

The rest of the Customizer integration code already checks for WP 4.0+;
this part of the template was just overlooked.

Fixes #6874

Note: See TracTickets for help on using tickets.