Update viewsreference_update_8103 fails if table name is too long and shortened by Drupal

Created on 22 November 2017, about 7 years ago
Updated 3 May 2024, 8 months ago

Background: If table names are too long then Drupal seems to shorten them, for example (MySQL in my case):

simple_mega_menu_revision__field_mm_embedded_view

becomes
simple_mega_menu_r__67fa896f01

In that case the update breaks with a message:
Table simple_mega_menu_revision__field_mm_embedded_view does not exist...

So the viewsreference_update_8103 should also make that transformation. Sadly I could not find out where that happens and by which function.

For my case I hacked a workaround into the update:

if($table == 'simple_mega_menu_revision__field_mm_embedded_view'){
  $table = 'simple_mega_menu_r__67fa896f01';
}

but that was just a quickfix. Does somebody know where that shortening happens?

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

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