Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#55762 new enhancement

All export xml files have same name

Reported by: martiniwebb's profile martiniwebb Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Export Keywords: needs-patch dev-feedback
Focuses: Cc:

Description

​All download export files​, whether posts or pages ​give the same file name.​ Its difficult to manage if you have several of them because unlike a picture or a word file that you can open and see the contents, a user cannot see the content of the xml file until they upload into a WordPress panel. Loading the wrong file means one needs to clean up and then go back to look for the right file. I suggest each xml download from the Export panel bear the unique name of the file. ​

Change History (4)

#1 @SergeyBiryukov
3 years ago

  • Component changed from General to Export
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

Hi there, welcome to WordPress Trac! Thanks for the ticket.

In my testing, the export file name includes the site name and the current date, but that's about it. It would indeed be helpful if the file name also included the type of content being exported: all content, posts, pages, media, etc. and any filters applied: categories, authors, start date, end date, status, etc.

Last edited 3 years ago by SergeyBiryukov (previous) (diff)

#2 @martiniwebb
3 years ago

@@SergeyBiryukov:

Yes so, as you mentioned in your comment

Sometimes, I have the unique need to export different content types from a single installation to different websites. Then, it becomes practical for them to have different names.

But in another view, I am of the opinion that the Core developers might have considered the general purpose scenario that most users use the export tool for absolute migrastion. In that scenario, the entire suite of elements is exported.

#3 @sajjad67
3 years ago

  • Keywords dev-feedback added

@martiniwebb @SergeyBiryukov

I also agree with that... looked into the core file but i am not sure what should be the order of each things in the file name!

For example should it be :

$sitename . 'WordPress.' . $date . $contentType . $categories . $author . $startDate . $endDate . $status . '.xml';

or which order should be best for readability?

Note : each variable in the filename will come dynamically, ex:

$categories = '';

if ( isset( $args['category'] ) ) $categories = $args['category'];

This ticket was mentioned in Slack in #core by sajjad67. View the logs.


3 years ago

Note: See TracTickets for help on using tickets.