xwp / wp-customize-snapshots

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

Fix snapshot publish issue after settings save #89

Closed PatelUtkarsh closed 8 years ago

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.02%) to 90.968% when pulling ee517700356c3ecd753263846e49d65f34311c5b on bugfix/snapshot-publish-issue into 7e7e04829b14be093719d9fbec71dffa9ca09959 on develop.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.02%) to 90.968% when pulling 2b77775c6f6f9461061c13f8a10b662ba66c49b5 on bugfix/snapshot-publish-issue into 7e7e04829b14be093719d9fbec71dffa9ca09959 on develop.

lgedeon commented 8 years ago

@PatelUtkarsh It looks like this is going to block concurrency conflict checking, but maybe I can find a different way to trigger it in this case.

Actually, @westonruter I am not sure if you want to check for conflicts between what the snapshot is publishing and what has gone live since the snapshot was started. It could be really helpful in some cases but somewhat annoying in other cases.

lgedeon commented 8 years ago

On second thought, this use case would be better if we used the warning interface that you are using between two different snapshots instead of the block method that I use inside the same snapshot. So we can probably leave this code as is.

[Update: Removed]

westonruter commented 8 years ago

@lgedeon

It looks like this is going to block concurrency conflict checking, but maybe I can find a different way to trigger it in this case.

Actually, it shouldn't. Note that it's only bypassing the validation when transitioning a snapshot to publish immediately after the customizer settings have been saved. So this is the situation where you're in the customizer, you have a snapshot there, and you hit publish. The validation is going to run as normally for the customizer save process. What we're doing here is bypassing the validation from happening a second time at customize_save_after. So it should still work fine.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.02%) to 90.968% when pulling c0b4539324a7312fc11e5a9854b8fc5a3e9e59d4 on bugfix/snapshot-publish-issue into 7e7e04829b14be093719d9fbec71dffa9ca09959 on develop.