You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like to use OneSignal Wordpress together with Yoast Duplicate Post plugin (currently 3 Mio. installations). The Plugin allows to schedule updates to existing posts. This is done by duplicating a post and keep a reference to the original post in the database. Yoast calls this "Rewrite & Republish". When a post is finally schedule for publishing it copies over the draft data to the original post.
The problem we are facing at the moment is that everytime a post ist schedule for republish it will send the push notification with the url of the draft post. We think it would be possible to check if the post currently getting publish is draft from Yoast Duplicate Post in that case we would use the original instead of the draft url.
Steps to Reproduce Issue:
Install Yoast Duplicate Post and activate the plugin
Make sure that the Rewrite & Republish feature is active in the plugin settings
Create a Post and publish it with slug "/example"
Go to Post list and click on "Rewrite & Republish"
Make some changes and schedule the republish version + activate a push notification
Wait for the push notification to get published
Check the url of the push notification it should have a url like /example-1
If you click on the push notification you should receive a 404 page (because it used the draft url)
Anything else:
To make this work we're currently investigating a solution to use the onesignal_send_notification filter hook to check the current post if its a draft from yoast duplicate post and then change the push notification url to the original post URL. But it would be super awesome if onesignal could do this out of the box.
If you interested to make the plugin compatible we can also provide a PR.
The text was updated successfully, but these errors were encountered:
@piscis Thanks for digging in and producing the issue, as well providing steps to reproduce the issue. We haven't verified the Yoast plugin yet, we would be open to a PR if your are interested providing one to address this issue. Thanks.
Greet 👍 @jkasten2 I opened a PR (#280). This is basically a extract from what we are doing with the onesignal_send_notification filter to get the correct url durring publication.
Description:
Hi this is a kinda feature request.
We would like to use OneSignal Wordpress together with Yoast Duplicate Post plugin (currently 3 Mio. installations). The Plugin allows to schedule updates to existing posts. This is done by duplicating a post and keep a reference to the original post in the database. Yoast calls this "Rewrite & Republish". When a post is finally schedule for publishing it copies over the draft data to the original post.
More infos can be found here: https://yoast.com/wordpress/plugins/duplicate-post/#what-does
The problem we are facing at the moment is that everytime a post ist schedule for republish it will send the push notification with the url of the draft post. We think it would be possible to check if the post currently getting publish is draft from Yoast Duplicate Post in that case we would use the original instead of the draft url.
Steps to Reproduce Issue:
Anything else:
To make this work we're currently investigating a solution to use the
onesignal_send_notification
filter hook to check the current post if its a draft from yoast duplicate post and then change the push notification url to the original post URL. But it would be super awesome if onesignal could do this out of the box.If you interested to make the plugin compatible we can also provide a PR.
The text was updated successfully, but these errors were encountered: