getgrav / getgrav/grav-plugin-admin

Tab display bug with wrongfully assigned data-tabid

Open
#1,713 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
PHP
Stars
377
Forks
225
Avg merge
11h 51m
Merged PRs (30d)
4

Description

There seems to be a bug when displaying tabs in admin.
I wanted a specific tab to be hidden by using the following code in blueprint

![](https://i.imgur.com/Ooo6ajt.png)

which worked by hiding the field in tab navigation and content. But this now create another problem since the `data-tabid` of the next visible tab is wrongly targeting the hidden tab content like the inspector image below of which when viewed in admin plugin shows an empty tab content.

![](https://i.imgur.com/wRgaKuZ.png)

It can be seen that tab navigation link for the hidden field was not generated but the tab content was and an `id` was applied to it as well. This seems to be an internal bug of how the tab ids are applied to the nav elements.

Contributor guide

Open the contributing guide

Research direction

Reproduce the admin blueprint case with a hidden tab, then inspect how tab navigation and content receive their data-tabid and id values. The fix is done when hidden tabs produce neither visible navigation nor mismatched content, and every visible tab targets its own content.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.