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.
The D7 page callback for the path 'admin/config/content/scheduler/timecheck' needs to be converted to a route controller.
Change record: All functionality of hook_menu() is replaced by new systems for routing, menu links, local tasks, actions and contextual links.
This is part of #2426627: [meta] Convert all page callbacks to routes.
Comment | File | Size | Author |
---|---|---|---|
#18 | interdiff.txt | 3.86 KB | pfrenssen |
#16 | scheduler_timecheck-2432345-16.patch | 7.27 KB | pfrenssen |
#9 | timecheck.png | 29.4 KB | pfrenssen |
Comments
Comment #1
herved CreditAttribution: herved commentedComment #2
batigolixComment #3
batigolixAttached a first, rough & rocky patch.
It needs plenty of love & attention, but the 1st main step, adding the route controller, is done
The D7 code used a theme function, which seems a bit useless.
By removing it, I could skip learning how theme functions work in D8 (if they still exist)
Comment #4
batigolixComment #5
herved CreditAttribution: herved at Randstad Digital commentedHello,
Thanks @batigolix for your patch.
But I was wondering wouldn't it be more convenient to output this information in the status page?
This way we rely on the "access administration pages" permission + we also get rid of the menu item and the controller.
I'm attaching a patch. Most of my work is based on the system module.
If I'm mistaken and a route controller is preferable then we can always combine both patches.
PS: Not really in the scope but I also removed the following unused "use" statement in scheduler.admin.inc:
use Drupal\Core\Session\AccountInterface;
Comment #7
herved CreditAttribution: herved at Randstad Digital commentedMy patch should be fine however I believe the tests are broken ;)
We should look into #2418543: Relocate automated tests in PSR-4 namespaces asap.
Comment #8
pfrenssenYes the tests are currently broken. They still need to be ported.
I quite like the idea of moving this information to the "Reports" page, but I would like to have the opinion of @jonathan1055 on this as well.
Comment #9
pfrenssenHere is how it looks in the status reports page:
Comment #10
herved CreditAttribution: herved at Randstad Digital commentedI found an issue in the code I copied from the system module. See #2296929: Remove system_requirements() SafeMarkup::set() use.
I mark this issue as needs work and I'll fix my patch as soon as it's resolved.
Comment #11
pfrenssenPostponing on #2296929: Remove system_requirements() SafeMarkup::set() use.
Comment #12
pfrenssenWe actually don't need to wait on #2296929: Remove system_requirements() SafeMarkup::set() use to be able to complete this.
Comment #13
herved CreditAttribution: herved at Randstad Digital commentedThanks pfrenssen,
So if #2296929: Remove system_requirements() SafeMarkup::set() use is not a drupal issue but a drush issue I move this ticket back to needs review.
Comment #14
pfrenssenThe patch doesn't apply any more.
Comment #16
pfrenssenStraight reroll.
Comment #18
pfrenssenLooking good, made some final cleanups and committed to 8.x-1.x.
Changes made:
Thanks!