@freelock is this actually in UI Patterns now or is it something you implemented in custom code? I am going to need to do something very similar soon to create a mega menu component of sorts. Thanks!
dalemoore → created an issue.
I'm getting this error too on a server we just upgraded to 8.4. Luckily the site isn't currently live.
+1 on the patch fix correcting the issue for me. Couldn't drag anything into disabled area is what made me notice.
g4mbini → credited dalemoore → .
Just tested, yep fixed! Thank you 🙇♂️
This partially solves the issue for me. I put the code @just_like_good_vibes included above directly into a custom module, installed it, and I no longer get ContextException errors on the front end, but I do still get them in Layout Builder.
Steps:
- Put the code above in a custom module, or in the code for this new module, whatever you have to do to get it the codebase :)
- Create a block type, for example, Alert, and add a field on it of List (text) type called Variant. Add some variant types to the field list, e.g., default|Default, primary|Primary, danger|Danger, etc. and save... can add other fields too like Body to populate the alert slot.
- In the Alert block type, select an Alert component from the SDCs in the layout settings. Map the Variant field to the Variant prop.
- Go to a content type, like Page, and enable Layout Builder and add a block of the Alert block type to it, and select one of the variants and save the layout.
- The Alert block will have the proper variant on the frontend of the site, but in Layout Builder for the page content type, it won't. You'll still get the ContextExceptions in the logs.
Okay, I'm using Display Suite rather than Field Layout, and haven't noticed a problem with it rendering slot-less SDCs as layout for my use. Maybe the issue is only there then, or we're using it differently. Just wanted to provide a different use case.
I disagree with this if I'm understanding what you're saying. It's entirely possible to use a component that renders only with props defined in the SDC and no slots if you're using web components. The rendering logic is instead in the JS/CSS/template of the web component. In this case all of the fields will be in the "disabled" region in Manage Display, and there would be no slot region(s), with the fields being mapped to props in the component only. If this capability is taken away I would need to quit using UI Patterns. I may be misunderstanding what you're saying, though!
I tried the updated code as a patch (alongside the other issue's code which I still have patched in), switching my 'Social Links' component to use 'Rendered entity' instead of 'Components per item', then in the paragraph type mapping the fields to the props. Instead of the ContextException I now get this:
The website encountered an unexpected error. Try again later.
Error: Call to a member function get() on null in Drupal\ui_patterns\Plugin\UiPatterns\Source\FieldPropertySource->getPropValue() (line 33 of modules/contrib/ui_patterns/src/Plugin/UiPatterns/Source/FieldPropertySource.php).
Drupal\ui_patterns\SourcePluginBase->getValue() (Line: 98)
Drupal\ui_patterns\Plugin\UiPatterns\Source\DerivableContextSourceBase->getPropValue() (Line: 199)
Drupal\ui_patterns\SourcePluginBase->getValue() (Line: 91)
Drupal\ui_patterns\Element\ComponentElementBuilder->buildProp() (Line: 71)
Drupal\ui_patterns\Element\ComponentElementBuilder->buildProps() (Line: 52)
Drupal\ui_patterns\Element\ComponentElementBuilder->build()
call_user_func_array() (Line: 113)
Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 870)
Drupal\Core\Render\Renderer->doCallback() (Line: 432)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 484)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 44)
__TwigTemplate_9fd84133cf2adb9e74cfdc062566cfd5->doDisplay() (Line: 387)
Twig\Template->yield() (Line: 343)
Twig\Template->display() (Line: 358)
Twig\Template->render() (Line: 35)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 491)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 484)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 244)
__TwigTemplate_bc21571d82fec26cc5a2a823aa2651a1->{closure}() (Line: 2058)
Twig\Extension\CoreExtension::captureOutput() (Line: 213)
__TwigTemplate_bc21571d82fec26cc5a2a823aa2651a1->macro_content() (Line: 191)
__TwigTemplate_bc21571d82fec26cc5a2a823aa2651a1->{closure}() (Line: 2058)
Twig\Extension\CoreExtension::captureOutput() (Line: 119)
__TwigTemplate_bc21571d82fec26cc5a2a823aa2651a1->macro_field() (Line: 87)
__TwigTemplate_bc21571d82fec26cc5a2a823aa2651a1->doDisplay() (Line: 387)
Twig\Template->yield() (Line: 343)
Twig\Template->display() (Line: 358)
Twig\Template->render() (Line: 35)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 491)
Drupal\Core\Render\Renderer->doRender() (Line: 504)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 484)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 86)
__TwigTemplate_3150cca8781d01d314c0ea2fc77e4d3e->doDisplay() (Line: 387)
Twig\Template->yield() (Line: 165)
__TwigTemplate_f755c51af21e4ba003b7403eadf7f91a___59522040->doDisplay() (Line: 387)
Twig\Template->yield() (Line: 44)
__TwigTemplate_f755c51af21e4ba003b7403eadf7f91a->doDisplay() (Line: 387)
Twig\Template->yield() (Line: 343)
Twig\Template->display() (Line: 358)
Twig\Template->render() (Line: 35)
Twig\TemplateWrapper->render() (Line: 234)
Drupal\Core\Template\TwigEnvironment->renderInline() (Line: 54)
Drupal\Core\Render\Element\InlineTemplate::preRenderInlineTemplate()
call_user_func_array() (Line: 113)
Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 870)
Drupal\Core\Render\Renderer->doCallback() (Line: 432)
Drupal\Core\Render\Renderer->doRender() (Line: 504)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 484)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 44)
__TwigTemplate_9fd84133cf2adb9e74cfdc062566cfd5->doDisplay() (Line: 387)
Twig\Template->yield() (Line: 343)
Twig\Template->display() (Line: 358)
Twig\Template->render() (Line: 35)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 491)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 484)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 152)
__TwigTemplate_bc05fafc2639a509ad8ac530045c2abd->block_content() (Line: 431)
Twig\Template->yieldBlock() (Line: 89)
__TwigTemplate_bc05fafc2639a509ad8ac530045c2abd->block_wrapper() (Line: 431)
Twig\Template->yieldBlock() (Line: 53)
__TwigTemplate_bc05fafc2639a509ad8ac530045c2abd->doDisplay() (Line: 387)
Twig\Template->yield() (Line: 343)
Twig\Template->display() (Line: 358)
Twig\Template->render() (Line: 35)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 491)
Drupal\Core\Render\Renderer->doRender() (Line: 504)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 484)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 178)
__TwigTemplate_00e51af2befcc5fa6f56f8cd1ffdd83c->doDisplay() (Line: 387)
Twig\Template->yield() (Line: 343)
Twig\Template->display() (Line: 358)
Twig\Template->render() (Line: 35)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 491)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 484)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 128)
__TwigTemplate_31cd56f2962c65fbb44761101472ce3c->doDisplay() (Line: 387)
Twig\Template->yield() (Line: 343)
Twig\Template->display() (Line: 358)
Twig\Template->render() (Line: 35)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 491)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 158)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 153)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 186)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 176)
Drupal\Core\EventSubscriber\DefaultExceptionHtmlSubscriber->makeSubrequest() (Line: 119)
Drupal\Core\EventSubscriber\CustomPageExceptionHtmlSubscriber->makeSubrequestToCustomPath() (Line: 81)
Drupal\Core\EventSubscriber\CustomPageExceptionHtmlSubscriber->on404() (Line: 109)
Drupal\Core\EventSubscriber\HttpExceptionSubscriberBase->onException()
call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 239)
Symfony\Component\HttpKernel\HttpKernel->handleThrowable() (Line: 91)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)
a custom plugin type ("DS Field"), for this one, ui_patterns_ds is needed
To my knowledge I'm not using a DS Field, but I could be wrong. Would I have to select one of these options in the layout dropdown under Manage Display to do something like that?
Or, this option would need to be enabled maybe:
Or something on this screen?
I'm not sure what exactly a DS Field is, I haven't used the things found in the last two screenshots before. In the past I would only use what's in the first screenshot, which allows me to override the template, add attributes/classes to fields, etc.
The only thing I'm using DS in this case is to select an SDC on the Manage Display screen layout dropdown without having to rely on Layout Builder (because I don't wish to manipulate layout visually, just do mapping to the SDC) or Field Layout (this module is to be deprecated and will be removed from Core, see this issue 📌 Inform users that Field Layout is deprecated Active , this issue 📌 [META] Enable layout builder for form displays, and deprecate field_layout Postponed , and this issue 📌 Move Field Layout data model and API directly into \Drupal\Core\Entity\EntityDisplayBase Needs work ). I haven't tried using Field Layout before, but I just did on a separate bare Drupal install. It doesn't seem to offer the ability to control field layout under "Manage display" any more, only under "Manage form display", so using Field Layout instead of Display Suite won't work.
I would like to co-sign this request. I first started out trying to integrate components in our new flagship site a few months ago, and started using Single Directory Components for the job. I love this new addition to Drupal, but incorporating them into the site is painful. Having to create a new Twig template every single time you want to call values from a field, block, or whatever as an SDC is cumbersome to say the least. I was finding myself repeating the same Twig code over and over across content types, fields, etc., which Twig's extend capability is helpful with, but it means what's setup in the Drupal UI under Manage Display or in Layout Builder is no longer 1:1 with what's in the Twig template. It feels very "un-Drupal"-like working this way. We really need something like UI Patterns in Core to get the most out of their use. Experience Builder is many more months away and while it seems to be able to eventually control the entire layout of a site, not just the content area like Layout Builder, it remains to be seen if everyone would adopt it. And I imagine it will take many years for it to fully replace everything if that's the goal. Putting something like UI Patterns in Core will work for now. Just my 2¢.
Here are my steps to reproduce. Some in the first steps sub-bullets may not be needed but including?
- You will need some SDCs to use. I have a parent SDC called Social Links and a child one called Social Link. (@pdureau should already have these, they were included in the Slack conversation)
- Make sure you have Display Suite and Display Suite Extras installed. This is used to select a component layout within Manage Display. Under Display Suite (admin/structure/ds/settings), I have these settings:
- Enable field templates
- Enable field templates in Layout Builder
- Default Field Template: Expert
- Under Extra fields, nothing selected
- Under Other, "Use field names in templates" and "Exclude Display Suite Layouts in Layout Builder" are checked"
- Nothing checked in BC settings
- Create a paragraph type (in my case, it's called Social Link - this is the child component) and add whatever fields you want to it, including at least one Entity Reference field (I have a taxonomy term one called Network that references social network names, e.g., Facebook, Instagram, etc.).
- Create a block type (in my case, it's called Social Links - this is the parent component) and add whatever fields you want, including one Entity Reference Revisions/Paragraphs field that uses the previously-created paragraph type.
- Go ahead and add an instance of the block somewhere on your page in a region (I'm not using Layout Builder here, just the block UI).
- Under Manage Display for the block type, make sure it's set to "Referenced entity" under Format for the Entity Reference Revisions field. That's all you need here.
- Under Manage Display for the paragraph type, with Display Suite installed, under "Current layout" select the SDC you want to use from the dropdown list (for me, it is the child component Social Link) and save.
- Go to "Layout settings" still in the paragraph type, and map the props to the appropriate fields. The only options to start are "Data from a field" or "Referenced entities", there is no initial "Prop: entity" available like there is when using "Components per item" in the sibling issue. 📌 Introduce a new source to get access to the current "i-th" referenced entity from a field entity reference in the context of component per item field formatter Active I choose "Data from a field" for each.
- Once all fields are mapped, save, then go back and refresh the page to view your block.
- I get a ContextException error message.
Sending a video of the steps in Slack.
@pdureau Indeed, following—hopefully we will see it included in some way!
I've tested the updated MR as a patch and don't see a noticeable difference, so if I'm not supposed to, I think it's good.
Hi @pdureau I'm out on personal leave today but will test first thing tomorrow! Thanks again for your and @just_like_good_vibes work on UI Patterns! It's truly something, should be in Core/Drupal CMS IMO
I believe this issue may be caused by the Admin Toolbar module if you have it installed. I did, alongside the new Navigation module that I was trying out. Once I uninstalled Admin Toolbar, the issue went away. See this issue: https://www.drupal.org/project/admin_toolbar/issues/3493798 🐛 Compatibility issue: Route update.theme_install does not exist in Drupal 11.0.x Active
Thanks for the quick fix! Working well.
Sure, I tested it and this patch fixes it!
The variables still go the same way (from Drupal template to component template), they just need to be explicitly passed instead of "magically". Is it an issue?
I can't say yet, I haven't got to the styling of my own web components in Drupal that I forsee possibly being an issue, but it has been a need outside of Drupal for my co-worker who built a custom app with web components.
The problem you and @just_like_good_vibes have been assisting with has been a blocker there :) I couldn't get the child components to output properly first, so didn't want to start styling yet until I evaluate UI Patterns!
If I run into issues, I will be sure to share in an issue. 👍
dalemoore → created an issue.
Thanks for your work on this fix (initially started on Drupal Slack here)
I just tested https://git.drupalcode.org/project/ui_patterns/-/merge_requests/320.diff as a patch, and my fields are properly output into my component now! WOOHOO!
For anyone in the future who may see this issue/doesn't have access to Drupal Slack, the issue was I was unable to output props/slots into a block type-based component that had a Paragraphs/Entity Reference Revisions field on it. I was attempting to create a Social Links component as a block type and each Socal Link was a child Paragraph (with social network, link, relationship, etc. as fields/props). I could use the "Referenced entities" option, but it would only output the first field item's values as the values (props) for all of the field items. This fix, so far, seems to correct that to where each field item has its own distinct values/props. I'll be making several more components setup similarly and test to make sure it continues to work for those!
What about if a developer actually wants to have access to a variable that's available in the parent component? As someone currently working with at least one other person who is also using native web components, we have had need of this ability a few times already. Thanks to the Shadow DOM, it's sometimes not possible to theme or get to content that's been slotted easily, instead, you have to access it from the parent element. Just something to think about here. I doubt most people will be using web components/shadow DOM, but there is a use case here for not absolutely preventing it (or erroring if you don't use this recommendation).
@pdureau Yes I think that would be helpful to indicate for newcomers or non-backend folks how they meant to use for Using your component through a render array → , if that isn't meant to be done in a theme. AFAIK everything that was supposed to go with an SDC is supposed to go in the theme in the same folder as the component, or at least done in the theme. But I don't think it's best practice to do any of that in a theme?
While continuing my quest to slowly implement SDCs, I think it would also be beneficial in the docs to include actual real-world examples of using SDCs as @pdureau has done above. On Using your new single-directory component → , all but one ( the embed example → ) use hard-coded values in the props and slots. I think most of us are going to be wanting examples of how to get data from fields into those, and folks that are more frontend (🙋🏻♂️) are going to be struggling to figure out how to do that. Nowhere on the page does it mention how to do that (the only ways I know of are to install Devel/Kint, and just recently learned of Xdebug and have been trying to get it working in VScode).
So far, the only ways I know of to get data out of Drupal and into these SDCs are:
- code the variable in an .html.twig file (e.g.,
content['#block_content'].field_name.0.value
in a block.html.twig to get a prop value w/o the render bits) - some kind of render array magic, I guess through preprocess functions in your .theme? How else would you use this method → ?
- utilize a contrib module that handles displaying the SDCS, such as SDC Display → , UI Patterns → , and the upcoming Experience Builder →
Are there other ways I'm not aware of? If so, they should be documented. If someone can help me answer these questions, I will try my first time at editing docs on here over the Christmas break. :)
I just saw this issue and wanted to mention: please don't rely that people will only be using Twig to render variant types. There are some of us who will be using Web components (done in e.g., Lit, FAST) for our SDCs and so will be making use of a variant
prop to select the variant, and that is expecting a string value of the variant name (e.g., primary, secondary, etc.). The JS and constructed styles of the Web component will be the thing that determines how the variant will look, what slots each variant has, etc., the my-component.twig will only be to print stuff out into appropriate props/slots of the Web component. Similar to how I see in XB they're using the Shoelace components.
Introducing something like this:
{% embed 'my_theme:cool-component' with {
'#variant': 'my-variant-name',
prop1: 'foo',
prop2: 'bar',
} %}
With the #variant
prop seems to be introducing a Drupalism into a Web component that may be used elsewhere outside Drupal (that is, no other props will start with #).
As long as I can do this instead:
{% embed 'my_theme:cool-component' with {
variant: 'my-variant-name',
prop1: 'foo',
prop2: 'bar',
} %}
By pulling the string value from #variant or any other method proposed I will be good though!
Thanks @pdureau! Very helpful info. Hopefully we can get some more eyes on this issue to get some more feedback from others who have been/are interested in starting to use SDCs.
Excellent, thank you @pdureau! I know you have extensive experience working on components, SDC, and design systems. Thanks for sharing your insights on here, hopefully we can get these into the docs so others like me won't be confused and we can move towards some best practices.
I'll remove the attributes prop from my components. Also, do you have examples of how you're using SDCs? I downloaded UI Patterns, but there are no SDCs in there as examples. Or if you can direct me toward how you mean with using include rather than embed? I don't get how I can do slots with include and again, the docs only say use embed with slots.
I'm very much in favor of these updates! Your help on Drupal Slack a while back related to using node/user/paragraph
rather than content
for props was super helpful but that isn't anywhere in the docs IIRC.
Would you also say that doing this:
attributes:
type: Drupal\Core\Template\Attribute
title: 'Attributes'
description: 'HTML attributes to apply to the component.'
in the component.yml is incorrect? Because I see that being done in Umami components, and in Experience Builder components. In my own components, I am noticing some bleeding in from the parent template when then doing adding the attributes prop and doing something like:
<msu-header{{ attributes }}>....</msu-header>
Where if I include that component in my region--header.html.twig, it inherits the attributes from the parent div. If I try to use the 'only' keyword, like this:
{% embed 'msuext:msu-header' only %}
... content here ...
{% endembed %}
then I cannot include slots/blocks that aren't explicitly included in the Twig template.
dalemoore → created an issue.
Yeah, this isn't really 'fixed' per se, probably 'works as designed'. I'm running into this issue as well. I think the only alternative is to just not use this module and use |render|striptags|trim. :\ Unless the solution from SDC Display that was mentioned here can fix?: https://www.drupal.org/project/nomarkup/issues/3405446 ✨ Option to remove twig debug mark up Active
dalemoore → created an issue.
I can confirm the patch in this issue fixes the issue for me thus far.
Agreed, I can't figure out how to edit the title_attributes and content_attributes. I would think they'd be added to the YAML same as the attributes one, on the same level, but they don't appear in the block edit form.
Also, I noticed if you add "ID" to the attributes, save, and then edit the block's ID, then go back and remove the ID and save, it no longer has an ID at all. I'd think it would fall back to the ID it had before, but that may be a limitation of this YAML-based method.
I'm in favor of consistently including the leading slash, I just noticed that in this new site I am working on I've included it in some patterns and excluded it in others. As long as it silently adds it on save but continues to work for existing patterns without (or maybe updates existing ones on sav of the Patterns page, or in a module update hook) it sounds like a nice feature to improve consistency.
Like @mandclu, I've tested the MR!156 in Group 3 and it works! Though I only tested it on content that belongs to one group. Next up: to see if I can create a path based on a Group Content Menu...
I'm curious about the future of Admin Toolbar/Toolbar as well with work on Navigation in Core. There is also a submodule called "Navigation Top Bar" that isn't yet feature-complete that will offer the navigation at the top, not on the left. What Navigation can do is more advanced than what Toolbar can, allowing to add blocks into the nav area.
Ran into the same issue. composer require again variationcache and then run all updates (backing up first!), then uninstalling variationcache seems to work fine so far. But this is a new site and I haven't yet done anything with Group, so who knows if all is well.
Hi @smustgrave, that issue doesn't fully solve the issue that this issue brings up. While it will return something that isn't 200x113 if you set a maxwidth and maxheight, it only does so for the <video>
. The enclosing iframe
will create black bars around the video depending on the width of the viewport or width of the container the iframe is in. It's definitely better than before though!
Now that #2966656 ✨ Negotiate max width/height of oEmbed assets more intelligently Needs work is in, I think maybe the issue is the styling of the iframe's aspect ratio.
From what I can tell the only CSS that gets added by default to the iframe is:
.media-oembed-content {
max-width: 100%;
border: none;
background-color: transparent;
}
That max-width: 100% keeps the iframe from breaking out of its container, making it responsive, but does nothing for maintaining the aspect ratio. If you have a 16/9 video and shrink your browser down to a mobile width size, the video becomes a square. It will still play the video itself at 16/9, but there will be two huge black bars on top and bottom. Ideally, those won't be there.
Using CSS like in #3 won't work as that will affect ALL oEmbeds, such as podcast players, 3D models, etc. Anything that can be embedded via oEmbed by the oEmbed Providers module for example. I tried it and had a too tall Podbean player.
I tested a YouTube embed in WordPress, both a 16/9 one and a different video (https://www.youtube.com/watch?v=UDIQwGb-4YQ) that isn't 16/9, but it looks like WP always embeds at 16/9 and you're just stuck with black bars. So maybe that's the answer here, you'd just need to deal with it in your theme. But if we could manually choose what we want the video's aspect ratio to be, on a per-video basis, that would be great. I'm not sure how to do that though.
For the record, changing the above code to this:
.media-oembed-content {
max-width: 100%;
border: none;
background-color: transparent;
aspect-ratio: 16/9;
height: auto;
}
will get rid of the black bars, but then you're hard-coding the aspect-ratio for all oEmbeds. which isn't good. The only thing I can think of is a field on the media item that lets you select an aspect ratio, and then it will add CSS classes (or inline styles) to the media item somehow. 🤷🏻♂️
So is this issue considered closed and what's linked by @imclean is the solution (setting a maxwidth and maxheight manually in the field display)?
FYI, the solution in #62 should not be the solution, as this affects all oEmbed iframes. I tested it out and my Podbean oembed was sized to 16/9 so there was now a huge whitespace gap up under the podcast player. May work fine for YouTube videos that happen to be 16/9, but not all videos will always be 16/9.
For anyone who may wonder about this and why there is no "expert", @entropea is using the Display Suite contrib module here. Just FYI.
It seems like many websites use the idea of "pin" as mentioned previously, I'm +1 on renaming it "Pin to top of lists" or similar.
Just encountered the same error message when adding a new view mode to the Document media type; paired the allowed list in the field to "txt, rtf, doc, docx, ppt, pptx, xls, xlsx, pdf" and it bypasses for now.
I have written a tutorial that explains the steps to add Smart Date to an existing site's event system, which may be more what you need.
I just ran into this same issue, and the link goes to Schema.org Blueprints. A Google search isn't returning anything helpful. Can you link the tutorial here?
I wonder where this fits now that we have SDC, and Experience Builder is in early development?
Just tested—working for me! This just made my day for reals.
Screenshots below.
Very much in favor of this! It makes not only seeing the site hierarchy much easier and quicker, but you can also drag and drop the components in the view in a much more user-friendly manner. It doesn't work that way in Figma though unless you have auto-layout turned on.
Here's WordPress' implementation:
dalemoore → created an issue.
I don't see why we can't just stick with "Drupal" for the new product name, but refer to it as "Drupal CMS" under the hood/as developers, and "Drupal Core" for the framework/version with no extra modules/themes/recipes/whatever added. Basically what we already do?
WordPress refers to itself as "WordPress Core" for the version with no other themes and plugins installed. See here for WordPress Core. ("Never edit WordPress Core!") But generally, just "WordPress"...
If you mouseover "core" in the link, it says:
Core is the set of software required to run WordPress. The Core Development Team builds WordPress.
That sounds like the equivalent of Drupal Core.
If it works for WordPress, the most-used CMS in the world, don't see why not also for Drupal?
Either just "Drupal", or "Drupal CMS", are the only two options that make sense. The only other thing I can think of is "Drupal XP" for Experience Platform, so that we can abbreviate it "DXP", same as digital experience platform.
I am running into the same issue. I set up two DDEV instances, one as a "test" instance, and the other as my hopefully final site after testing Group. The first time I enabled the module via Drush and had no issues. This time I decided to install it via the UI and was immediately met with the 'The "group_relationship_type" entity type does not exist' error.
I'm running into this issue after just installing Group. Tried to go and create my first group following the docs and immediately get the error. And now I get it any time I go to /admin/group.
The website encountered an unexpected error. Try again later.
Error: Call to a member function getPluginId() on null in Drupal\group\Entity\Storage\GroupRelationshipStorage->getEntityClass() (line 93 of modules/contrib/group/src/Entity/Storage/GroupRelationshipStorage.php).
Drupal\Core\Entity\EntityFieldManager->buildBundleFieldDefinitions('group_relationship', 'microsite-group_membership', Array) (Line: 353)
Drupal\Core\Entity\EntityFieldManager->getFieldDefinitions('group_relationship', 'microsite-group_membership') (Line: 1219)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->loadFromDedicatedTables(Array, ) (Line: 503)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->mapFromStorageRecords(Array) (Line: 428)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->getFromStorage(Array) (Line: 394)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->doLoadMultiple(Array) (Line: 312)
Drupal\Core\Entity\EntityStorageBase->loadMultiple(Array) (Line: 84)
Drupal\group\Entity\GroupMembership::loadByUser(Object, NULL) (Line: 68)
Drupal\group\GroupMembershipLoader->loadByUser(Object) (Line: 58)
Drupal\group\Access\IndividualGroupPermissionCalculator->calculatePermissions(Object, 'individual') (Line: 138)
Drupal\flexible_permissions\ChainPermissionCalculator->calculatePermissions(Object, 'individual') (Line: 41)
Drupal\group\Access\GroupPermissionCalculator->calculateFullPermissions(Object) (Line: 40)
Drupal\group\QueryAccess\GroupQueryAlter->doAlter('view') (Line: 150)
Drupal\group\QueryAccess\QueryAlterBase->alter(Object, Object) (Line: 336)
group_query_entity_query_alter(Object, NULL, NULL) (Line: 545)
Drupal\Core\Extension\ModuleHandler->alter('query', Object) (Line: 495)
Drupal\Core\Database\Query\Select->preExecute() (Line: 503)
Drupal\Core\Database\Query\Select->preExecute() (Line: 520)
Drupal\Core\Database\Query\Select->execute() (Line: 266)
Drupal\Core\Entity\Query\Sql\Query->result() (Line: 84)
Drupal\Core\Entity\Query\Sql\Query->execute() (Line: 316)
Drupal\Core\Entity\Query\QueryBase->initializePager() (Line: 245)
Drupal\Core\Entity\Query\Sql\Query->finish() (Line: 83)
Drupal\Core\Entity\Query\Sql\Query->execute() (Line: 161)
Drupal\group\Entity\Controller\GroupListBuilder->getEntityIds() (Line: 88)
Drupal\Core\Entity\EntityListBuilder->load() (Line: 241)
Drupal\Core\Entity\EntityListBuilder->render() (Line: 141)
Drupal\group\Entity\Controller\GroupListBuilder->render() (Line: 23)
Drupal\Core\Entity\Controller\EntityListController->listing('group')
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 53)
Asm89\Stack\Cors->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 38)
Drupal\tracer\StackMiddleware\TracesMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Are these the same templates that will be offered in the CKEditor 5 Plugin Pack from CKSource → ? It's a premium feature in standalone CKEditor 5 but will be free via the Drupal module.
I was exploring this module and discovered it didn't support U.S. counties as well. This would be a great feature for using the module for local, regional, and state entities as well as some university units like where I work. A lot of our work is county-based at land-grant university Extension services. It would also be useful for sites related to voting, as people are restricted to only voting within their specific state, county, and city. County is missing in that scenario here.
Just tested, and working great with no error! Thanks for the fix.
dalemoore → created an issue.
I wonder if it would be possible to take a page from Layout Builder Component Attributes → and have a different setting in the contextual menu just for the block style settings? If you have that module enabled, for a block you get four options:
- Configure
- Manage attributes (this is the menu item the module adds)
- Move
- Remove block
Then you could continue to edit the block content through "Configure", which will open in a modal window, but control the Bootstrap Styles under a separate link within the contextual menu so that they're in the right-hand tray not the popup.
Thanks! Yes, that fixes it!
I guess I didn't think of that because I want the user to be able to select from options that are labeled meaningfully, so I wanted "Full content" or "Layout Builder" (really the full view mode, which is the only one Layout Builder overrides work with currently ✨ Consider supporting Layout Builder Overrides for other view modes Needs work ) to be an option they can select. Hence the making it required and wanting the "Full content" option to be selectable under "View modes allowed to switch to", so there would be no option "- No change -" which I felt was confusing. Could I perhaps configure what that "no change" option says on a per-field basis, even if in code? Maybe it could be added in the form display widget?
Thanks!
Here is a detailed description. This is on the standard profile 'page' content type.
Manage fields
- I've added a view mode switch field labeled "View mode" with machine name "field_view_mode".
- Under field storage, "view modes to switch", the only view mode selected is "Default". Full content is not checked because if I check it it removes it from "View modes allowed to switch to".
- The field is set to "required"
- Under "View modes allowed to switch to", I have selected:
- Full content
- Standard
- Teaser
- Under default value, I have it set to "Full content".
That's it for the field setup.
Manage form display
The field is just setup with the defaults here.
Manage display
- In custom display settings, I have enabled "Full content", "Standard", and "Teaser" view modes (Standard is a view mode I manually created).
- I have "Use Layout Builder" and "Allow each content item to have its layout customized" enabled on the Default view mode.
- On the Standard view mode, I don't have anything Layout Builder enabled, just the normal field/label/format view.
So I just did a little testing with Twig debugging enabled.
If I only use this module, and I inspect the source code, the Twig suggestions for the node.html.twig never change on the Layout Builder-enabled content type. No matter what I select in this module's field dropdown, I always get this:
<!-- FILE NAME SUGGESTIONS:
* node--281905--full.html.twig
* node--281905.html.twig
* node--page--full.html.twig
* node--page.html.twig
* node--full.html.twig
x node.html.twig
-->
If I instead enable Display Suite's view mode switcher and change it to a different view mode, the Twig suggestions are updated to the new view mode's name.
<!-- FILE NAME SUGGESTIONS:
* node--281905--standard.html.twig
* node--281905.html.twig
* node--page--standard.html.twig
* node--page.html.twig
* node--standard.html.twig
x node.html.twig
-->
dalemoore → created an issue.
I was banging my head against the wall trying to figure out why these weren't working on a new site I'm working on, having the same issue I was having last year in No other token format available or accepted besides the default one 🐛 No other token format available or accepted besides the default one Fixed , this fixes it for me for now. Trying to use the tokens in the URL for the same as before.
I co-sign this suggestion. Right now they're just floating there in the layout-builder--section div and it's not possible to contain them both to, for example, maybe give them an appearance of being within a tab or something.
I would be interested in where this is headed too. I'm about to embark on redesigning our "flagship" website and picking something, whether it's Layout Builder, Layout Paragraphs, or some new thing that we can be sure will be around for a while would be helpful. WordPress has mostly moved to the Block Editor/Gutenberg, if we could standardize on something (while still allowing others to go their own way) it would help a lot of us on small (or, er, mostly one person >_>) teams.
I would be interested in this, too! It was very helpful in D7 to be able to test the data without having to run the import and get errors.
Any update on this? Would like to upgrade a site from 9 to 10.
Any chance of getting this looked at? Both Drupal 8 and 9 are now EOL.
Thanks @larowlan. That gives me some sense of relief. I was afraid we were really just getting started with LB in my org only to have to change to something else.
I can say whatever gets us closer to what’s possible in Gutenberg/Block Editor in WordPress I’m 💯 in favor for!
Is the Decoupled Layout Builder intended to replace the current Layout Builder, or is it its own separate thing and there would be no upgrade path for it or anything like that (basically those of us creating sites with LB must start over)? Where does recently created things like SDC fit into it? Since SDC relies on Twig templates. Is this new DLB abandoning Twig in favor of React? I have questions 😅
Is this why I'm getting these errors when running ddev yarn storybook
? (total n00b at Storybook, DDEV, Docker, etc.)
🚨 Unable to index files:
WARN - ./web/modules/contrib/sdc_examples/components/my-banner--tall/my-banner--tall.stories.json,./web/modules/contrib/sdc_examples/components/my-banner--tall/my-banner--tall.stories.yml: Duplicate stories with id: cl-components-examples-banner--1-default
WARN - ./web/modules/contrib/sdc_examples/components/my-banner--tall/my-banner--tall.stories.json,./web/modules/contrib/sdc_examples/components/my-banner--tall/my-banner--tall.stories.yml: Duplicate stories with id: cl-components-examples-banner--2-no-image
WARN - ./web/modules/contrib/sdc_examples/components/my-banner--tall/my-banner--tall.stories.json,./web/modules/contrib/sdc_examples/components/my-banner--tall/my-banner--tall.stories.yml: Duplicate stories with id: cl-components-examples-banner--3-with-body
WARN - ./web/modules/contrib/sdc_examples/components/my-banner--tall/my-banner--tall.stories.json,./web/modules/contrib/sdc_examples/components/my-banner--tall/my-banner--tall.stories.yml: Duplicate stories with id: cl-components-examples-banner--4-with-card
WARN - ./web/modules/contrib/sdc_examples/components/my-banner--tall/my-banner--tall.stories.json,./web/modules/contrib/sdc_examples/components/my-banner/my-banner.stories.json: Duplicate stories with id: cl-components-examples-banner--1-default
WARN - ./web/modules/contrib/sdc_examples/components/my-banner--tall/my-banner--tall.stories.json,./web/modules/contrib/sdc_examples/components/my-banner/my-banner.stories.json: Duplicate stories with id: cl-components-examples-banner--2-no-image
WARN - ./web/modules/contrib/sdc_examples/components/my-banner--tall/my-banner--tall.stories.json,./web/modules/contrib/sdc_examples/components/my-banner/my-banner.stories.json: Duplicate stories with id: cl-components-examples-banner--3-with-body
WARN - ./web/modules/contrib/sdc_examples/components/my-banner--tall/my-banner--tall.stories.json,./web/modules/contrib/sdc_examples/components/my-banner/my-banner.stories.yml: Duplicate stories with id: cl-components-examples-banner--1-default
WARN - ./web/modules/contrib/sdc_examples/components/my-banner--tall/my-banner--tall.stories.json,./web/modules/contrib/sdc_examples/components/my-banner/my-banner.stories.yml: Duplicate stories with id: cl-components-examples-banner--2-no-image
WARN - ./web/modules/contrib/sdc_examples/components/my-banner--tall/my-banner--tall.stories.json,./web/modules/contrib/sdc_examples/components/my-banner/my-banner.stories.yml: Duplicate stories with id: cl-components-examples-banner--3-with-body
WARN - ./web/modules/contrib/sdc_examples/components/my-button--primary/my-button--primary.stories.json,./web/modules/contrib/sdc_examples/components/my-button--primary/my-button--primary.stories.yml: Duplicate stories with id: cl-components-examples-button--1-default
WARN - ./web/modules/contrib/sdc_examples/components/my-button--primary/my-button--primary.stories.json,./web/modules/contrib/sdc_examples/components/my-button--primary/my-button--primary.stories.yml: Duplicate stories with id: cl-components-examples-button--2-like
WARN - ./web/modules/contrib/sdc_examples/components/my-button--primary/my-button--primary.stories.json,./web/modules/contrib/sdc_examples/components/my-button/my-button.stories.json: Duplicate stories with id: cl-components-examples-button--1-default
WARN - ./web/modules/contrib/sdc_examples/components/my-button--primary/my-button--primary.stories.json,./web/modules/contrib/sdc_examples/components/my-button/my-button.stories.json: Duplicate stories with id: cl-components-examples-button--2-like
WARN - ./web/modules/contrib/sdc_examples/components/my-button--primary/my-button--primary.stories.json,./web/modules/contrib/sdc_examples/components/my-button/my-button.stories.yml: Duplicate stories with id: cl-components-examples-button--1-default
WARN - ./web/modules/contrib/sdc_examples/components/my-button--primary/my-button--primary.stories.json,./web/modules/contrib/sdc_examples/components/my-button/my-button.stories.yml: Duplicate stories with id: cl-components-examples-button--2-like
WARN - ./web/modules/contrib/sdc_examples/components/my-card--light/my-card--light.stories.json,./web/modules/contrib/sdc_examples/components/my-card--light/my-card--light.stories.yml: Duplicate stories with id: cl-components-examples-card-light--1-default
WARN - ./web/modules/contrib/sdc_examples/components/my-card/my-card.stories.json,./web/modules/contrib/sdc_examples/components/my-card/my-card.stories.yml: Duplicate stories with id: cl-components-examples-card--1-default
WARN - ./web/modules/contrib/sdc_examples/components/my-cta/my-cta.stories.json,./web/modules/contrib/sdc_examples/components/my-cta/my-cta.stories.yml: Duplicate stories with id: cl-components-examples-call-to-action--1-default
WARN - ./web/modules/contrib/sdc_examples/components/my-button--primary/my-button--primary.stories.json,./web/modules/contrib/sdc_examples/sdc_examples_replacements/components/my-button--primary/my-button--primary.stories.json: Duplicate stories with id: cl-components-examples-button--1-default
WARN - ./web/modules/contrib/sdc_examples/components/my-button--primary/my-button--primary.stories.json,./web/modules/contrib/sdc_examples/sdc_examples_replacements/components/my-button--primary/my-button--primary.stories.json: Duplicate stories with id: cl-components-examples-button--2-like
WARN - ./web/modules/contrib/sdc_examples/components/my-button--primary/my-button--primary.stories.json,./web/modules/contrib/sdc_examples/sdc_examples_replacements/components/my-button--primary/my-button--primary.stories.yml: Duplicate stories with id: cl-components-examples-button--1-default
WARN - ./web/modules/contrib/sdc_examples/components/my-button--primary/my-button--primary.stories.json,./web/modules/contrib/sdc_examples/sdc_examples_replacements/components/my-button--primary/my-button--primary.stories.yml: Duplicate stories with id: cl-components-examples-button--2-like
What does “Full” even mean? I know when you go to the screen you can tick the “Full content” box and give it its own view mode settings, but I’ve hardly ever done that. Not sure what “full content” means here. Is it all available fields? Doesn’t seem so. I’d love some context behind why it exists.
To me it makes sense to do the opposite, get rid of Full and keep Default. I have rarely ever enables the Full content view mode personally, instead using the Default and creating new view modes as needed for teaser, cards, whatever. Makes more sense to me to have a Default view mode, which is a fallback when no other mode applies and is the “standard view” for that content type.
Actually, sorry, I spoke too soon. While this fixes the ability to "place block" with Block Paragraphs installed/enabled, you can't actually place any paragraph blocks with Layout Builder Browser except "globally"... so while you can pick from some existing Paragraph Blocks at /admin/config/content/layout-builder-browser (see screenshot), it can't be done on a node-by-node basis where it will show whatever paragraphs have been created for that node in the browser. It doesn't use the admin title at all, either. This probably requires some extra code to integrate PB with LBB. Not sure if that's something the maintainers are interested in.
Gotta love those one-line fixes! 100% working now for me. Thanks @viren18febS!
dalemoore → created an issue.
I think maybe what this person is asking, or at least what I am, is being able to create inline custom blocks like you can within Layout Builder but within the Gutenberg block editor. It seems like you can only add reusable custom blocks right now (those that exist within the Custom Block Library), not one-off custom blocks. I could be wrong though!
Would someone mind putting together the steps needed to get all these patches working on D10.1+ so that the Bootstrap Styles/Bootstrap Layout Builder works in D10 if it's working for you? I haven't been able to get any of it to work.
Co-signed on this. We can't use this module without being able to provide alt text for the preview image for accessibility due to federal requirements. Looking into whether it can be added through custom code or whether to use a different module right now, but other than that, this module is great.
Yep, you're right as I just discovered. 😂 This happens to me so often... I'll try and try to figure something out, finally give up, find a post somewhere with a similar problem, post... then minutes later, figure out something. I wasn't going to use Views, but Views works, so Views it is.
I'd be interested in this as well. My use cases are for scholarships and awards. I want to be able to use a Paragraph of "Award" with a field of year (date) and a field for the award (a content type, Award). Then use CER to create a two-way relationship, so that on my Person content type I can add an Award paragraph with the year and award(s) that individual won, but also on the dedicated award's page list all recipients of the award and the year won. There may be a way to do this w/o CER + Paragraphs but using Paragraphs makes it much more easier to add it to the Person content only when needed.
I ran into the same problem trying to add multiple projects to test. Your method of adding that empty patch seems to work, but it isn't documented on the page or anything.
I'm currently doing a review of this module to determine if I want to use it for my own new website (I'm about to start on my Ph.D. dissertation and am building a place to document the process!), or try to roll my own custom built solution, and so far the only hangup I have is that dates don't use proper Drupal date fields. Other than that, it's an amazing body of work. Are there still issues with dates like this? I wish we could capture the day along with the month and year for publication date, for instance, if that info is available. I haven't tested how this module interacts with Views, but I am hoping that we can setup filters to filter them by date as well wherever needed, and choose per bundle what date format we want. I remember in the past having difficulty with that in Views when dates are text fields...
Hi @prauat, I'm on D10.0.9 and Bootstrap Styles 1.1.0 and Bootstrap Layout Builder 2.1.1. The issue is highly likely to be PEBKAC, but I can't figure out what the issue is. Having the "Fix not loading bootstrap_styles/aos.local or bootstrap_styles/aos.remote library" along with "[Drupal 10] Change of JS jquery/once to drupal core/once, migrate JS API." and "Fix Module does not work in D10" issues, at the least.
In my composer.json:
"patches": {
"drupal/bootstrap_styles": {
"3315218: Fix not loading bootstrap_styles/aos.local or bootstrap_styles/aos.remote library.": "https://www.drupal.org/files/issues/2023-01-25/3315218-17--1-0-x.patch",
"3330458: [Drupal 10] Change of JS jquery/once to drupal core/once, migrate JS API.": "https://www.drupal.org/files/issues/2023-03-07/bootstrap_styles-3330458-8.patch"
},
"drupal/bootstrap_layout_builder": {
"3335356: Fix Module does not work in D10": "https://www.drupal.org/files/issues/2023-01-25/issue_3335356_drupal10.patch"
}
},
I can't get any of these patches for Bootstrap Styles and Bootstrap Layout Builder to apply in Drupal 10 and the module is just broken. Have they been tested with D10 10.0.9?
Maybe it works, I don't know, I can't install it because I can't composer require it in Drupal 10 to begin with. Wondering if this is maintained any more? There hasn't been a release since 2020.
Thanks. The updates were already performed so I don't know that I can test, but I applied the one-line fix and tried running updatedb and no errors.
dalemoore → created an issue.
I'm looking for this feature as well. I'd like to restrict the summary to a specific text format, e.g., allowing B, I, and a link maybe or something like that. No images or other things. Some content types might be fine plain text only while others would need a little more formatting. I could have sworn I had a way of doing this in Drupal 7 but can't remember how I did it/what contrib module or if I hallucinated it being possible. 😅
+1 on #17 fixing for me in D9.
+1 for this. Going to use https://www.drupal.org/project/textarea_widget_for_text → (well about to test to make sure it does what I want!) for now but being able to create headings for custom blocks and limit the buttons that can be used in CKEditor to
I was trying to find a solution for this, too. Too bad Microsoft doesn't seem to provide an easy way to go about it. It would be great if they could just paste a URL in a field and have it generate the embed like YouTube, etc... but it's not using OEmbed.
This is an example of a document for a test I uploaded to our university OneDrive (with my personal email/other info MASKED):
iframe:
<iframe src="https://OUR-DOMAIN.sharepoint.com/personal/USERID_UNIVERSITY_edu/_layouts/15/Doc.aspx?sourcedoc={834d233d-4a56-40fe-98e4-de62afe4bfcd}&action=embedview" width="476px" height="288px" frameborder="0">This is an embedded <a target="_blank" href="https://office.com">Microsoft Office</a> document, powered by <a target="_blank" href="https://office.com/webapps">Office</a>.</iframe>
link:
https://OUR-DOMAIN.sharepoint.com/:w:/r/personal/USERID_UNIVERSITY_edu/Documents/PhD/Do%20it%20now.docx?d=w834d233d4a5640fe98e4de62afe4bfcd&csf=1&web=1&e=J8JhTN
The sourcedoc value seems to match but has dashes in one and not the other, who knows what they're breaking it on.
Very similar to Chris' above, but different in subtle ways that would be impossible to use.
For anyone else looking for this in the future, you can install Devel and go to /devel/routes
Same question. I just now noticed that new button and was confused where it came from. I thought maybe it was somehow sneaking in what this issue does: https://www.drupal.org/project/drupal/issues/3338369 ✨ Layout Builder - Add a refresh layout defaults feature Needs review
Sounds great! I wasn’t worried since this (D7) site will be merged into our new D10 site but figured I’d pop in and advocate for those who do use it just in case. Thanks!
I’m not sure how this works, can’t see the code, and I’m on my phone, but just wanted to add that /admin/structure is not a guaranteed path since there are modules that can rename the admin path → . I maintain a site where the previous developer used it to rename it from /admin/ to /backend/ presumably because the previous non-Drupal site used that path.
I am looking for something like this as well. I recently built two sites with WordPress (not my call 🤷🏻♂️) after not touching the CMS in 5+ years and made use of their new Full Site Editor experience. It was a bit frustrating at first but worked. The idea of a "block theme" combined with template parts, which I would equate to theme regions in Drupal, but also template blocks seems like could be possibly done. It would probably require nesting of sections I guess? There are several other issues open related to section nesting/dynamic layout regions...
#53 looks amazing! You’re awesome Wim. That’s exactly what I was picturing it would work like in your demo. 😍
Re: the title attr, I don’t use it often either, but I have seen in the past it used by some sites to generate a clickable tooltip for different things using JS. I don’t think I’d ever do that personally, but that’s one use case for it.
Looking to get this working in a new Drupal 10 site moving from Drupal 7. Can one of the maintainers take a look?
Ergh, linked to the wrong thing above and it won't let me upload the image by editing... adding here :D