cache/render error when indexing Search API index

Created on 4 August 2022, over 2 years ago
Updated 1 November 2023, over 1 year ago

Reposting this here (in addition to https://www.drupal.org/project/insert_view_adv/issues/3180525#comment-14... ) in hopes of helping anyone else who ran into this issue:

I was using the insert view module and encountered this error when re-indexing a Search API index.

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /batch?id=20&op=do_nojs&op=do
StatusText: OK
ResponseText: TypeError: Argument 1 passed to Drupal\Core\Cache\CacheableMetadata::createFromRenderArray() must be of the type array, null given, called in /var/www/sandbox/vhost/web/core/lib/Drupal/Core/Render/Renderer.php on line 349 in Drupal\Core\Cache\CacheableMetadata::createFromRenderArray() (line 149 of /var/www/sandbox/vhost/web/core/lib/Drupal/Core/Cache/CacheableMetadata.php).

Following a comment from the other issue report, I uninstalled Insert View and installed Advanced Insert View instead, and now my re-indexing is working.

If others run into a similar issue, Advanced Insert View might be a good workaround.

Insert View has been a part of many of my Drupal sites for many years - thank you so much for all your work on it over the years!

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇺🇸United States kristi wachter

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • Status changed to RTBC 10 months ago
  • 🇺🇸United States gslexie

    I tested the following steps:

    • I installed a fresh Drupal instance with demo_umami profile
    • I added added drupal/insert_view to the project and enabled the module
    • Created a Content view with a single contextual filter on node ID, with a default value "Content ID from URL"
    • Add the insert_view filter the the basic HTML text format
    • Create a new basic page and add [view:test_view] to the body text
    • Run cron to rebuild the search index

    Confirmed, when running cron to build the search index, I crash with the same TypeError cited here.

    I then added the patch:

            "patches": {
                "drupal/insert_view": {
                    "search": "https://git.drupalcode.org/project/insert_view/-/merge_requests/8.patch"
                }
            },
    

    I can confirm that the patch resolved the error during cron run.

  • 🇨🇴Colombia diegoluisr

    This patch solves an issue related to search_api_solr module too, before the patch full text rendering was failing, making those fields rendering empty.

  • 🇮🇳India anandaakrishnan g a Coimbatore

    The current version of insert_view (2.1.0) does not support Drupal 11 due to the version constraint
    "drupal/core": "^8.8 || ^9 || ^10"

    To ensure compatibility with Drupal 11, I recommend updating the constraint to include:

    "^8.8 || ^9 || ^10 || ^11"
    //

    getting this issue while updating to Drupal11
    //

Production build 0.71.5 2024