Account created on 13 March 2013, almost 12 years ago
#

Merge Requests

Recent comments

πŸ‡ΊπŸ‡ΈUnited States electrokate

Ok thank you. In the meantime, here is a patch with your rebase from 85.diff, which cleanly applies to 3.1.3, in case anyone needs it. (the 85.diff was not applying for me, I just re-compiled the /build/uswds_accordion.js)

πŸ‡ΊπŸ‡ΈUnited States electrokate

Hey smustgrave! Thank you so much for rebasing and trying to get this merged. What can I do to help? I am hoping to get it merged so we don't have to add as a patch going forward.

Does this need to be done to merge?
"Instead of through the text formatter lets add 2 new commands to accordion. "

If so can you elaborate?

πŸ‡ΊπŸ‡ΈUnited States electrokate

Ok thanks, I'm still working on the collapsed checkbox feature.

πŸ‡ΊπŸ‡ΈUnited States electrokate

Following up on my previous post. The error was due to the mini-pager view inside the gin_lb template. I made a patch to fix it. Hope it helps someone! https://www.drupal.org/project/gin_lb/issues/3461861 πŸ› Media Library Widget broken when adding block in layout builder Active

πŸ‡ΊπŸ‡ΈUnited States electrokate

I am having the same error:

"
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /layout_builder/add/block/overrides/node.1323636/0/content/inline_block%3Ablank?_wrapper_format=drupal_dialog.off_canvas&ajax_form=1
StatusText: Internal Server Error
ResponseText: The website encountered an unexpected error. Try again later.InvalidArgumentException: "href" is an invalid render array key. Value should be an array but got a string. in Drupal\Core\Render\Element::children() (line 97 of core/lib/Drupal/Core/Render/Element.php). Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 475)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 98)
__TwigTemplate_8d2346e8554847dcc657b61c95520401->doDisplay() (Line: 360)
Twig\Template->yield() (Line: 335)
Twig\Template->render() (Line: 38)
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: 475)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 133)
__TwigTemplate_2d85fd5afdb7d12e10591724d18de052->doDisplay() (Line: 360)
Twig\Template->yield() (Line: 335)
Twig\Template->render() (Line: 38)
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: 504)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 475)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 49)
__TwigTemplate_b416f63f3ad7568340839e6cba4665df->doDisplay() (Line: 360)
Twig\Template->yield() (Line: 335)
Twig\Template->render() (Line: 38)
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: 153)
Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 152)
Drupal\Core\Render\Renderer->renderRoot() (Line: 36)
Drupal\Core\Ajax\OpenDialogCommand->getRenderedContent() (Line: 148)
Drupal\Core\Ajax\OpenDialogCommand->render() (Line: 43)
Drupal\Core\Ajax\AjaxResponse->addCommand() (Line: 838)
Drupal\media_library\Plugin\Field\FieldWidget\MediaLibraryWidget::openMediaLibrary()
call_user_func_array() (Line: 69)
Drupal\Core\Form\FormAjaxResponseBuilder->buildResponse() (Line: 112)
Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber->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: 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)
"

When trying to use the media library insert button inside a block in layout builder.

πŸ‡ΊπŸ‡ΈUnited States electrokate

Re-rolling patch for Drupal 10.3.0

πŸ‡ΊπŸ‡ΈUnited States electrokate

Confirming that the patch 3331610-7-group-src-Field-GroupContentReferenceDefinition.patch fixes this error

The script tried to call a method on an incomplete object. Please ensure that the class definition "Drupal\group\Field\GroupContentReferenceDefinition" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide an autoloader to load the class definition in field_purge_batch() (line 81 of core/modules/field/field.purge.inc)

that arises on a cron run after upgrading to group 2.0

Thank you very much!

πŸ‡ΊπŸ‡ΈUnited States electrokate

@kristiaanvandeneynde not sure which release notes you're referring to? I couldn't find anything about the flexible permissions issue in version 2 but maybe I'm missing something. Here's a patch for 2.2.2 that fixes this issue for me. Looks like it will work in version 3 as well.

πŸ‡ΊπŸ‡ΈUnited States electrokate

This was extremely helpful, thank you!

πŸ‡ΊπŸ‡ΈUnited States electrokate

Here is a patch of what I have so far. It works for me in Drupal 10.11.

πŸ‡ΊπŸ‡ΈUnited States electrokate

Deleting and re-creating the group admin role fixed this error for me.

πŸ‡ΊπŸ‡ΈUnited States electrokate

Thank you this helped me today! If anyone is having trouble saving this form, just add the tag first and save, then go back in and enable the plugin.

πŸ‡ΊπŸ‡ΈUnited States electrokate

Adding Ip2CountryLookup $ip2CountryLookupService = NULL

πŸ‡ΊπŸ‡ΈUnited States electrokate

Adding KillSwitch $pageCacheKillSwitch = NULL to construct

πŸ‡ΊπŸ‡ΈUnited States electrokate

Re-rolling patch for D10

πŸ‡ΊπŸ‡ΈUnited States electrokate

Neither #204 or #212 is working for me in Drupal 8.8.6. (#212 would not apply, so I made the changes manually to try it). Upon saving, it takes the last element in the $input array and assigns it a negative weight, such that it appears first in the list.

I am trying to fix this but could use some assistance! I can't seem to edit elements of the $input array in the submitRemove function. Perhaps the change needs to be made in the removeAjaxContentRefresh function?

EDITED TO ADD:

I have edited the code and it works for me now. I replaced the submit function as follows:
(Basically the "--key" needs to be inside the if statement that checks for the removed element, and the indices need to be reset afterward.)

    if ($exists) {
      $field_values = [];
      foreach ($field_input as $key => $input) {
        if (is_numeric($key) && $key >= $delta) {
          if ((int) $key === $delta) {
            --$key;
            continue;
          }
        }
        $field_values[$key] = $input;
      }
      NestedArray::setValue($user_input, $parent_element['#parents'], $field_values);
      $form_state->setUserInput($user_input);
    }

    unset($parent_element[$delta]);
    NestedArray::setValue($form, $array_parents, $parent_element);

    if ($field_state['items_count'] > 0) {
      $field_state['items_count']--;
    }

    $user_input = $form_state->getUserInput();
    $input = NestedArray::getValue($user_input, $parent_element['#parents'], $exists);
    $weight = -1 * $field_state['items_count'];
    foreach ($input as $key => $item) {
      if ($item) {
        $input[$key]['_weight'] = $weight++;
      }
    }
    // Reset indices.
    $input = array_values($input);

    $user_input = $form_state->getUserInput();
    NestedArray::setValue($user_input, $parent_element['#parents'], $input);
    $form_state->setUserInput($user_input);
    $user_input = $form_state->getUserInput();
    static::setWidgetState($parents, $field_name, $form_state, $field_state);
    $form_state->setRebuild();
}

Will follow up with patch.

Production build 0.71.5 2024