-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
[Feature] Font Library[Priority] HighUsed to indicate top priority items that need quick attentionUsed to indicate top priority items that need quick attention[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
When exporting and importing content via the WordPress Importer font faces are not imported to the new domain correctly.
This can result in broken designs as the templates imported from the original site are referring to font files on the old site.
When imported with the Download and import file attachments option checked the font files should be:
- uploaded to the new site
- URLs updated to point to their new location
For clarity, this is referring to the XML/WXR exporter available via the WP Dashboard's Tools > Export menu.
Step-by-step reproduction instructions
- Create multiple sites running WordPress trunk (one for export, one for import)
- On the exporter site:
- Edit the 2024 home page
- Download Open Sans from Google Fonts (ie, visit the site and download them to your computer)
- Open the style editor > typography > Manage Fonts > Upload
- Upload the Open Sans files (standard will do, don't worry about condensed, etc)
- Close the model once upload is complete
- Go through each of the element types and change the font to Open Sans
- Use the Yoast Faker CLI tool to create some fake content (this will include attachments)
- Visit Tools > Export and download all content
- Keep this site running for the next step
- On the importer site:
- Install and activate the WordPress Importer plugin
- Note: For localhosts you may need to change this line to use
wp_remote_get() - Visit Tools > Import > WordPress > Run Importer
- Check the box to import attachments at the bottom of the screen
- Shut down the exporter site
- Visit the importer site's front end
- Observe the fonts use system defaults
- In the browser network tools observe the fonts are trying to make request to the exporter site
- Open the style editor > typography > Manage Fonts
- Observe the Open Sans fonts are marked as installed locally via uploads
- When looking at the content created, you'll notice the media file URLs have been updated in the content to refer to the importer site's URL
Screenshots, screen recording, code snippet
Screenshot from localhost (importer site), notice font face URLs refer to wp-dev.local (exporter site)
Environment info
- WordPress trunk WordPress/wordpress-develop@c89e050
- Gutenberg plugin deactivated
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Metadata
Metadata
Assignees
Labels
[Feature] Font Library[Priority] HighUsed to indicate top priority items that need quick attentionUsed to indicate top priority items that need quick attention[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
