Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#49029 closed enhancement (fixed)

Introduce a JSON file into the personal data export.

Reported by: xkon's profile xkon Owned by: xkon's profile xkon
Milestone: 5.4 Priority: normal
Severity: normal Version:
Component: Privacy Keywords: has-patch commit has-unit-tests has-dev-note
Focuses: Cc:

Description

There have been discussions for supporting a JSON format as well for a long time now (including the cross-privacy group) but it was never implemented or was skipped for other priorities.

I think it would be a +1 if we could introduce this in 5.4.

The patch creates an "export.json" that will be compressed in the produced zip along with the current index.html.

I've reorganized the code on the exporter a bit as well so we can benefit from 1 data group going into 2 different files as needed.

This was also mentioned as an extra request in #46424.

Attachments (4)

49029.diff (5.0 KB) - added by xkon 5 years ago.
49029.2.diff (5.5 KB) - added by xkon 5 years ago.
49029.3.diff (7.6 KB) - added by xkon 5 years ago.
49029.4.diff (1.0 KB) - added by xkon 5 years ago.

Download all attachments as: .zip

Change History (13)

@xkon
5 years ago

#1 @xkon
5 years ago

  • Owner set to xkon

@xkon
5 years ago

#2 @xkon
5 years ago

I missed adding the $json_report_pathname to the wp_privacy_personal_data_export_file_created action on the previous patch.

49029.2.diff appends the extra pathname at the end of the action to avoid breaking any possible existing calls.

@xkon
5 years ago

#3 @xkon
5 years ago

  • Keywords commit has-unit-tests added; 2nd-opinion removed

49029.3.diff adds phpunit tests as well for the JSON file.

I've tested again all default exports, as well as content from extra plugins and everything, seems to be working as expected.

Marking this for commit.

#4 @audrasjb
5 years ago

  • Keywords needs-dev-note added

#5 @SergeyBiryukov
5 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 47146:

Privacy: Introduce a JSON file into the personal data export.

The produced ZIP archive will now include an export.json file along with the current index.html.

Props xkon.
Fixes #49029. See #46424.

@xkon
5 years ago

#6 @xkon
5 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Sorry @SergeyBiryukov ! Reopening this for a missed doc on the created file action.

49029.4.diff takes care of that also 😅.

#7 @SergeyBiryukov
5 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 47150:

Docs: Document the addition of $json_report_pathname parameter to the wp_privacy_personal_data_export_file_created action.

Follow-up to [47146].

Props xkon.
Fixes #49029.

#8 @garrett-eclipse
5 years ago

  • Keywords has-dev-note added; needs-dev-note removed

#9 @garrett-eclipse
4 years ago

  • Focuses privacy removed

Dropping privacy focus as it's already in the Privacy component.

Note: See TracTickets for help on using tickets.