Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In Drupal 8 we can use field storage for the publication and unpublication dates, and we no longer need to keep track of the data in our own table.
Ref. related change records to the parent change record Field info methods are now provided by EntityManager.
Comments
Comment #2
pfrenssenI've started working on this in a feature branch.
Comment #10
pfrenssenWhile working on the conversion of
_scheduler_publish()
to use the new field storage I hit a fatal error thatactions_do()
no longer exists. We need to convert it to the new Actions API (ref #1846172: Replace the actions API).Also still need to convert the queries in
_scheduler_unpublish()
andscheduler_list()
.I'm also having a problem that when I first enable the module I need to manually do a
drush updb
to create the necessary database tables. This should be done automatically, but that's maybe for a different issue.Comment #11
pfrenssenSolved the
drush updb
problem.Here is some more info about actions in Drupal 8: https://www.drupal.org/node/2020549.
Comment #13
pfrenssenSeems drupal.org is not really good at following branches yet :)
Comment #15
pfrenssenConverted to Actions API, converted the db_select() in _scheduler_unpublish().
Next steps:
Comment #16
pfrenssenNice to see that even though a completely new DateTime widget has been introduced in this issue, the net saving against the old D7 code is still over 100 lines!
Comment #18
pfrenssenI have fixed the fatal error and added a @todo for the query in
scheduler_list()
. That functionality has not yet been converted to a new route so it is not possible to test at the moment.That concludes this ticket, merging into 8.x-1.x.
Comment #20
pfrenssenHaha awesome, thanks drupal.org! :)
Comment #22
jonathan1055 CreditAttribution: jonathan1055 commentedThis is fantastic. Thanks Pieter for taking this big step forward.
Jonathan