cache/render error when indexing Search API index

Created on 4 August 2022, over 2 years ago
Updated 13 September 2024, 2 months 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

RTBC

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 about 1 year ago
  • Status changed to RTBC 7 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.

  • πŸ‡ΊπŸ‡ΈUnited States gslexie
  • πŸ‡¨πŸ‡΄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.

Production build 0.71.5 2024