The "instagram" plugin does not exist

Created on 8 May 2023, about 2 years ago
Updated 3 October 2023, almost 2 years ago

Problem / Motivation

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "instagram" plugin does not exist. Valid plugin IDs for Drupal\media\MediaSourceManager are: audio_file, file, image, oembed:video, video_file, oembed:instagram, twitter, video_embed_field in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of /app/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).

Steps to reproduce

Update from v2 to v3, export config changes.

It's not clear if I'm missing something in the update procedure, I understand that there was a similar issue reported ( πŸ› Plugin 'InstagramEmbedCode' does not exist error Fixed ). I'm wondering if there is a chicken and egg problem happening for me since this was an update, I'll looking at it myself, but I wanted to add it here for visibility. My current workaround is drush eval "require 'modules/contrib/media_entity_instagram/media_entity_instagram.post_update.php'; media_entity_instagram_post_update_change_source_name();", but of course I shouldn't have to do that after every deployment etc.

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States stephenplatz Greenbank, WA

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

Comments & Activities

  • Issue created by @stephenplatz
  • πŸ‡ΊπŸ‡ΈUnited States damienmckenna NH, USA

    Ran into this problem after running the update script, it's like there's a key_value item somewhere that still keeps the old plugin name.

  • πŸ‡ΊπŸ‡ΈUnited States damienmckenna NH, USA

    Note: the problem I ran into was when I was trying to delete the Instagram media type, but just updating the site seemed ok.

  • πŸ‡ΊπŸ‡ΈUnited States grgcrlsn321

    Ran into the same issue as @DamiemMcKenna when updating 2.0 -> 3.0. After running the drush eval command site started working again.

  • πŸ‡¨πŸ‡¦Canada bbombachini London, ON

    We had the same issue updating from 2.0 -> 3.0 and running the drush eval cmd helped although I had the following warnings so I'm not sure if it's doing anything:

    [warning] Trying to access array offset on value of type null media_entity_instagram.post_update.php:40
    [warning] Trying to access array offset on value of type null media_entity_instagram.post_update.php:61
    

    I also noticed that I had this error before the media_entity_instagram update hook that replaces instagram plugin by oembed:instagram and that might be related with the problem.

Production build 0.71.5 2024