Skip to:
Content

BuddyPress.org

Opened 5 years ago

Closed 5 years ago

#6216 closed defect (bug) (fixed)

buddypress.js has dependency to deprecated bp-jquery-scroll-to.js

Reported by: wpdennis Owned by: boonebgorges
Milestone: 2.3 Priority: normal
Severity: normal Version: 2.1
Component: Core Keywords: dev-feedback
Cc: mail@…

Description

bp-jquery-scroll-to.js was deprecated in 2.1 but is still a dependency by default in bp_core_get_js_dependencies():

function bp_core_get_js_dependencies() {
    return apply_filters( 'bp_core_get_js_dependencies', array(
	'jquery',
	'bp-confirm',
	'bp-widget-members',
	'bp-jquery-query',
	'bp-jquery-cookie',
	'bp-jquery-scroll-to'
    ) );
}

With define('BP_IGNORE_DEPRECATED', true); the buddypress.js isn't loaded anymore.

Change History (3)

#1 @wpdennis
5 years ago

  • Cc mail@… added

And the file buddypress.js itself is still using jq.scrollTo(), e.g. for comments to activities.

Depending on the reasons why bp-jquery-scroll-to was deprecated in first place, I think this should be reverted or buddypress.js should at least check if the function exists. But even then scrollTo would be more optional than deprecated.

#2 @boonebgorges
5 years ago

  • Milestone changed from Awaiting Review to 2.3

I think you're correct that this never should have been deprecated in the first place. [8559]

#3 @boonebgorges
5 years ago

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

In 9477:

Undeprecate jquery.scroll-to.js.

This file was deprecated as part of [8559], which did some miscellaneous
cleanup of old scripts. However, scrollTo() continues to be used in bp-legacy
JS, and so jquery.scroll-to remains a requirement. It should not be broken by
BP_IGNORE_DEPRECATED.

Props wpdennis.
Fixes #6216.

Note: See TracTickets for help on using tickets.