xwp / wp-customize-snapshots

Customize Snapshots WordPress Plugin
https://wordpress.org/plugins/customize-snapshots/
53 stars 16 forks source link

Sharing changeset preview will 404 if static front page is not set #142

Closed westonruter closed 7 years ago

westonruter commented 7 years ago

From @RobStino:

If I load a changeset preview URL as another authenticated user, or even an unauthenticated user, I get page not found. … Hmm. Issue seems to have resolved itself. For context, I was using a fresh install of WP with no “Home page” defined in Settings>Reading. Setting a home page, seems to have fixed it.

westonruter commented 7 years ago

@RobStino I just tried to reproduce those steps, but I was unable. I could not see a “page not found” message when loading the homepage of the site when the latest posts were shown there.

For future reference, I set up my environment to be pristine via:

wp db reset --yes && 
wp core install --url="http://src.wordpress-develop.dev/" --title="WordPress Develop" --admin_user=admin --admin_password=admin --admin_email=admin@example.com --skip-email && 
wp cache flush && 
wp option set fresh_site 0 && 
wp plugin activate customize-snapshots

I was able to access http://src.wordpress-develop.dev/?customize_changeset_uuid=57ac178a-e2e7-4125-ba44-1c1c62148e72 without any error message.

westonruter commented 7 years ago

Another one for future reference… here is how to create a changeset using WP-CLI and open the frontend preview link in Chrome without ever logging-in and going to the Customizer:

changeset_uuid=$(uuidgen | tr [:upper:] [:lower:]) && 
wp post create --post_type=customize_changeset --post_name=$changeset_uuid --post_content='{"blogname":{"value":"BLOGNAME:'$changeset_uuid'"}}' &&
open "http://src.wordpress-develop.dev/?customize_changeset_uuid=$changeset_uuid"
westonruter commented 7 years ago

Cannot duplicate this issue.