1. create a view display
2. select RSS feed as the format
3. select field as the style setting
4. add fields to the field portion of the view config
5. When you click on "save" there is a Js console error
6. in the log:

https://mysite/admin/structure/views/ajax/handler/upcoming_events/feed_1...|

https://mysite/admin/structure/views/view/upcoming_events/edit/feed_1|1||Error: Unsupported operand types in Drupal\views\Plugin\views\field\FieldPluginBase->getElements() (line 322 of drupal8.6/html/core/modules/views/src/Plugin/views/field/FieldPluginBase.php)

It does not matter which field that I add, the JS error always happens.

Comments

SocialNicheGuru created an issue. See original summary.

Version: 8.6.16 » 8.6.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Version: 8.6.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Branches prior to 8.8.x are not supported, and Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
finne’s picture

Status: Active » Closed (cannot reproduce)

I tried to reproduce the steps by installing a clean D9.4.x-dev and doing

1. create a view display (of the feed type)
2. select field as the style setting
3. add fields to the field portion of the view config
4. click on "save"

I don't see any error in the log or the JS console.

Looking at line 323 of FieldPluginBase.php I can see why this error might occur:
$elements += \Drupal::config('views.settings')->get('field_rewrite_elements');

If the field_rewrite_elements config item does not return an array. That should always be the case, unless an invalid config is somehow loaded.

If you can still reproduce this on a clean D9 install please feel free to reopen this issue.

finne’s picture

Issue tags: +Bug Smash Initiative