Skip to:
Content

BuddyPress.org

Opened 10 months ago

Closed 2 months ago

#8013 closed enhancement (fixed)

BuddyPress Data Export Screen should not show WordPress/BuddyPress to users

Reported by: sbrajesh Owned by: imath
Milestone: 5.0.0 Priority: normal
Severity: normal Version: 4.0.0
Component: Settings Keywords: has-patch commit
Cc: sbrajesh

Description

In BuddyPress 4.0, the data export screen was added. It is a great feature but it exposes the underlying software to end users.

It should not show the plugin name or "WordPress" to the end users.

The function

bp_settings_data_exporter_items()

uses registered data exporters and their "exporter_friendly_name" and that is the cause of the problem.

An export friendly name may not be the best candidate for front end users(It is a good identifier for dashboard context).

We will most probably need a way to use a different property if we decide to keep using the registered data exporters.

Also, In order to fix it for now, Changing the "exporter_friendly_name" for the personal data exporters registered by BuddyPress will suffice. Whether it will be a good or bad idea, I am not sure.

Attachments (2)

8013.patch (10.9 KB) - added by imath 3 months ago.
8013.2.patch (13.6 KB) - added by imath 2 months ago.

Download all attachments as: .zip

Change History (18)

#1 @DJPaul
10 months ago

  • Milestone changed from Awaiting Review to Under Consideration

Thanks for the ticket.

Why should it not?

#2 @sbrajesh
10 months ago

Because the end users(site members) don't need to know about what software stack the site is made of. It is unsuitable for most of the admins.

Is there any specific reason for a member of a social network to know what piece of software the site is running on?

#4 @boonebgorges
10 months ago

  • Keywords needs-patch added
  • Milestone changed from Under Consideration to Awaiting Contributions

See https://buddypress.trac.wordpress.org/ticket/7826#comment:12 for some background on this.

I don't have an objection to changing it. Happy to adopt the technique used by the BuddyBoss folks, if people think it's better. I haven't looked at their implementation.

We could put this into 4.1.0 if there is a patch.

#5 @r-a-y
10 months ago

I anticipated this problem during the implementation of #7826. See comment:1:ticket:7826.

For now, you can use a filter to change the name for each export item, 'bp_settings_data_exporter_name'.

#6 @sbrajesh
10 months ago

I agree with @boonebgorges and his comment about the filtering. Filtering plugin name will be a bad thing and may not work for all languages.

Why don't we use another flag say 'bp_friendly_name' or 'user_friendly_name' key and only list items which have it?

The exporters registered with filter 'wp_privacy_personal_data_exporters' are plain arrays and there is no harm in adding another key to it.

I will be glad to add a patch if we can agree on some name for the key.

This approach has pro and cons both:
Pro:

  • User friendly labels
  • Possibility to skip some of the exporters
  • Better control on what user sees

Cons:

  • Needs explicit support
  • Not everyone will be keen to add it.

#7 @sbrajesh
10 months ago

Also, @r-a-y had this figured in #comment:1:ticket:7826. The only change I will like to do is add extra key for user friendly name and then add those keys explicitly for WordPress core exporters.

#8 @r-a-y
10 months ago

The only change I will like to do is add extra key for user friendly name and then add those keys explicitly for WordPress core exporters.

Yeah, I also anticipated this. Read the todo item for the bp_settings_data_exporter_items() function :)

#9 @sbrajesh
10 months ago

Nice. Just saw it. The 'exporter_frontend_name'.

You are awesome my friend :)

#10 @boonebgorges
10 months ago

  • Milestone changed from Awaiting Contributions to 4.1.0

Yup, a "BP friendly" name (with an appropriate fallback for plugins that don't provide it) sounds fine to me. 'bp_friendly_name' seems OK to me.

BP could also go ahead and register 'bp_friendly_name' values for WP's data.

This ticket was mentioned in Slack in #buddypress by boone. View the logs.


10 months ago

#12 @boonebgorges
10 months ago

  • Component changed from Core to Members
  • Milestone changed from 4.1.0 to 5.0.0
  • Version set to 4.0.0

This can likely be moved back to a minor release if we get a patch.

@imath
3 months ago

#13 @imath
3 months ago

  • Component changed from Members to Settings
  • Keywords has-patch added; needs-patch removed

Here's my suggestion about it. 8013.patch is adding a new 'exporter_frontend_name' key to all BuddyPress exporters and uses a filterable array for custom frontend names where the WordPress ones are set.

As this introduces new strings to translate, I've left it into the 5.0.0 milestone.

This ticket was mentioned in Slack in #buddypress by imath. View the logs.


2 months ago

@imath
2 months ago

#15 @imath
2 months ago

  • Keywords commit added

As discussed yesterday during dev-chat, In .2.patch I'm replacing the key for the BP Friendly name in favor of exporter_bp_friendly_name. I've also added 2 BP Friendly names about the Friends component I've missed in the first patch.

I will commit this shortly.

#16 @imath
2 months ago

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

In 12416:

BP Settings: Introduce a new BP friendly name key into data exporters

The name of this key is exporter_bp_friendly_name. It is added to BP & WP exporter arrays to adapt the existing exporter_friendly_name for a non Administrator role context. If this new key is provided it will be used to output the friendly name of the exported items, otherwise it will use the existing exporter_friendly_name key.

For example, into the items list of the site.url/username/settings/data page of the logged in user, "WordPress Comments" will be replaced by "Comments" and so on for every built-in WordPress and BuddyPress items.

Props sbrajesh, r-a-y, boonebgorges

Fixes #8013

Note: See TracTickets for help on using tickets.