#7679 closed defect (bug) (fixed)
JS error in wp-admin "Extended Profile" blocking upload of profile photo
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | major | Version: | |
Component: | Administration | Keywords: | |
Cc: |
Description
With trunk, accessing http://example.com/wp-admin/users.php?page=bp-profile-edit will print a JS error to console. This stops the "Edit Profile Photo" box loading.
This is a regression from the 2.9.x branch because this works there.
Change History (5)
#2
@
7 years ago
Broken in [11835].
In wp-admin, the Attachments module always tries to load the "default" templates, skipping the template hierarchy. I don't recall exactly why this was - I guess because wp-admin is not a themed area. See https://github.com/buddypress/BuddyPress/blob/f078caa1fa5a93e9bdb074f3e914633620858436/src/bp-core/bp-core-attachments.php#L928
The simple answer is to change 'bp-legacy' to 'shared'. But this alone doesn't work, because the file /src/bp-templates/shared/buddypress/assets/_attachments/avatars/index.php contains a reference to a bp_nouveau
function. I think the right answer is to revert to the bp-legacy version of avatars/index.php in the 'shared' directory, and move the current avatars/index.php to bp-nouveau. This strategy needs sign-off from @hnla or @DJPaul, who probably understand this better than I do.
#3
@
7 years ago
@boonebgorges This may relate to something I spotted after the asset dir move and while looking at the attachments in general trying to make some changes, we have a hardocoded reference to a path for admin templates that seemed out of place now and probably needed updating to something more dynamic to suit multi template packs or assets as 'shared' details are mentioned somewhere, haven't to hand at the moment, will try and look later.
#5
@
7 years ago
The only concern I have here is that the nouveau sets were in fact updated and as such 'better', I tended to like the approach taken to use the Nouveau set as default and retain legacy's as overloaded, I had/have been working through these templates trying to update some general aspects that aren't generally optimal but can't do that on the default set as used by legacy for the usual fears :( , but if we're working again alls well that ends well :(
My JS/Backbone is too weak to debug this.