Making WordPress.org

Opened 4 months ago

Closed 4 months ago

Last modified 4 months ago

#7640 closed defect (bug) (fixed)

Notices due to Jetpack Stats direct inclusion

Reported by: dd32's profile dd32 Owned by: akirk's profile akirk
Milestone: Priority: low
Component: Translate Site & Plugins Keywords:
Cc:

Description

E_USER_NOTICE: Function Automattic\Jetpack\Stats\Tracking_Pixel::add_to_footer is <strong>deprecated</strong> since version 0.6.0 with no alternative available.

The above is being triggered on Translate due to Jetpack stats updating the way it's loaded.

See [12557], r20315-dotorg.

References:

plugins/wporg-gp-customizations/inc/class-plugin.php:		add_action( 'gp_footer', array( 'Automattic\Jetpack\Stats\Tracking_Pixel', 'add_to_footer' ), 101 );
plugins/wporg-gp-playground/inc/routes/class-route.php:		\Automattic\Jetpack\Stats\Tracking_Pixel::add_to_footer();

Change History (3)

#1 @dd32
4 months ago

  • Owner set to akirk
  • Status changed from new to reviewing

@akirk could you take a look? I'm unsure how to test it properly.

#2 @akirk
4 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 13715:

wporg-gp-customizations: fix wp_enqueue_admin_bar_header_styles notice, remove Jetpack stats as they are loaded already in the global header

Fixes #7640

#3 @akirk
4 months ago

Thanks @dd32. It can be verified by searching the HTML source of the respective pages for jetpack-stats-js-after and clickTrackerInit:

  1. Any page on translate.wordpress.org
  2. A Translate Live page such as https://translate.wordpress.org/projects/wp-plugins/friends/dev/de/default/playground/

In both instances the code is loaded.

Note: See TracTickets for help on using tickets.