Problem/Motivation

I got this error when running the migration. Any ideas?

TypeError: Argument 3 passed to Drupal\views\Plugin\views\PluginBase::init() must be of the type array or null, string given, called in /Users/gregb5/Sites/lib9events/web/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php on line 1128 in /Users/gregb5/Sites/lib9events/web/core/modules/views/src/Plugin/views/PluginBase.php on line 137 #0 /Users/gregb5/Sites/lib9events/web/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php(1128): Drupal\views\Plugin\views\PluginBase->init(Object(Drupal\views\ViewExecutable), Object(Drupal\views\Plugin\views\display\DefaultDisplay), '')

Comments

Greg Boggs created an issue. See original summary.

greg boggs’s picture

Issue summary: View changes

This error happens when you export a view for a display type that doesn't exist in D9.

greg boggs’s picture

After improving some error checking in core, I get the migration to run with some results.

[error] A valid cache entry key is required. Use getAll()

[error] The "date_default" plugin does not exist.

[error] The "taxonomy_term_reference_plain" plugin does not exist.

The "taxonomy_term_reference_link" plugin does not exist.

The configuration property display.default.display_options.filters.machine_name.value.location doesn't exist.
(This error repeats for all content types references in views)

The configuration property display.default.display_options.filters.type.value.image doesn't exist.

The "text_plain" plugin does not exist.

The "node" plugin does not exist.

The "taxonomy_term" plugin does not exist.

entityreference plugin does not exist.

The "entity_view" plugin does not exist.

greg boggs’s picture

Running this migration as is will be a fatal error that's unrecoverable because once a view is migrated, the site is unloadable.

sundhar’s picture

Assigned: Unassigned » sundhar
Status: Active » Closed (won't fix)

Hi Greg Boggs,

  1. First, install the site with standard profile. (This profile enables default plugins like node,text_plain,date_default,taxonomy_term_reference_plain,entity_view, etc....)
  2. Then enable the migrate, migrate drupal, migrate drupal ui, migrate plus and then views_migration module
  3. Config your drupal 7 database in Drupal 8 upgrade /upgrade page
  4. Then, check with drush migrate:status in your terminal
  5. Import Drupal 7 views with drush migrate:import d7_views_migration
greg boggs’s picture

My site has the standard plugins installed from the standard profile.

greg boggs’s picture

Status: Closed (won't fix) » Active
greg boggs’s picture

I believe some of the plugin names got updated from D7 to D9. But, I'm just guessing. I'll work on this some more. If you're having trouble replicating this because your source database has no broken views in it, create a view in D7 with a plugin you don't have in D9.

damienmckenna’s picture

Assigned: sundhar » Unassigned

sundhar’s picture

Status: Active » Needs review
StatusFileSize
new4.6 KB

Yes correct Greg boggs,

some of the plugin names not updated from D7 to D9.

so, we re-assign default drupal views plugin for unavailable plugins.

greg boggs’s picture

You are a very fast programmer! I'll give it a test.

greg boggs’s picture

Ok! No more null error and 10 of 53 views migrated! There are still a few plugin name mismatches.

This comment might have some useful code in it for us:

https://www.drupal.org/project/drupal/issues/2456259#comment-10543118

The "date_default" plugin does not exist. (This needs to be datetime_default)
The "taxonomy_term_reference_link" plugin does not exist. (I don't know what this should be)
The "taxonomy_term" plugin does not exist. (I don't know about this)
The "node" plugin does not exist. (not sure here either)
The "entityreference_label" plugin does not exist. (this needs to become entity_reference_label)
The "taxonomy_term_reference_plain" plugin does not exist. (This becomes entity_reference_label), I believe.
The "text_plain" plugin does not exist. (Unsure here maybe text_default?)
The configuration property display.default.display_options.filters.type.value.performer doesn't exist. (performer is one of my content types referenced in the view)

Valid plugin IDs for Drupal\Core\Field\FormatterPluginManager are: comment_default, comment_username, comment_permalink, datetime_plain, datetime_custom, datetime_time_ago, datetime_default, daterange_custom, daterange_plain, daterange_default, feeds_item_imported, feeds_uri_link, feeds_item_url, feeds_item_target_entity_view, feeds_item_target_id, feeds_item_target_label, feeds_item_guid, file_default, file_rss_enclosure, file_extension, file_filemime, file_uri, file_url_plain, file_video, file_audio, file_table, file_size, file_link, image, image_url, link, link_separate, list_key, list_default, entity_reference_rss_category, text_default, text_summary_or_trimmed, text_trimmed, user_name, author, entity_reference_entity_view, timestamp, entity_reference_entity_id, entity_reference_label, boolean, number_decimal, language, basic_string, string, timestamp_ago, uri_link, number_integer, number_unformatted, email_mailto

sundhar’s picture

some of the field formatters not available in D8 or D9
so, we re-assign default drupal field formaters for unavailable field formatters.

  • Jeya sundhar committed f442872 on 1.0.x
    Issue #3209016 by Jeya sundhar: Argument 3 must be array or null
    
sundhar’s picture

Title: Argument 3 must be array or null » Argument Plugins needs to configure
Status: Needs review » Needs work
sundhar’s picture

StatusFileSize
new12.34 KB

Argument, & Argument validate type plugins configured.

sundhar’s picture

Version: 1.0.5 » 1.1.x-dev
Status: Needs work » Needs review

  • Jeya sundhar committed ccced60 on 1.1.x
    Issue #3209016 by Jeya sundhar: Argument Plugins needs to configure
    

  • Jeya sundhar committed ccced60 on 1.0.x
    Issue #3209016 by Jeya sundhar: Argument Plugins needs to configure
    
sundhar’s picture

StatusFileSize
new1.23 KB

changes:
default_argument_options is only array or null , not a string.
pluginList variable access with $this

  • Jeya sundhar committed e4c7e02 on 1.1.x
    Issue #3209016 by Jeya sundhar: Argument Plugins needs to configure
    
sundhar’s picture

Status: Needs review » Closed (cannot reproduce)
damienmckenna’s picture

Status: Closed (cannot reproduce) » Fixed

I think "fixed" is the correct status, given changes were committed. FYI the status of any "fixed" issue will automatically change to "Closed (fixed)" after two weeks, so there's no need to manually change it.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

sundhar’s picture

Thankyou for testing @Greg Boggs,
Thankyou for guidance @DamienMcKenna