Closed willouch closed 5 months ago
This would break the plugin when using TailwindUI, what is the underlying issue that's causing the problem?
In the latest release it looks like the data-content-id
attribute value was changed from snippet
to snippets
and that broke the snippets section and are no longer visible.
I can confirm this PR fixes the issue by updating the sidebar nav item link to match the most recent change that was made.
@ericp-mrel right, but it was changed from snippet
to snippets
because the exact same issue was occurring when using the Winter.TailwindUI plugin with this plugin except in reverse. Are you able to dig a bit further into what's causing the issue between the stock backend skin and the Tailwind UI skin that's causing it to break in one and work in the other?
It looks like problem is coming from the TailwindUI plugin where it's setting the data-menu-item
attribute using a different value / source compared to the standard skin. It's setting the value of the data-menu-item
from the sideMenu snippets
array key rather than using the attributes
array values.
Here's the default skin:
Here's where the standard skin is generating the attributes for the list item: https://github.com/wintercms/winter/blob/develop/modules/backend/layouts/_sidenav.php#L21
Thanks for digging into this issue that deeply @ericp-mrel, that was very helpful! And it shows that this PR actually fixes it for both the standard and the TailwindUI skin, so that's awesome too :)
We should probably still improve how the attribute is generated (I prefer the approach in the TailwindUI plugin where it's automatically generated instead of manually specified in the menu item definition), but that's an issue for another day.
unhide snippets form area
Retrieve snippets in backend pages