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.
Part of #1971384: [META] Convert page callbacks to controllers
For instructions on how to convert a page callback into a controller, see the WSCCI Conversion Guide.
Comment | File | Size | Author |
---|---|---|---|
#8 | drupal8.drupal_render_invalid_keys.2066523-8.patch | 3.05 KB | disasm |
#8 | interdiff.txt | 883 bytes | disasm |
#3 | drupal8.system-module.2066523-3.patch | 3.04 KB | mparker17 |
#3 | interdiff.txt | 1.78 KB | mparker17 |
#1 | system-common_test-render_invalid_keys_controller-2066523-1.patch | 3.07 KB | mparker17 |
Comments
Comment #1
mparker17Try this...
Comment #2
dawehnerThere is no need to already render the result, so let's also document the return statement.
This bit can be replaced by setting '#title' on the render array.
I am confused by that bit, why do we not just create array('child' => 'This should be an array')
Comment #3
mparker17Try this...
Comment #5
mparker17#3: drupal8.system-module.2066523-3.patch queued for re-testing.
Comment #7
disasm CreditAttribution: disasm commentedIn comment #2 1 is incorrect. This needs to return drupal_render, because that forces the error to happen inside the method that's defining SIMPLETEST_COLLECT_ERRORS to FALSE. Yes, for any normal use case, it doesn't make sense to render the array in a controller, but in this case, being a specific test where we're overriding error handling by simpletest, it's needed.
Comment #8
disasm CreditAttribution: disasm commentedattached patch should get this green again.
Comment #9
dawehnerPerfect!
Comment #10
alexpottCommitted 7470a18 and pushed to 8.x. Thanks!