πŸ‡ΊπŸ‡ΈUnited States @jakegibs617

Account created on 25 July 2017, almost 7 years ago
#

Recent comments

πŸ‡ΊπŸ‡ΈUnited States jakegibs617

Can you give this one a shot? 2920527-37.patch

πŸ‡ΊπŸ‡ΈUnited States jakegibs617

remade number 7 here. Not sure if it solves the problem, needs to be tested still.

πŸ‡ΊπŸ‡ΈUnited States jakegibs617

Thanks all!
I am upgrading to 10.2.2 and will re-enable big_pipe. So far initial tests seem to be successful

πŸ‡ΊπŸ‡ΈUnited States jakegibs617

@abelass are you able to clear the cache with the patch?
when I run drush cr
I am getting:
A transaction named mimic_implicit_commit is already in use. Active stack: 65b129b004e365.44430355\drupal_transaction > 65b129b020e3c2.42669084\mimic_implicit_commit

looking into it more now

πŸ‡ΊπŸ‡ΈUnited States jakegibs617

After upgrading core from 10.1.5 to 10.2.2 this patch stopped working:
https://www.drupal.org/files/issues/2021-07-27/drupal-views_filter_lates... β†’

and tested this one, but this also is not applying for me.
Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2022-12-16/drupal-views_filter_lates... β†’

πŸ‡ΊπŸ‡ΈUnited States jakegibs617

adding a remake of 2920527-26.patch but fitting to druapl 10.2.2

πŸ‡ΊπŸ‡ΈUnited States jakegibs617

Tested this change, as seen in https://git.drupalcode.org/project/drupal/-/merge_requests/4778/diffs
But the issue is still reproducible. I ran drush cr and continued to test in low-mobile throttle. After the fourth time refreshing I was able to see one block fail to load.

diff --git a/core/modules/big_pipe/js/big_pipe.js b/core/modules/big_pipe/js/big_pipe.js
index d20331de0..6979fbd43 100644
--- a/core/modules/big_pipe/js/big_pipe.js
+++ b/core/modules/big_pipe/js/big_pipe.js
@@ -69,20 +69,32 @@
       return;
     }
 
-    // Immediately remove the replacement to prevent it being processed twice.
-    delete drupalSettings.bigPipePlaceholderIds[id];
-
     const response = mapTextContentToAjaxResponse(content);
 
     if (response === false) {
       return;
     }
 
+    // Immediately remove the replacement to prevent it being processed twice.
+    delete drupalSettings.bigPipePlaceholderIds[id];
+
     // Then, simulate an AJAX response having arrived, and let the Ajax system
     // handle it.
     ajaxObject.success(response, 'success');
   }
 
+  /**
+   * Checks if node is valid big pipe replacement.
+   */
+  function checkMutation(node) {
+    return Boolean(
+      node.nodeType === Node.ELEMENT_NODE &&
+        node.nodeName === 'SCRIPT' &&
+        node.dataset &&
+        node.dataset.bigPipeReplacementForPlaceholderWithId,
+    );
+  }
+
   /**
    * Check that the element is valid to process and process it.
    *
@@ -90,12 +102,7 @@
    *  The node added to the body element.
    */
   function checkMutationAndProcess(node) {
-    if (
-      node.nodeType === Node.ELEMENT_NODE &&
-      node.nodeName === 'SCRIPT' &&
-      node.dataset &&
-      node.dataset.bigPipeReplacementForPlaceholderWithId
-    ) {
+    if (checkMutation(node)) {
       processReplacement(node);
     }
   }
@@ -107,8 +114,17 @@
    *  The list of mutations registered by the browser.
    */
   function processMutations(mutations) {
-    mutations.forEach(({ addedNodes }) => {
+    mutations.forEach(({ addedNodes, type, target }) => {
       addedNodes.forEach(checkMutationAndProcess);
+      if (
+        type === 'characterData' &&
+        checkMutation(target.parentNode) &&
+        drupalSettings.bigPipePlaceholderIds[
+          target.parentNode.dataset.bigPipeReplacementForPlaceholderWithId
+        ] === true
+      ) {
+        processReplacement(target.parentNode);
+      }
     });
   }
 
@@ -122,8 +138,11 @@
   document.querySelectorAll(replacementsSelector).forEach(processReplacement);
 
   // Start observing the body element for new children.
-  observer.observe(document.body, { childList: true });
-
+  observer.observe(document.body, {
+    childList: true,
+    subtree: true,
+    characterData: true,
+  });
   // As soon as the document is loaded, no more replacements will be added.
   // Immediately fetch and process all pending mutations and stop the observer.
   window.addEventListener('DOMContentLoaded', () => {
πŸ‡ΊπŸ‡ΈUnited States jakegibs617

I ended up patching it like this:

--- a/modules/contrib/entity_reports/src/ReportGenerator.php
+++ b/modules/contrib/entity_reports/src/ReportGenerator.php
@@ -340,7 +340,7 @@ public function generateEntityStatisticsReport($entity_type, $bundle) {
     $row = [
       'label' => $info['label'],
       'id' => $bundle,
-      'translatable' => array_key_exists('translatable', $info) && $info['translatable'] ? $this->t('True') : $this->t('False'),
+      'translatable' => is_array($info) && array_key_exists('translatable', $info) ? $this->t('True') : $this->t('False'),
       'count' => $query->accessCheck(FALSE)->count()->execute(),
     ];

My page http://local.local:8888/admin/reports/entity_statistics.xml is now loading

πŸ‡ΊπŸ‡ΈUnited States jakegibs617

I am also seeing similar, but also with an Error

[Wed, 09/06/2023 - 09:43 EDT] [Warning] [php] [client: ::1, admin] Warning: Trying to access array offset on value of type null in Drupal\entity_reports\ReportGenerator->generateEntityStatisticsReport() (line 342 of /Applications/MAMP/htdocs/modules/contrib/entity_reports/src/ReportGenerator.php) #0 /Applications/MAMP/htdocs/core/includes/bootstrap.inc(164): _drupal_error_handler_real(2, 'Trying to acces...', '/Applications/M...', 342)\n#1 /Applications/MAMP/htdocs/modules/contrib/entity_reports/src/ReportGenerator.php(342): _drupal_error_handler(2, 'Trying to acces...', '/Applications/M...', 342)\n#2 /Applications/MAMP/htdocs/modules/contrib/entity_reports/src/ReportGenerator.php(105): Drupal\entity_reports\ReportGenerator->generateEntityStatisticsReport('group', 'learning_path')\n#3 /Applications/MAMP/htdocs/modules/contrib/entity_reports/src/Controller/EntityReportsController.php(341): Drupal\entity_reports\ReportGenerator->getEntityTypeStructure('group')\n#4 [internal function]: Drupal\entity_reports\Controller\EntityReportsController->exportStatisticsReport('xml')\n#5 /Applications/MAMP/htdocs/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)\n#6 /Applications/MAMP/htdocs/core/lib/Drupal/Core/Render/Renderer.php(583): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()\n#7 /Applications/MAMP/htdocs/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))\n#8 /Applications/MAMP/htdocs/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)\n#9 /Applications/MAMP/htdocs/vendor/symfony/http-kernel/HttpKernel.php(182): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()\n#10 /Applications/MAMP/htdocs/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)\n#11 /Applications/MAMP/htdocs/modules/contrib/simple_oauth/src/HttpMiddleware/BasicAuthSwap.php(68): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#12 /Applications/MAMP/htdocs/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#13 /Applications/MAMP/htdocs/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#14 /Applications/MAMP/htdocs/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#15 /Applications/MAMP/htdocs/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#16 /Applications/MAMP/htdocs/vendor/asm89/stack-cors/src/Cors.php(53): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#17 /Applications/MAMP/htdocs/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Asm89\Stack\Cors->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#18 /Applications/MAMP/htdocs/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#19 /Applications/MAMP/htdocs/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#20 /Applications/MAMP/htdocs/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)\n#21 /Applications/MAMP/htdocs/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))\n#22 {main}.
[Wed, 09/06/2023 - 09:43 EDT] [Error] [php] [client: ::1, admin] TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in array_key_exists() (line 344 of /Applications/MAMP/htdocs/modules/contrib/entity_reports/src/ReportGenerator.php).

entity_reports 2.0.1
Drupal version : 10.1.2
DB driver : pgsql
PHP version : 8.1.0
Drush version : 12.1.3.0

πŸ‡ΊπŸ‡ΈUnited States jakegibs617
diff --git a/modules/contrib/tft/tft.module b/modules/contrib/tft/tft.module
index bfb083b8f..d6d771c49 100644
--- a/modules/contrib/tft/tft.module
+++ b/modules/contrib/tft/tft.module
@@ -664,7 +664,7 @@ function tft_file_access(EntityInterface $entity, $operation, AccountInterface $
   $fid = $entity->get('fid')->getValue();
   $query = \Drupal::entityQuery('media')
     ->condition('tft_file', $fid[0]['value']);
-  $entity_id = array_values($query->execute());
+  $entity_id = array_values($query->accessCheck(FALSE)->execute());
   if (isset($entity_id[0])) {
     $media = Media::load($entity_id[0]);
   }

this works... But not sure if maintainers want this to be set to TRUE or FALSE

πŸ‡ΊπŸ‡ΈUnited States jakegibs617

after looking at https://github.com/podarok/drupal/commit/5656ba39204d105ca7c26535ed963d0...

and adding

+ debug_print_backtrace();

instead, now I see the issue looks like it is coming from

modules/contrib/flag/src/FlagService.php(374): Drupal\Core\Entity\Query\Sql\Query->execute()
diff --git a/src/FlagService.php b/src/FlagService.php
index 8e55aa4f2..33f305366 100644
--- a/src/FlagService.php
+++ b/src/FlagService.php
@@ -371,7 +371,7 @@ public function unflagAllByEntity(EntityInterface $entity) {
       $query->condition('entity_type', $entity->getEntityTypeId())
         ->condition('entity_id', $entity->id());    
  
-      $ids = $query->execute();
+      $ids = $query->accessCheck(FALSE)->execute();
  
       $flaggings = $this->getFlaggingsByIds($ids);
  

after adding the above, I am seeing success now with drush sapi-i my_collection_name --limit 100

> [notice] Successfully indexed 50 items on My Collection Name Index.
> [notice] Successfully indexed 100 items on My Collection Name Index.
> [notice] Message: Successfully indexed 100 items.

πŸ‡ΊπŸ‡ΈUnited States jakegibs617

I am facing the same issue but not locally, only when I deploy to a server. 

Drupal version   : 10.1.2
Default theme    : aristotle
Admin theme      : aristotle
PHP OS           : Linux
PHP version      : 8.1.22
Drush version    : 12.1.2.0

TypeError: Drupal\Core\Render\Renderer::doTrustedCallback(): Argument #1 ($callback) must be of type callable, array given, called in .../htdocs/core/lib/Drupal/Core/Render/Renderer.php on line 788 in Drupal\Core\Render\Renderer->doTrustedCallback() (line 57 of .../htdocs/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php).

I added 

print_r($callback);exit;

on the line before 

    return $this->doTrustedCallback($callback, $args, $message, TrustedCallbackInterface::THROW_EXCEPTION, RenderCallbackInterface::class);

and getting this:

Array ( [0] => Drupal\views\Element\View [1] => preRenderViewElement )

πŸ‡ΊπŸ‡ΈUnited States jakegibs617

oof. Yeah, I was able to bypass this so far by downloading the files directly and tracking them... But obviously, this is a pain and breaks how I build my Drupal app. Generally, I leverage the composer install command when building, but until they release an updated version it seems I am stuck with bad practices

πŸ‡ΊπŸ‡ΈUnited States jakegibs617

#48 and #37 are no longer working for me having upgraded to d10. "drupal/field_group": "^3.4"

looks like the code is now in the new version so we don't need the patch anymore. Can someone confirm?

πŸ‡ΊπŸ‡ΈUnited States jakegibs617

This patch is no longer working for "drupal/ultimate_cron": "^2.0@alpha", https://www.drupal.org/project/ultimate_cron/releases/8.x-2.0-alpha6 β†’ which is the Drupal 10 compatible version.

the new line is now:

$row['started']['#markup'] = $log_entry->start_time ? \Drupal::service('date.formatter')->format((int) $log_entry->start_time, "short") : $this->t('Never');

compared to the old

-    $row['started']['#markup'] = $log_entry->start_time ? \Drupal::service('date.formatter')->format($log_entry->start_time, "short") : $this->t('Never');
+    $row['started']['#markup'] = $log_entry->start_time ? \Drupal::service('date.formatter')->format($start_time, "short") : $this->t('Never');
 

It seems since they added (int) that we do not need this patch any more.
Is this accurate?

πŸ‡ΊπŸ‡ΈUnited States jakegibs617

I was on 9.4.8 core but when I upgraded to drupal 9.5.3 core, the issue seems to have been resolved.

πŸ‡ΊπŸ‡ΈUnited States jakegibs617

Some additional findings for my situation:

- the table properties are applied in the source code and persist after save, but then when a user clicks in a cell, (after save and re-edit) the table properties don't populate the balloon window,

but

- if you edit a cell property such as set width to 100px and align text in the cell to the right, this cell property does persist after save in the balloon toolbar cell property.

Makes me think the issue has to do with identifying the table itself.

πŸ‡ΊπŸ‡ΈUnited States jakegibs617

editor.editor.text_ck5_editor.yml

langcode: en
status: true
dependencies:
  config:
    - filter.format.text_ck5_editor
  module:
    - ckeditor5
format: text_ck5_editor
editor: ckeditor5
settings:
  toolbar:
    items:
      - bold
      - blockQuote
      - italic
      - underline
      - bulletedList
      - numberedList
      - '|'
      - undo
      - redo
      - indent
      - outdent
      - insertTable
      - removeFormat
      - '-'
      - superscript
      - subscript
      - link
      - sourceEditing
  plugins:
    ckeditor5_sourceEditing:
      allowed_tags: {  }
    ckeditor5_list:
      reversed: true
      startIndex: true
image_upload:
  status: false
  scheme: public
  directory: inline-images
  max_size: ''
  max_dimensions:
    width: null
    height: null

filter.format.text_ck5_editor.yml

langcode: en
status: true
dependencies:
  module:
    - editor
    - entity_embed
    - media
    - token_filter
name: CKE5Editor
format: text_ck5_editor
weight: 0
filters:
  editor_file_reference:
    id: editor_file_reference
    provider: editor
    status: true
    weight: -4
    settings: {  }
  entity_embed:
    id: entity_embed
    provider: entity_embed
    status: true
    weight: -1
    settings: {  }
  filter_html:
    id: filter_html
    provider: filter
    status: false
    weight: -45
    settings:
      allowed_html: ''
      filter_html_help: true
      filter_html_nofollow: false
  filter_align:
    id: filter_align
    provider: filter
    status: true
    weight: -3
    settings: {  }
  filter_caption:
    id: filter_caption
    provider: filter
    status: true
    weight: -2
    settings: {  }
  media_embed:
    id: media_embed
    provider: media
    status: false
    weight: -39
    settings:
      default_view_mode: default
      allowed_view_modes: {  }
      allowed_media_types: {  }
  filter_url:
    id: filter_url
    provider: filter
    status: false
    weight: -43
    settings:
      filter_url_length: 72
  filter_html_image_secure:
    id: filter_html_image_secure
    provider: filter
    status: false
    weight: -41
    settings: {  }
  filter_htmlcorrector:
    id: filter_htmlcorrector
    provider: filter
    status: false
    weight: -40
    settings: {  }
  filter_html_escape:
    id: filter_html_escape
    provider: filter
    status: false
    weight: -44
    settings: {  }
  token_filter:
    id: token_filter
    provider: token_filter
    status: false
    weight: -42
    settings:
      replace_empty: false
πŸ‡ΊπŸ‡ΈUnited States jakegibs617

@cilefen not sure if it is a bug or something I am doing wrong. Are you able to replicate this?

Production build 0.69.0 2024