Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 296300

Editing a view leaves old keys hanging, results in invalid schema

$
0
0

Problem/Motivation

Editing a View's Field's Formatter and exporting the view's configuration does not show the changes to the Formatter.

Steps to Reproduce

From fresh install / db Go to http://localhost/admin/structure/views
Create a new View called "test". Edit the new View and add a Body Field. Change the Formatter from Default to "Summary or trimmed". Change the Trimmed limit to 100. Apply, then Save.
Now Edit the Field, change the Formatter back to Default. Apply, then Save.
Use the Config Inspector contrib module. (drush dl config_inspector; drush en config_inspector)
Go to http://localhost/admin/config/development/configuration/inspect
Scroll down to views.view.test. Boom, shows error.

Proposed resolution

Need a patch.

Remaining tasks

* Nail down steps to reproduce
* Update tests to show failure
* Patch
* Review

User interface changes

None

API changes

None

Data model changes

Should not be needed

Original report by bojanz

dawehner wanted an imperfect bug report :P

Two ways I managed to reproduce this:
1) Changed the formatter of a field. The settings of the previous formatter stayed in the export. Boom, invalid schema.
2) Cloning a view, then editing the menu settings resulted in some old keys persisting.

#1 is worth chasing at least. No clue what's causing it at this point.


Viewing all articles
Browse latest Browse all 296300


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>