Skip to:
Content

BuddyPress.org

#8985 closed defect (bug) (fixed)

missing admin.js map file inside current & 12.0.0-beta1

Reported by: vapvarun's profile vapvarun Owned by: imath's profile imath
Milestone: 11.4.0 Priority: normal
Severity: normal Version:
Component: Members Keywords: has-patch commit
Cc:

Description

To replicate the issue: When editing a user's profile, go to the extended tab located in the backend.
The console displays the following errors:

admin.min.js?ver=11.3.1:1 Uncaught SyntaxError: Unexpected token '<' (at admin.min.js?ver=11.3.1:1:1)
buddypress/bp-members/admin/js/admin.min.js

admin.js.map is missing the new release also in 12.0.0-beta1

The privacy change options for user fields are being affected.

initially reported at support https://buddypress.org/support/topic/bp-xprofile-visibility-settings/

Change History (6)

#1 @imath
11 months ago

  • Component changed from Core to Members
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 11.4.0

Hi @vapvarun

Thanks a lot for your report.

I confirm there's an issue. I agree with the description provided on the support topic, we wrongly try to load a file that does not exist. The console error looks like:

GET http://wordpress.stable/wp-content/plugins/buddypress/bp-members/admin/js/admin.min.js?ver=11.3.1 404 (Not Found)

I'm amazed you're getting a different error!

About the .map file missing in 12.0, it's due to the fact we migrated to @wordpress/scripts see #8457

This ticket was mentioned in PR #158 on buddypress/buddypress by @imath.


11 months ago
#2

  • Keywords has-patch added; needs-patch removed

This file is not minified using the Grunt task anymore but directly using Webpack. The source file can be found inside /src/js/admin/bp-members.

Trac ticket: https://buddypress.trac.wordpress.org/ticket/8985

#3 @vapvarun
11 months ago

I was confused by the error log. It should ideally show a 404 error for the min file.
The particular .min file has been absent in the past few releases.
https://plugins.trac.wordpress.org/browser/buddypress/tags/11.0.0/bp-members/admin/js

#4 @imath
11 months ago

  • Keywords commit added

Yes the error I get is a 404 🤗.

I forgot to update the PHP part when updating JS to modern JS, my bad. The PR should fix it.

#5 @imath
11 months ago

In 13574:

Make sure to load the right JS Asset in WP-Admin/Extended profile

Props vapvarun, martenw

See #8985
Closes https://github.com/buddypress/buddypress/pull/158

#6 @imath
11 months ago

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

In 13575:

Make sure to load the right JS Asset in WP-Admin/Extended profile

Props vapvarun, martenw

Fixes #8985 (branch 11.0)

Note: See TracTickets for help on using tickets.