Codeinwp / tweet-old-post

Plugin to tweet about your old posts to get more hits for them and keep them alive.
GNU General Public License v2.0
13 stars 16 forks source link

Due to instant sharing active, scheduled posts are shared instantly inaccessible #917

Open AndreeaCristinaRadacina opened 6 months ago

AndreeaCristinaRadacina commented 6 months ago

Description

A user reported that when instant sharing is active, the posts that are scheduled in WP are instantly shared on social platforms, and once clicked, the user is redirected to a 404 page until the schedule condition is fulfilled.

ref: https://wordpress.org/support/topic/post-shared-when-scheduled/

Step-by-step reproduction instructions

  1. Go to ROP and connect to a social platform
  2. Make sure you activate the instant sharing options in General Settings: Enable Instant Sharing Feature (Post on Publish); Use True Instant Share; Enable Instant Sharing By Default.
  3. Go to Posts > Add new and schedule a new post image


  4. Go to the social platform and see the link of the scheduled post

Screenshots, screen recording, code snippet or Help Scout ticket

The post scheduled for tomorrow is already shared, and the link points to a 404 page:

image

Environment info

No response

Is the issue you are reporting a regression

No

Soare-Robert-Daniel commented 6 months ago

@vytisbulkevicius @mghenciu I think we might need some clarification for the instant sharing feature.

Instant share triggers the sharing immediately, as the name suggested.

We have a dedicated option for scheduling posts. They are shared when it hits the time set.

image


Users who use instant sharing and want the post published on a schedule should disable instant share for page (uncheck the box) and activate the schedules sharing option in the dashboard.

Also, I checked the code to see if the wanted behavior in the reported issue is somehow present and not functional. After reviewing, the workflow is not made with instant sharing as a part of scheduled post.

Soare-Robert-Daniel commented 6 months ago

One trick I can do is stop the running of this code for scheduled posts if the Share Scheduled Posts is active.

https://github.com/Codeinwp/tweet-old-post/blob/master/includes/admin/class-rop-admin.php#L870-L881

vytisbulkevicius commented 5 months ago

@Soare-Robert-Daniel,

But Instant sharing should share only sharing Published posts, why is it sharing Scheduled posts? I think the rule that should be in place is for the Instant Sharing functionality to check for Published posts available and Ignore any other type of posts.

AndreeaCristinaRadacina commented 5 months ago

+1 https://secure.helpscout.net/conversation/2525719395/406487?viewId=212385

AndreeaCristinaRadacina commented 4 months ago

+1 https://wordpress.org/support/topic/publishing-schedule-post/#post-17562797