Account created on 15 October 2010, about 14 years ago
#

Recent comments

πŸ‡ΊπŸ‡ΈUnited States todea

todea β†’ created an issue.

πŸ‡ΊπŸ‡ΈUnited States todea

I thought our Drupal 10.3 site was corrupted somehow until coming across this issue. We specifically had the issue of not being able to set a parent for a term through the create/edit form. This would also cause the parent to be lost when editing an existing term.

Thanks @DigitalFrontiersMedia

https://www.drupal.org/project/drupal/issues/2985762#comment-12686651 πŸ› Terms created when override_selector = TRUE don't appear on Terms List/Overview page Closed: duplicate

πŸ‡ΊπŸ‡ΈUnited States todea

@benjifisher:
Yes, we went from I believe 10.2.7 straight to 10.3.1

Not sure if I can replicate the 15-20 second load times w/ something like simplytest.me but it was pretty slow. Back in February we upgraded from Drupal 7 to 10 and it has been a bit of a bumpy road so far. We have ~200 enabled modules, ~299k nodes. Some of the permission related modules we use are: override_node_options, view_unpublished, workbench, workbench_access.

At the time, disabling admin_toolbar_tools quickly solved the problem and the difference was night & day.

On our dev server I re-enabled admin_toolbar_tools and I applied patch #5 from 3384600 β†’ and your MR 82 listed above (we needed both). That has fixed the issue on our end, our pages that utilize admin toolbar are back to normal now - much faster.

Thank you to both you and @berdir for working on these various issues.

πŸ‡ΊπŸ‡ΈUnited States todea

Please disregard, this is not an issue with ckeditor accordion but with tb_megamenu.
https://www.drupal.org/project/tb_megamenu/issues/3450882 πŸ› Excessive click events on the Mega Menu lead to a crash or tab freeze. Active

πŸ‡ΊπŸ‡ΈUnited States todea

Not sure if this slowness got worse with Drupal 10.3.1 but that is what we have noticed. We had to disable admin_toolbar_tools because it was causing 15-20 second page load times for admin users.

πŸ‡ΊπŸ‡ΈUnited States todea

Yeah, sorry for the back and forth. The issue does still occur. I edited my comment after realizing that it was not just a caching issue.

πŸ‡ΊπŸ‡ΈUnited States todea

It looks like the issue was caused by having the "Workflow transition form" on our form display. When I change that display to check boxes or select list, then the normal node save/delete actions come back.

πŸ‡ΊπŸ‡ΈUnited States todea

@johnv, yeah I'm not sure why this is happening. I am using this "workflow" module, version 8.x-1.7. I see a 'Update workflow' button label in src\Form\WorkflowTransitionForm.php. This occurs on the add/edit screen for an "event" node on our site.

πŸ‡ΊπŸ‡ΈUnited States todea

Please disregard and close this issue. This was due to browser caching.

πŸ‡ΊπŸ‡ΈUnited States todea

Similar issue, we are using Workflow 8.x-1.7 and Gin 8.x-3.0-rc13. For the nodes where we use workflow, the Save & Delete actions are removed. Save is replaced w/ "Update workflow".

If we switch back to Claro as the admin theme, then save and delete properly display.

πŸ‡ΊπŸ‡ΈUnited States todea

For some reason we don't see the "Save term lineage" setting on our field within "Manage form display". This happened when we were using 2.0.x-dev with the patches listed above and it is also happening now as we test the 3.0.0-alpha version.

Has anyone else run into this issue?

πŸ‡ΊπŸ‡ΈUnited States todea

I would prefer to see the Drupal 7 behavior carried forward.

Drupal 7 updates the revision author and timestamp to reflect the most recent edit.

We had a few content types in Drupal 7 where we had revisions disabled because it wasn't needed. However, Drupal 7 would still track the last user who edited a node which was very useful. Now in Drupal 10 with revisions disabled this same behavior is not possible.

We will need to turn on revisions as needed and probably use the node_revision_delete module to limit the revision total.

πŸ‡ΊπŸ‡ΈUnited States todea

In Drupal 7 we used the Quickbar module for this type of role based navigation and shortcuts. Quickbar allowed the admin to control which toolbar a role would get by using the built-in weights and drag/drop. (screenshot attached)

Being able to control the assignment of shortcuts this way would be helpful.

πŸ‡ΊπŸ‡ΈUnited States todea

Here is the code. I have a ton of use statements in there due to earlier testing. Error output is below the code.

<?php

/**
 * @file
 * Contains mymodule.module..
 */

 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityTypeInterface;
 use Drupal\Core\Field\Entity\BaseFieldOverride;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\gin\GinSettings;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\node\Entity\Node;
 use Drupal\node\NodeInterface;
 use Drupal\block\Entity\Block;
 use Drupal\Core\Access\AccessResult;
 use Drupal\Core\Session\AccountInterface;
 use Drupal\views\ViewExecutable;
 use Drupal\Core\Url;
 
 use Drupal\workflow\Entity\Workflow;
 use Drupal\workflow\Entity\WorkflowManager;
 use Drupal\workflow\Entity\WorkflowScheduledTransition;
 use Drupal\workflow\Entity\WorkflowConfigTransition;
 use Drupal\workflow\Entity\WorkflowState;
 use Drupal\workflow\Entity\WorkflowTransitionInterface;
 use Drupal\workflow\Entity\WorkflowTransition;
 
 
 // ####################################################
 // WORKFLOW
 // ####################################################

 
function mymodule_entity_presave(EntityInterface $entity) {

if ((!empty($entity)) && ($entity->bundle() == 'event')) {

  if (!$entity->isNew()) {

      dpm($entity);

      $field_name = 'field_event_workflow';
      $next_state = "event_reporting_complete";
      //$entity = \Drupal::entityManager()->getStorage($entity_type)->load($entity_id);
      //$entity = \Drupal::EntityTypeManager()->getStorage($entity->getEntityTypeId())->load($entity->id());

      $current_user = \Drupal::currentUser();
      $current_sid = $entity->$field_name->value;

      dpm($current_user);
      dpm($current_sid);

      if (!$entity) {
            dpm('not entity');
      } else {
            dpm('is entity');
      }

      $entity_id = $entity->id();
      $entity_type = $entity->getEntityTypeId();

      $transition = WorkflowTransition::create([$current_sid, 'field_name' => $field_name]);
      $transition->setTargetEntity($entity);
      $transition->setValues($next_state, $current_user, \Drupal::time()->getRequestTime(), '', TRUE);
      $transition->force($force);

  } 

}
}

Error:

The website encountered an unexpected error. Try again later.

Drupal\Core\Entity\EntityStorageException: Value is not a valid entity. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
Drupal\Core\Field\FieldItemBase->writePropertyValue('entity', Object) (Line: 131)
Drupal\Core\TypedData\Plugin\DataType\Map->set('entity', Object, ) (Line: 231)
Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem->setValue(Object, ) (Line: 72)
Drupal\Core\TypedData\Plugin\DataType\ItemList->setValue(Array, 1) (Line: 107)
Drupal\Core\Field\FieldItemList->setValue(Array, 1) (Line: 657)
Drupal\Core\Entity\ContentEntityBase->set('uid', Object) (Line: 894)
Drupal\workflow\Entity\WorkflowTransition->setOwnerId(Object) (Line: 185)
Drupal\workflow\Entity\WorkflowTransition->setValues('event_reporting_expired', Object, 1707331982, '', 1) (Line: 127)
bpl_config_entity_presave(Object)
call_user_func_array(Object, Array) (Line: 409)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'bpl_config') (Line: 388)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('entity_presave', Object) (Line: 408)
Drupal\Core\Extension\ModuleHandler->invokeAll('entity_presave', Array) (Line: 217)
Drupal\Core\Entity\EntityStorageBase->invokeHook('presave', Object) (Line: 900)
Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('presave', Object) (Line: 529)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 753)
Drupal\Core\Entity\ContentEntityStorageBase->doPreSave(Object) (Line: 483)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 806)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 352)
Drupal\Core\Entity\EntityBase->save() (Line: 270)
Drupal\node\NodeForm->save(Array, Object)
call_user_func_array(Array, Array) (Line: 129)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 67)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 597)
Drupal\Core\Form\FormBuilder->processForm('node_event_edit_form', Array, Object) (Line: 325)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object) (Line: 39)
Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult(Object, Object)
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: 121)
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: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->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)

πŸ‡ΊπŸ‡ΈUnited States todea

Thank you. I am now getting the following error when using the presave hook.

Drupal\Core\Entity\EntityStorageException: Value is not a valid entity. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

πŸ‡ΊπŸ‡ΈUnited States todea

Do these transitions still work? I was running into issues integrating this into either hook_entity_update() or hook_ENTITY_TYPE_update()

πŸ‡ΊπŸ‡ΈUnited States todea

This is still an issue. It looks like it didn't get rolled into 8.x-1.4 and is not in 8.x-1.7

πŸ‡ΊπŸ‡ΈUnited States todea

Is this module still necessary in Drupal 10? Core seems to provide this functionality where you can allow roles to manage specific vocabularies.

πŸ‡ΊπŸ‡ΈUnited States todea

Thanks for the help. I created a node template (node--event.html.twig) and added {{ content.field_event_registration }} but still no luck.

It does work if I turn off layout builder for this content type. So I'll stick with doing it that way. In some cases I find it to be more flexible to control the layout and output directly via a twig template.

πŸ‡ΊπŸ‡ΈUnited States todea

I'm using layout builder and I have the the registration field in the layout, formatter is set to "Registration form". The form does show on the page based on my setup with layout builder but when I try to place it using twig it doesn't work. I'm using a custom page node template file: page--event.html.twig

{{ content.field_event_registration }} doesn't give me anything. I had previously tried other combinations. Attached is screenshot of the dump output.

πŸ‡ΊπŸ‡ΈUnited States todea

Just an fyi, I used the following to move from the timefield module to time_field.

...
source:
  plugin: d7_node_complete
  node_type: page
...
process:
  field_hours_monday:
    -
      plugin: sub_process
      source: field_hours_monday
      process:
        from: value
        to: value2
...
πŸ‡ΊπŸ‡ΈUnited States todea

This update breaks the ability to save a mega menu configuration on Drupal 9.59. When I try to save I get this error:

Error: Call to undefined method Symfony\Component\HttpFoundation\Request::getContentTypeFormat() in Drupal\tb_megamenu\Controller\TBMegaMenuAdminController->saveConfiguration() (line 103 of /var/www/html/bpld9/modules/contrib/tb_megamenu/src/Controller/TBMegaMenuAdminController.php).

I reverted this line back to $request->getContentType()

-    if ($request->getContentType() == 'json') {
+    if ($request->getContentTypeFormat() == 'json') {
πŸ‡ΊπŸ‡ΈUnited States todea

The frontend.js file located at /modules/contrib/tb_megamenu/dist/js/frontend.js is missing the throttle function.

I copied over the function from the /modules/contrib/tb_megamenu/js/frontend.js file.

Make sure to update the throttled variable too

  //var throttled = _.throttle(updateTBMenus, 100);
  const throttled = throttle(updateTBMenus, 100);
πŸ‡ΊπŸ‡ΈUnited States todea

I used the following code to get full width sub-menus. This code was borrowed and modified from the hollyhunt site.
I'm using tb_megamenu version 2.0.0-alpha3

global.js in my site's theme
dynamically sets the menu width and left offset

/**
 * @file
 * Global utilities.
 *
 */
(function ($, Drupal) {

  'use strict';

  Drupal.behaviors.yoursite = {
    attach: function (context, settings) {

        // Make submenu full browser width.
        const submenuFullwidthCalc = function () {
          // Get the Mega menu Level 1 sub menu.
          $(".tbm-nav > .level-1 > .tbm-submenu").each(function () {
            // reset to zero so it can be calculated again and again
            $(this).css("left", 0);
            const offsettarget = $("body").offset();
            // The offset of this submenu.
            const offsetthis = $(this)
              //.parent()
              .parents( "ul" ) // get parent ul instead
              .offset();
            // Calculate the offset.
            $(this).css("left", offsettarget.left - offsetthis.left);

            // Set the submenu full width.
            $(this).css("width", $("body").width());
          });
        };

        $(window).on("load resize", function () {
          submenuFullwidthCalc();
        });

    }



  };

})(jQuery, Drupal);

The below is not necessary but helps with formatting to prevent content from stretching to the edges.

customized tb-megamenu-submenu.html.twig

<div {{ attributes }}>
  <div class="tb-dropdown-inner">
    {% for row in rows %}
      {{ row }}
    {% endfor %}
  </div>
</div>

CSS

.tb-dropdown-inner {
	max-width: 1278px;
	margin: auto;
	padding: 0 45px 28px;
	min-height: 200px;
}
πŸ‡ΊπŸ‡ΈUnited States todea

In our development environment, I resorted to incrementing the version number within yourtheme.libraries.yml file.

change:

global-styling:
  version: VERSION
to:
global-styling:
  version: 1.0.1
πŸ‡ΊπŸ‡ΈUnited States todea

This issue thread is a little confusing. I'm adding my notes in case it helps someone else.

I also needed this functionality where I have a view block with a contextual filter of node id (ID), and I want to place
this block onto a content type via layout builder. Then, when viewing a node the block should display the appropriate
content.

Similar to what SiliconValet said, I got this to work by doing this:

  1. Create a Views Block of node fields (any field).
  2. Add a contextual filter of ID.
    • - Expand When the filter value IS available or a default is provided
    • - Enable Specify validation criteria
    • - Validator = Content
    • - Content type = your content type
  3. Add this Views Block to a node Layout Builder layout section.
  4. Configure block and set Content: ID = Content
πŸ‡ΊπŸ‡ΈUnited States todea

Circling back to this in case anyone else has the same issue.

I had one field in our Drupal 7 site that had a default image, causing this problem. I simply removed the default image. Remove the default image via the D7 frontend or modify the value in the database within the field_config_instance table.

I replaced:
s:13:"default_image";s:5:"53425";

with:
s:13:"default_image";i:0;

πŸ‡ΊπŸ‡ΈUnited States todea

Thanks for the tip. I am also using #3253813 but I may add some of those other patches to help with our migrate.

πŸ‡ΊπŸ‡ΈUnited States todea

I believe I initially had this issue while using drupal/webform_migrate:^1.2. I then switched to drupal/webform_migrate:1.x-dev@dev and the issue went away.

My charset and collation is:

utf8mb4
utf8mb4_unicode_ci
Production build 0.71.5 2024