Uh oh!
There was an error while loading. Please reload this page.
Update scheduled status when it should - #5089
Conversation
jesseleite
commented
Jan 19, 2022
@jasonvarga, Does this |
jasonvarga
commented
Jan 20, 2022
This index would be populated with exactly that - $entry->status() values. |
Oh my I wasn't aware of this issue since I use static caching mostly. But on this one site without, my scheduled entries wouldn't show. Pretty critical. Thanks for solving this Michael. I'd love to see it get merged :-). |
jasonvarga
commented
Mar 4, 2022
FYI the delay on this is because it only solves the issue for the Stache. If you're using Eloquent for example, it won't have any effect. We wanted to think through it a little more. But if you're wanting to use it, you can use a composer patch. |
edalzell
commented
Mar 4, 2022
If you're using eloquent, aren't all the queries done "live" so that the future posts would get captured by the usual query? i.e. this problem doesn't exist w the Eloquent driver? |
jasonvarga
commented
Mar 4, 2022
The I think the ideal solution would be to scrap the dedicated The Instead of doing This would be a much more far-reaching change though. |
aerni
commented
Mar 4, 2022
Are you saying that this can't be implemented without breaking changes? |
jasonvarga
commented
Mar 4, 2022
I think this PR will end getting merged and we'll have some alternate solution for Eloquent. But we want to have an idea before we push the button. |
jasonvarga
commented
May 16, 2022
Could you target 3.3 and merge 3.3 into this? |
| protected function expirableItems() | ||
| { | ||
| return collect($this->items)->filter(function ($value, $id) { | ||
| return $value === 'scheduled' && $this->store->index('date')->get($id)->isPast(); |
There was a problem hiding this comment.
This should include status 'published' so expirable items (as in they are hidden starting at the given date) get updated to status 'expired' as well. Something like this:
return ($value === 'scheduled' || $value === 'published') && $this->store->index('date')->get($id)->isPast();There was a problem hiding this comment.
I've explained it in more detail in #2217 (comment).
ryanmitchell
commented
Jan 20, 2023
Maybe this is the solution you already discounted, but we could drop the status column in eloquent-driver and if the column is |
jesseleite
commented
Mar 9, 2023
This got mentioned again in Discord. Not sure @jasonvarga's current thoughts, but just a quick note that as this PR currently stands, it doesn't (yet) properly account for all four status possibilities as documented here... |
aerni
commented
Apr 12, 2023
I was just dealing with some caching invalidation questions regarding entry listings that kind of ties into this issue. I think it would be pretty nice if there was an |
jasonvarga
commented
Apr 13, 2023
That's what #5502 is essentially doing. You'd be able to see if the status is different. |
As far as I understand, that PR is only useable in existing events like |
jasonvarga
commented
Apr 13, 2023
If we could tell when an entry's status changes without user interaction, then we wouldn't have this issue to begin with. |
aerni
commented
Apr 13, 2023
Haha totally. What I'm trying to say. This PR here deals with stache invalidation. But there needs to be a way to ALSO invalidate the static cache when a status changes. |
jasonvarga
commented
Apr 13, 2023
I'm with ya |
jasonvarga
commented
Jun 7, 2023
Closing in favor of #8281. Give that a shot and see how it works for you. |

This PR takes another stab at updating the
scheduledstatus of entries when the date is in the past. As discussed in this closed PR #4653.Hope this is going in the right direction now. At least it feels better than before.