Cannot save menu with Drupal < 10 and 2.0 Alpha4

Created on 13 June 2023, over 1 year ago

Problem/Motivation

With Drupal 9 when I install the 2.0.0-alpha4 release and I try to edit a TB Mega Menu in the admin I get the following error :

Error : Call to undefined method Symfony\Component\HttpFoundation\Request::getContentTypeFormat() dans Drupal\tb_megamenu\Controller\TBMegaMenuAdminController->saveConfiguration() (/home/clients/xxxxxx/sites/xxxxx.akollade.fr/web/modules/contrib/tb_megamenu/src/Controller/TBMegaMenuAdminController.php ligne 103)

Steps to reproduce

With a Drupal 8 or 9 install :

* Install the 2.0.0-alpha4 release
* Edit a TB Mega Menu in the admin
* Click on "Save"

Proposed resolution

Replace getContentTypeFormat with getContentType in src/Controller/TBMegaMenuAdminController.php.

getContentTypeFormat is only available from Symfony 6.1 so it only works for Drupal 10.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡«πŸ‡·France notFloran Reims

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

Comments & Activities

Production build 0.71.5 2024