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!

CommentFileSizeAuthor
#8 Screenshot_19.png9.39 KBanandaakrishnan-ga
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Kristi Wachter created an issue. See original summary.

igor mashevskyi’s picture

Assigned: Unassigned » igor mashevskyi
igor mashevskyi’s picture

Assigned: igor mashevskyi » Unassigned
Status: Active » Needs review

gslexie’s picture

Status: Needs review » Reviewed & tested by the community

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.

gslexie’s picture

diegoluisr’s picture

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.

anandaakrishnan-ga’s picture

StatusFileSize
new9.39 KB

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
//

  • robloach committed 5a8fb112 on 2.0.x authored by gslexie
    Issue #3301896 by Ihor Mashevskyi: Fixed error if view can't be rendered...

  • robloach committed 9f466714 on 3.0.x authored by gslexie
    Issue #3301896 by Ihor Mashevskyi: Fixed error if view can't be rendered...
robloach’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.