Account created on 6 January 2013, over 11 years ago
#

Merge Requests

Recent comments

πŸ‡ΊπŸ‡ΈUnited States emerham

I have been using this patch in Production for 2 years now. No complaints or issues. I added some CSS to our theme to make blocks placed in the columns have equal height when selecting the "Stretch" option. Feel free to critique it.

// Make the columns truly "stretch" when placing blocks.
.align-items-stretch {
  &.layout-builder__layout {
    > div[class*=col] {
      display: flex;
      flex-direction: column;

      > div[class*="block-"] {
        display: flex;
        flex: 1 0 auto;
        flex-direction: column;

        > div.block__content {
          display: flex;
          flex: 1 0 auto;
          flex-direction: column;

          > div {
            flex: 1 0 auto;
          }
        }
      }
    }
  }
}
πŸ‡ΊπŸ‡ΈUnited States emerham

emerham β†’ created an issue.

πŸ‡ΊπŸ‡ΈUnited States emerham

The patch proposed in #3267321-2: Always show layout builder in frontend theme. β†’ does fix the problem for Reusable Block Overrides. There will need to be some work done to get tests working for this change to be incorporated in Drupal Core.

πŸ‡ΊπŸ‡ΈUnited States emerham

Example:

The Module Responsive Preview checks if an entity has a canonical link and will then use that to build it's own URL for checking the page. This module's entity annotation defines that it should have a canonical url but that doesn't actually exist.

The website encountered an unexpected error. Try again later.

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.block_visibility_group.canonical" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 206 of core/lib/Drupal/Core/Routing/RouteProvider.php).

Drupal\Core\Routing\UrlGenerator->getRoute('entity.block_visibility_group.canonical') (Line: 276)
Drupal\Core\Routing\UrlGenerator->generateFromRoute('entity.block_visibility_group.canonical', Array, Array, 1) (Line: 108)
Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute('entity.block_visibility_group.canonical', Array, Array, ) (Line: 765)
Drupal\Core\Url->toString() (Line: 109)
Drupal\responsive_preview\ResponsivePreview->getPreviewUrl() (Line: 327)
Drupal\responsive_preview\ResponsivePreview->previewToolbar() (Line: 33)

πŸ‡ΊπŸ‡ΈUnited States emerham

I moved the if (isset($options['display_time']) && $options['display_time']) down 4 lines and added a new else statement to ensure that $output will have a value.

did some testing both showing and not showing the time date time range that is both same day and different days at different times.

πŸ‡ΊπŸ‡ΈUnited States emerham

Still getting the same error in the function formatRange.

I think there's an issue in the formatRange, intellephese is saying that $output on line 293 is "probably undefined". Checking the logic it looks like if I don't have the option of "Show time" checked that $output will never be set and thus is null and being returned as such

if (isset($options['display_time']) && $options['display_time']) {
        $date_output = $start_stamp->format($format_start_date);
        if (!empty($format_end_date)) {
          $date_output .= (isset($options['separator']) && $options['separator'] == 'endash' ? ' – ' : ' to ') . $end_stamp->format($format_end_date);
        }
        $time_output = $this->getTimeOutput($normalized_timestamps, $options, $fieldtype);
        if (!empty($time_output) && isset($options['time_before_date']) && $options['time_before_date']) {
          $output = $time_output . ', ' . $date_output;
        }
        elseif (!empty($time_output)) {
          $output = $date_output . ', ' . $time_output;
        }
        else {
          $output = $date_output;
        }
      }
      return $output;
πŸ‡ΊπŸ‡ΈUnited States emerham

emerham β†’ created an issue.

πŸ‡ΊπŸ‡ΈUnited States emerham

Ran into this problem when updating a single node that used paragraphs with field collections. Was unable to find the issue but this patch solved the problem.

πŸ‡ΊπŸ‡ΈUnited States emerham

@heddn I'm not seeing the concern from #6 in any patch after #11. Do you want us to update the Issue?
Also without this patch I do have some theme suggestions provided

  • menu--group-menu.html.twig
  • menu--group-menu--<group content menu machine name>.html.twig

I feel like we don't need to provide anything more for the suggestions and theme authors can use hook_theme_suggestions_menu_alter to provide more.

πŸ‡ΊπŸ‡ΈUnited States emerham

At least, for me, It seems unusual to have default text for different URLs.

Also using field tokens you can have a mostly static title that replaces part of the text on render.
For instance we have some PAC classes and we want the link to be:
View the OSU course catalog page for [node:field_pac_class_name].
As long as you make the token field required then it should work. Tested on a site that I'm migrating and it works with this patch.

πŸ‡ΊπŸ‡ΈUnited States emerham

I did attempt to apply the each to the back to top section

        var opts = $.extend({}, nav.toc.defaults, options);
        if (opts.backToTop) {
          var scrollTo = function(e, callback) {
            if (opts.smoothScrolling && typeof opts.smoothScrolling === 'function') {
              e.preventDefault();
              var elScrollTo = $(e.target).attr('href');

              opts.smoothScrolling(elScrollTo, opts, callback);
            }
            $('li', self).removeClass(opts.activeClass);
            $(e.target).parent().addClass(opts.activeClass);
          };

          nav.find('a').each(function () {
            var container = $(opts.container);
            var anchor = $(this).attr('href').replace(/^#/, '');
            var anchorNameToTop = anchor + '-to-top';
            $(this).attr('id', anchorNameToTop);

            var $span = container.find('span[id="' + anchor + '"]');
            var anchorToTop = $('<a/>')
              .attr('href', '#' + anchorNameToTop)
              .addClass('back-to-top')
              .text(opts.backToTopLabel)
              .insertAfter($span)
              .bind('click', function(e) {
                scrollTo(e, function() {
                });
                nav.trigger('selected', $(this).attr('href'));
              });
          });
        }

but I believe that since this is inside the .each from line 14 it got called mutliple times so the once didn't matter.

πŸ‡ΊπŸ‡ΈUnited States emerham

Rewrote to match code example.

Tested with Multiple headings on my page as well as mutliple ToC JS blocks on the same page and can confirm that every heading that was added to the ToC list gets a back to the top. On the headings of the same level in both ToC blocks I do see two links so I can confirm that this is working once for each block.

πŸ‡ΊπŸ‡ΈUnited States emerham

@bdanin, it looks like you also are using the adminimal admin toolbar module β†’ ? Seeing how Adminimal Admin tool bar is a Skin on-top of Admin toolbar it would be up to them to adjust their styling once Admin Toolbar has decided the best layout for their icons.

πŸ‡ΊπŸ‡ΈUnited States emerham

emerham β†’ made their first commit to this issue’s fork.

πŸ‡ΊπŸ‡ΈUnited States emerham

Can confirm that this does fix the issue when big pipe is on.

πŸ‡ΊπŸ‡ΈUnited States emerham

Re-rolled the patch from #84 against 9.5.x

πŸ‡ΊπŸ‡ΈUnited States emerham

The new check to ensure CKEditor is installed causes my Install Profile to fail.
I have a custom Install Profile that Lists both CKEdtior and this module along side others and I cannot install a new site with the checks.

πŸ‡ΊπŸ‡ΈUnited States emerham

Full stack trace

TypeError: Illegal offset type in Drupal\Core\Entity\EntityStorageBase->load() (line 297 of /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityStorageBase.php)
#0 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityBase.php(488): Drupal\Core\Entity\EntityStorageBase->load(Array)
#1 /var/www/html/docroot/modules/contrib/bootstrap_styles/src/Plugin/BootstrapStyles/Style/BackgroundMedia.php(384): Drupal\Core\Entity\EntityBase::load(Array)
#2 /var/www/html/docroot/modules/contrib/bootstrap_styles/src/StylesGroup/StylesGroupManager.php(265): Drupal\bootstrap_styles\Plugin\BootstrapStyles\Style\BackgroundMedia->build(Array, Array, 'blb_container_w...')
#3 /var/www/html/docroot/modules/contrib/bootstrap_layout_builder/src/Plugin/Layout/BootstrapLayout.php(166): Drupal\bootstrap_styles\StylesGroup\StylesGroupManager->buildStyles(Array, Array, 'blb_container_w...')
#4 /var/www/html/docroot/core/modules/layout_builder/src/Section.php(98): Drupal\bootstrap_layout_builder\Plugin\Layout\BootstrapLayout->build(Array)
#5 /var/www/html/docroot/core/modules/layout_builder/src/Element/LayoutBuilder.php(240): Drupal\layout_builder\Section->toRenderArray(Array, true)
#6 /var/www/html/docroot/core/modules/layout_builder/src/Element/LayoutBuilder.php(124): Drupal\layout_builder\Element\LayoutBuilder->buildAdministrativeSection(Object(Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage), 0)
#7 /var/www/html/docroot/core/modules/layout_builder/src/Element/LayoutBuilder.php(98): Drupal\layout_builder\Element\LayoutBuilder->layout(Object(Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage))
#8 [internal function]: Drupal\layout_builder\Element\LayoutBuilder->preRender(Array)
#9 /var/www/html/docroot/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(101): call_user_func_array(Array, Array)
#10 /var/www/html/docroot/core/lib/Drupal/Core/Render/Renderer.php(788): Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_ren...', 'exception', 'Drupal\\Core\\Ren...')
#11 /var/www/html/docroot/core/lib/Drupal/Core/Render/Renderer.php(374): Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array)
#12 /var/www/html/docroot/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender(Array, true)
#13 /var/www/html/docroot/core/lib/Drupal/Core/Render/Renderer.php(148): Drupal\Core\Render\Renderer->render(Array, true)
#14 /var/www/html/docroot/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}()
#15 /var/www/html/docroot/core/lib/Drupal/Core/Render/Renderer.php(149): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#16 /var/www/html/docroot/core/lib/Drupal/Core/Ajax/CommandWithAttachedAssetsTrait.php(36): Drupal\Core\Render\Renderer->renderRoot(Array)
#17 /var/www/html/docroot/core/lib/Drupal/Core/Ajax/ReplaceCommand.php(31): Drupal\Core\Ajax\InsertCommand->getRenderedContent()
#18 /var/www/html/docroot/core/lib/Drupal/Core/Ajax/AjaxResponse.php(43): Drupal\Core\Ajax\ReplaceCommand->render()
#19 /var/www/html/docroot/modules/contrib/bootstrap_layout_builder/src/Plugin/Layout/BootstrapLayout.php(575): Drupal\Core\Ajax\AjaxResponse->addCommand(Object(Drupal\Core\Ajax\ReplaceCommand))
#20 [internal function]: Drupal\bootstrap_layout_builder\Plugin\Layout\BootstrapLayout->livePreviewCallback(Array, Object(Drupal\Core\Form\FormState), Object(Symfony\Component\HttpFoundation\Request))
#21 /var/www/html/docroot/core/lib/Drupal/Core/Form/FormAjaxResponseBuilder.php(69): call_user_func_array(Array, Array)
#22 /var/www/html/docroot/core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php(109): Drupal\Core\Form\FormAjaxResponseBuilder->buildResponse(Object(Symfony\Component\HttpFoundation\Request), Array, Object(Drupal\Core\Form\FormState), Array)
#23 [internal function]: Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber->onException(Object(Symfony\Component\HttpKernel\Event\ExceptionEvent), 'kernel.exceptio...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#24 /var/www/html/docroot/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ExceptionEvent), 'kernel.exceptio...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#25 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(229): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ExceptionEvent), 'kernel.exceptio...')
#26 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(92): Symfony\Component\HttpKernel\HttpKernel->handleThrowable(Object(Drupal\Core\Form\FormAjaxException), Object(Symfony\Component\HttpFoundation\Request), 1)
#27 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#31 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#32 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#33 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#34 /var/www/html/docroot/core/lib/Drupal/Core/DrupalKernel.php(713): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#35 /var/www/html/docroot/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#36 {main}
Production build 0.69.0 2024