Ajax callback is empty or not callable error

Created on 5 January 2023, almost 2 years ago
Updated 7 February 2023, almost 2 years ago

Problem/Motivation

When we click on Live Preview button on node edit page or layout builder page, we get the following error:

Symfony\Component\HttpKernel\Exception\HttpException: The specified #ajax callback is empty or not callable. in Drupal\Core\Form\FormAjaxResponseBuilder->buildResponse() (line 67 of core/lib/Drupal/Core/Form/FormAjaxResponseBuilder.php).

Steps to reproduce

  • Open Node edit page
  • Click on Live Preview
  • Ajax callback fails and we get above error message in network tab. In some instance it also triggers entity browser for first media element if it is present in node edit form.

Proposed resolution

Currently the code is replacing the default preview button with custom code block which is adding ajax callback. Instead of doing that we can add ajax callback to the preview button without replacing it.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

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

Comments & Activities

Not all content is available!

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

Production build 0.71.5 2024