The documentation for the return value of NodeController::addPage() has not been updated when we changed the way redirects work. It still thinks we are using drupal_goto() and doesn't return a value on redirect, when it in fact returns a RedirectResponse.

It also still refers to node_menu() which has long been replaced with the routing system.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug: documentation is incorrect.
Unfrozen changes Unfrozen because it only changes documentation
Disruption None
CommentFileSizeAuthor
#2 2554881-2.patch1.02 KBpfrenssen

Comments

pfrenssen created an issue. See original summary.

pfrenssen’s picture

Priority: Normal » Minor
Status: Active » Needs review
StatusFileSize
new1.02 KB
jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, thanks for the issue and patch!

+++ b/core/modules/node/src/Controller/NodeController.php
@@ -60,19 +60,16 @@ public static function create(ContainerInterface $container) {
+   *   will return a RedirectResponse to the node add page for that one node

Normally we would want this to be a fully-namespaced class name, but since it's just a few lines above I think we can omit the namespace.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.0.x. Thanks!

  • webchick committed c72bc9a on 8.0.x
    Issue #2554881 by pfrenssen: Fix documentation for return value of...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.