Tabs secondary variable always empty

Created on 11 March 2025, about 1 month ago

Problem/Motivation

Within the Menu Example sub module take a look in MenuExampleController.php. and the function tabsPage(). There is a $secondary variable being set (line 154). This involves a ternary function counting the number of slashes. When testing this was always returning the else value ''.

Steps to reproduce

Install and enable Examples module and then enable the Menu Example submodule. Browse to /examples/menu-example/tabs. Click on the bottom "Second" and "Third" tabs (secondary text not showing). Put a breakpoint on MenuExampleController.php line 154, start debugging and in the browser visit /tabs/default/second.

Proposed resolution

Looks like the condition should be > 1 instead of > 2 in the tabsPage() function (MenuExampleController.php line 154).

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

4.0

Component

Menu Example

Created by

🇬🇧United Kingdom schillerm

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024