Fatal error when only one content type available on /node/add

Created on 14 August 2023, 10 months ago
Updated 22 August 2023, 10 months ago

Problem

There is a fatal error when only one type of content is available for the current user.
This is the same error as in 🐛 Fatal error when only one content type available on /node/add-microcontent Fixed , but related to regular content types instead of micro-content types.

Steps to reproduce

Reduce the set of available content types to one.
Go to /node/add
See the error:
Error: Cannot use object of type Symfony\Component\HttpFoundation\RedirectResponse as array in Drupal\micronode\Controller\MicronodeController->addPage() (line 19 of modules/contrib/micronode/src/Controller/MicronodeController.php).

Proposed resolution

Check the response is an array before accessing it

Remaining tasks

Code

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇪🇸Spain plopesc Valladolid

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024