Closed (fixed)
Project:
Scheduler
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Jul 2014 at 18:25 UTC
Updated:
29 Mar 2016 at 02:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jonathan1055 commentedComment #2
jonathan1055 commentedHere's the patch which addresses points 1-6 above. Point 7 is not done - I thought that even though we are not using the $result anymore, it may be useful to leave in, as we don't know how the module may evolve in D8.
Comment #3
pfrenssenExcellent catch, especially considering that this code usually runs on cron. It will solve some mysterious cases where nodes seem to be (un)published too late.
This makes sense but I'm afraid we can't change this any more. It might break sites that rely on the current behaviour. For example, some developers might rely on the changed date or created date being set to the publish_on date.
I would certainly add a comment here to fix this in D8.
Same here, we cannot change this behaviour because of the risk it might break existing implementations. Let's add a comment to fix this in D8.
This check to see if the node is actually published before attempting to unpublish it has been removed. Is this intentional?
It might be better to discuss the potential implications of this in a separate issue.
Comment #4
pfrenssenComment #5
jonathan1055 commentedThanks for the review.
Yes, I take your point about not moving the scheduler API 'pre' calls within D7. I will remove them but add a TODO comment for D8.
Regarding the removal of status=1 check, yes that was intentional - see point 3 in the summary. However, I agree that we can discuss it in a separate issue #2355129: Remove test for $status=1 before unpublishing.
I will re-roll the patch without these.
Comment #6
jonathan1055 commentedHere's a new patch, against 7.x-1.2+11, covering the changes discussed.
Using the numbering in the summary, it only includes items 1, 4, 5 and 6.
Comment #7
pfrenssenGoing to work on this.
Comment #8
jonathan1055 commentedha ha! OK, lets avoid cross-posting patches this time.
Comment #9
pfrenssenYou catch my drift :D
Comment #10
pfrenssenLooks good, patch needed a reroll. If this is green this is RTBC.
Comment #11
pfrenssenGreat! Committed to 7.x-1.x, thanks!!
Comment #14
jonathan1055 commentedThere were some @todo tasks regarding moving the 'pre' actions which we had to leave until D8 (see #3 point 2 and 3). It would be good to get these done now, before I start on expanding the API tests #2655666: API Testing module - conversion to 8.x.
Also as we work on #2651338: Create a service for the Scheduler API and #2669164: Introduce event subscriber for the Scheduler hooks the API test module will change, but the tests might/should stay the same, and the calls should be moved to their correct places before any of this work is started.
Patch attached, but currently these api functions are not covered by testing.
Comment #15
jonathan1055 commentedHere's the commit http://cgit.drupalcode.org/scheduler/commit/?id=4ecd062
Auto commit comments still not working