Undefined function _media_gallery_get_block_columns_values()

Created on 26 December 2023, 6 months ago

Problem/Motivation

I'm getting the following error in the logs when I edit a gallery node (as simple content node 'admin/content', not media_gallery 'admin/content/media-gallery') and the result is a white screen "The website encountered an unexpected error. Please try again later.":
Error: Call to undefined function _media_gallery_get_block_columns_values() in options_allowed_values() (line 89 of /path_to_site/web/core/modules/options/options.module).
These nodes were imported from D7 to D10 with standard drush migrate:import d7_node:media_gallery and drush migrate:import d7_file, plus d7_file_entity:image:public from media_migration module (and dependencies)

Steps to reproduce

Proposed resolution

I checked the media_gallery code and indeed there is no function named _media_gallery_get_block_columns_values. I think there was a gallery block in D7 but I see no related block in D10. I have no idea this call comes from. This is a fresh D10 install with just migrated data and no custom code.

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: works as designed

Version

2.2

Component

Code

Created by

πŸ‡«πŸ‡·France erwangel

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

Comments & Activities

  • Issue created by @erwangel
  • πŸ‡«πŸ‡·France erwangel

    This seems to be a Drupal function called to get values of entity fields. I removed all media_gallery specific fields that had been created by the d7 migration such as media_gallery_block_columns, media_gallery_expose_block, media_gallery_image_info_where, media_gallery_block_rows, etc. from the Manage form display (admin/structure/types/manage/media_gallery/fields) and I can now edit gallery nodes with no problem. But is this normal behavior ? Should we consider the issue as solved ?

  • Status changed to Closed: works as designed 6 months ago
  • ivnish Poland

    Hi!

    Since 2.2.4 media gallery has own migration files. See https://www.drupal.org/project/media_gallery/issues/3314093#comment-1535... ✨ Add migration support via Migrate API Fixed

    Please rollback d7_node:media_gallery and migrate:import d7_file, plus d7_file_entity:image:public and use media gallery migrate commands

Production build 0.69.0 2024