πŸ‡ΊπŸ‡ΈUnited States @djmymy

Account created on 5 June 2018, over 6 years ago
#

Recent comments

πŸ‡ΊπŸ‡ΈUnited States djmymy

Thanks batkor! We had the same issue. Your patch worked!

πŸ‡ΊπŸ‡ΈUnited States djmymy

I got the same issue, I noticed when i do a clean content type and just add an Image field, and I go under "Manage Display" and disable it, it automatically sets it to "Field Image Style Formatter" even though this is not an Image Style Field. When I try to change it keeps reverting back to "Field Image Style Formatter". This gave me the same error as above.

1. New Content Type
2. Added Reference > Image
3. Disabled it under "Manage Display"
3. Even though its Disabled the formatter is "stuck" under "Field Image Style Formatter" (there's no Image Style Field being called on this content type, so I think that's why it's giving an error?)

πŸ‡ΊπŸ‡ΈUnited States djmymy

Hi jsobiecki,

So we noticed that when we updated from 1.x to 2.x during our migration from Drupal 8.x to 9.x, it didn't create those columns in the database. So I tried it again without forcing the creation of the columns and merged your request, and I got this. Here's our spec

Drupal 9.5.3, PHP 8.0.13, MySQL 5.7.36

drush updb
 -------------- ----------- --------------- -----------------------------------
  Module         Update ID   Type            Description
 -------------- ----------- --------------- -----------------------------------
  translatable   9002        hook_update_n   9002 - Make sure that database
  _menu_link_u                               and entities definition are in
  ri                                         sync.
  translatable   9003        hook_update_n   9003 - Set the overridden link
  _menu_link_u                               options to the same as the parent
  ri                                         link.
 -------------- ----------- --------------- -----------------------------------


 Do you wish to run the specified pending updates? (yes/no) [yes]:
 > yes

>  [notice] Update started: translatable_menu_link_uri_update_9002
>  [notice] Update completed: translatable_menu_link_uri_update_9002
>  [notice] Update started: translatable_menu_link_uri_update_9003
>  [error]  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'mlcd.link_override__options' in 'field list': SELECT "mlcd"."id" AS "id", "mlcd"."link__options" AS "link__options", "mlcd"."link_override__options" AS "link_override__options"
> FROM
> "menu_link_content_field_revision" "mlcd"; Array
> (
> )
>
>  [error]  Update failed: translatable_menu_link_uri_update_9003
 [error]  Update aborted by: translatable_menu_link_uri_update_9003
 [error]  Finished performing updates.
πŸ‡ΊπŸ‡ΈUnited States djmymy

Hi guys,
So my coworker noticed field columns were not created on the database when we updated version 2.x: link_override__uri, link_override__title, and link_override__options. So he created a simple custom module and added this. Once those tables were created, everything worked.

function custom_entity_update_update_9010() {
    $link_override__uri = [
      'type' => 'varchar',
       'length' => 255,
       'not null' => FALSE,
       'default' => ''
       ];
    $link_override__title = [
       'type' => 'varchar',
       'length' => 255,
       'not null' => FALSE,
       'default' => ''
       ];
    $link_override__options = [
       'type' => 'blob',
       'size' => 'big',
       'not null' => FALSE
       ];
    $database = \Drupal::database();
    $schema = $database->schema();

    $schema->addField('menu_link_content_field_revision', 'link_override__uri', $link_override__uri);
    $schema->addField('menu_link_content_field_revision', 'link_override__title', $link_override__title);
    $schema->addField('menu_link_content_field_revision', 'link_override__options', $link_override__options);
}
πŸ‡ΊπŸ‡ΈUnited States djmymy

Thank you @drOptimum!! I checked the dir configs and that solved the problem. Thanks again!

πŸ‡ΊπŸ‡ΈUnited States djmymy

Hi @jsobiecki,
I did these steps.

1. Because the module in Drupal project is missing the .install file I did a 'git clone https://git.drupalcode.org/project/translatable_menu_link_uri.git' inside the contrib module folder.

2. I then cd inside the translatable menu link folder and ran this command:

git fetch "https://git.drupalcode.org/issue/translatable_menu_link_uri-3259442.git" '3259442-notice-undefined-index'
git checkout -b 'translatable_menu_link_uri-3259442-3259442-notice-undefined-index' FETCH_HEAD

3. I noticed the change with the updates you did on the .install so I ran 'drush updb'

4. Now I got this:

drush updb
 --------------- ----------- --------------- --------------------------------
  Module          Update ID   Type            Description
 --------------- ----------- --------------- --------------------------------
  translatable_   9002        hook_update_n   9002 - Make sure that database
  menu_link_uri                               and entities definition are in
                                              sync.
  translatable_   9003        hook_update_n   9003 -
  menu_link_uri
 --------------- ----------- --------------- --------------------------------


 Do you wish to run the specified pending updates? (yes/no) [yes]:
 > yes

>  [notice] Update started: translatable_menu_link_uri_update_9002
>  [notice] Update completed: translatable_menu_link_uri_update_9002
>  [notice] Update started: translatable_menu_link_uri_update_9003
>  [error]  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'mlcd.link_override__options' in 'field list': SELECT "mlcd"."id" AS "id", "mlcd"."link__options" AS "link__options", "mlcd"."link_override__options" AS "link_override__options"
> FROM
> "menu_link_content_field_revision" "mlcd"; Array
> (
> )
>
>  [error]  Update failed: translatable_menu_link_uri_update_9003
 [error]  Update aborted by: translatable_menu_link_uri_update_9003
 [error]  Finished performing updates.
πŸ‡ΊπŸ‡ΈUnited States djmymy

hi @jsobiecki,
I noticed something strange when I noticed inside the folder the translatable_menu_link_uri.install file is missing. I ran composer again and even tried to download the file zip and tar file and noticed that one file was missing in the installation. When I forced added it and ran your commit as a patch I got this error:

drush updb
 ---------------------------- ----------- --------------- -------------
  Module                       Update ID   Type            Description
 ---------------------------- ----------- --------------- -------------
  translatable_menu_link_uri   9003        hook_update_n   9003 -
 ---------------------------- ----------- --------------- -------------


 Do you wish to run the specified pending updates? (yes/no) [yes]:
 > yes

>  [notice] Update started: translatable_menu_link_uri_update_9003
>  [error]  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'mlcd.link_override__options' in 'field list': SELECT "mlcd"."id" AS "id", "mlcd"."link__options" AS "link__options", "mlcd"."link_override__options" AS "link_override__options"
> FROM
> "menu_link_content_field_revision" "mlcd"; Array
> (
> )
>
>  [error]  Update failed: translatable_menu_link_uri_update_9003
 [error]  Update aborted by: translatable_menu_link_uri_update_9003
 [error]  Finished performing updates.
πŸ‡ΊπŸ‡ΈUnited States djmymy

Thanks @miiimooo! Unfortunately no luck, I also tried to revert but due to being on the latest drupal 9 and PHP 8.1 it won't let me go back. I tried the patches but get errors. When I tried a drush entup I got this. Going to keep investigating. Thanks again though! I'll def update the solution here if I find it.

Exception thrown while performing a schema update. SQLSTATE[42000]: Syntax error or access violation: 1072 Key column 'link_override__uri' doesn't exist in table: ALTER
   TABLE "menu_link_content_field_revision" ADD INDEX `menu_link_content_field__link_override__uri` (`link_override__uri`(30)); Array
  (
  )


SQLSTATE[42000]: Syntax error or access violation: 1072 Key column 'link_override__uri' doesn't exist in table
πŸ‡ΊπŸ‡ΈUnited States djmymy

Hi, so sorry just got notification. I believe the previous developer used 1.x version, and currently, it is under 2.x. Still have the issue. I tried the drush entity update, but it did not work.

Production build 0.71.5 2024