Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with variable number of posts on every WP release #111

Closed
juanmaguitar opened this issue May 21, 2024 · 1 comment
Closed

Fix issue with variable number of posts on every WP release #111

juanmaguitar opened this issue May 21, 2024 · 1 comment
Assignees

Comments

@juanmaguitar
Copy link
Collaborator

juanmaguitar commented May 21, 2024

An issue has been detected that affects the blueprints. On every new WP release there's variable number of posts published by default. On one WP release can be four and on another can be five. This affects the ids for posts where they're imported from an XML (as we're doing in a lot of examples)

This issue is causing several WP playground demos not to work because after latest WP release 6.5 id's changed and the URL set in the blueprint.json didn't exist.

@juanmaguitar juanmaguitar self-assigned this May 21, 2024
@juanmaguitar
Copy link
Collaborator Author

juanmaguitar commented May 27, 2024

The more elegant solution for this problem is to directly set the ID of the post in the xml that is imported.
This solution works either for landing pages going to the editor or to the frontend.
When the landing page goes to a frontend page, setting permalinks would also solve this issue

This has been fixed on commit e27e187

@juanmaguitar juanmaguitar changed the title Implement permalinks to fix issue with variable number of posts on every WP release Fix issue with variable number of posts on every WP release May 27, 2024
adamziel pushed a commit to WordPress/blueprints that referenced this issue Aug 1, 2024
…sing resetData) (#54)

This blueprint runs an SQL query to delete default posts from the
default theme.
It also loads custom content with custom IDs for each post. 
The technique used in this blueprint is a nice workaround for [this
issue](WordPress/block-development-examples#111).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant