-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] [4.x] Hidden block types can still be added via the settings "cog" icon on existing blocks #122
Comments
plus 1 for this. |
Having dug into this some more, there is code that should prevent this, but it never fires. At the start of Garnish.requestAnimationFrame($.proxy(function()
{
// Get the Garnish.MenuBtn object
var menuBtn = $settingsBtn.data('menubtn') || false;
// If there wasn’t one then fail and try again
if (!menuBtn)
{
this.initSettingsMenu($settingsBtn, spoonedBlockTypes, $matrixField);
return;
}
... The problem is |
Alright, I figured this out. The settings menu now uses |
…closureMenu to match changes to Craft 4 CP JS [doublesecretagency#122]
PRed 😄 CC @tigerchick in case you're in a hurry for a fix |
Thanks @tomdavies ! |
PR has been merged, and the fix has been released in v4.0.2. Thanks for all of your recent contributions @tomdavies! 🙏 |
Where Spoon has been configured to hide some Matrix blocks for a field layout, these hidden block types can still be added to the field still be via the settings "cog" icon on existing blocks:
The items in that list of matrix block types have a
data-type="<blockHandle>"
attribute on them, so it should be fairly easy to find that list and hide the block types that are not enabled for this field layoutLMK if you would accept a PR for this!
The text was updated successfully, but these errors were encountered: