[wp-trac] [WordPress Trac] #43438: Add filters and Ajax support for personal data export

WordPress Trac noreply at wordpress.org
Tue May 1 09:36:23 UTC 2018


#43438: Add filters and Ajax support for personal data export
-----------------------------------------------+-----------------------
 Reporter:  azaozz                             |       Owner:  desrosj
     Type:  enhancement                        |      Status:  assigned
 Priority:  normal                             |   Milestone:  4.9.6
Component:  General                            |     Version:
 Severity:  normal                             |  Resolution:
 Keywords:  gdpr needs-unit-tests needs-patch  |     Focuses:
-----------------------------------------------+-----------------------

Comment (by birgire):

 Further possible changes could be to adjust the error messages for more
 consistency.

 Here are the possible error messages raised in
 {{{wp_ajax_wp_privacy_export_personal_data()}}} for the ''WordPress
 Comments'' exporter, as an example:

 - Missing request ID.
 - Invalid request type.
 - Invalid request ID.
 - Invalid request.
 - A valid email address must be given.
 - Missing exporter index.
 - Missing page index.
 - An exporter has improperly used the registration filter.
 - Exporter index cannot be negative.
 - Exporter index out of range.
 - Page index cannot be less than one.
 - Expected an array describing the exporter at index 1.
 - Exporter array at index 1 does not include a friendly name.
 - Exporter does not include a callback: WordPress Comments.
 - Exporter callback is not a valid callback: WordPress Comments.
 - Expected response as an array from exporter: WordPress Comments.
 - Expected data in response array from exporter: WordPress Comments.
 - Expected data array in response array from exporter: WordPress Comments.
 - Expected done (boolean) in response array from exporter: WordPress
 Comments.

 Here are the possible error messages raised in
 {{{wp_ajax_wp_privacy_erase_personal_data()}}} for the ''WordPress
 Comments'' exporter, as an example:

 - Missing request ID.
 - Invalid request type.
 - Invalid request ID.
 - Invalid request.
 - A valid email address must be given.
 - Missing exporter index.
 - Missing page index.
 - Eraser index cannot be negative.
 - Eraser index out of range.
 - Page index cannot be less than one.
 - Expected an array describing the exporter at index 1.
 - Eraser array at index 1 does not include a callback.
 - Eraser callback at index 1 is not a valid callback.
 - Eraser array at index 1 does not include a friendly name.
 - Did not receive array from WordPress Comments eraser (index 1).
 - Expected num_items_removed key in response array from WordPress Comments
 eraser (index 1).
 - Expected num_items_retained key in response array from WordPress
 Comments eraser (index 1).
 - Expected messages key in response array from WordPress Comments eraser
 (index 1).
 - Expected messages key to reference an array in response array from
 WordPress Comments eraser (index 1).
 - Expected done flag in response array from WordPress Comments eraser
 (index 1).

 For example:

 - Expected done (boolean) in response array from exporter: WordPress
 Comments.
 - Expected done flag in response array from WordPress Comments eraser
 (index 1).

 and

 - Expected response as an array from exporter: WordPress Comments.
 - Did not receive array from WordPress Comments eraser (index 1).

 ----


 Since plugins can define their own friendly name, there's a possible
 confusion if the friendly name is a bad one like "response eraser". Then
 we have e.g.:

 - Expected messages key in response array from response eraser eraser
 (index 1).

 that is difficult to understand.

 I wonder if there's a way to use translatable quotes, so it would display
 like:

 - Expected messages key in response array from "response eraser" eraser
 (index 1).

 or keep the friendly name at last, like:

 - Expected messages key in response array (index 1) from eraser: response
 eraser.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/43438#comment:43>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list