Problem/Motivation

On my Drupal 7 wimleers.com I have the following text formats in the DB and the UI:

And this results in the following DB + UI in Drupal 8 after migration:

Proposed resolution

Ensure that the status column is carried over from Drupal 7 to Drupal 8.

Remaining tasks

TBD

User interface changes

N/A

API changes

N/A

Data model changes

The destination data model is now correct, it now matches the source data model.

Release notes snippet

N/A

Comments

Wim Leers created an issue. See original summary.

longwave’s picture

wim leers’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new509 bytes
new775.26 KB

Well this turned out to be the simplest core patch I've created in a while 😇

wim leers’s picture

Priority: Normal » Major
Issue tags: +Security

Thanks, @longwave!

Marked that as a duplicate, see #3051315-2: Disabled filter formats migrated and re-enabled for details. Lifting tags and credit from that issue.

wim leers’s picture

Apparently I was unable to credit @hass. Can a core committer please do that?

wim leers’s picture

Note that @hass is the one who tagged it security. I agree with his assessment. With the D7 → D8 migration in HEAD, it's possible to use formats again in D8 that were disabled a long time ago in D7: they show up in the text format dropdown. That justifies the priority of Major which @hass set.

wim leers’s picture

Component: filter.module » migration system

Been told that I should put this in migration system :)

wim leers’s picture

Category: Task » Bug report
init90’s picture

Status: Needs review » Reviewed & tested by the community

nice fix :)

quietone’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

Sorry, but this should have a test. It looks like a test of the status value needs to be addd to the assertEntity in MigrateFilterFormatTest.php.

longwave’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
StatusFileSize
new4 KB
new4.4 KB

Added a test for the status as suggested. I also disabled the PHP code filter in the fixture so we can test this change.

quietone’s picture

@longwave, thanks the test checks both source status of '0' and '1'. Looks goo to me.

The last submitted patch, 11: 3095339-11-test-only.patch, failed testing. View results

wim leers’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, @longwave!

Re-RTBC'ing per #9 + #12. I also reviewed the test-only patch in #11.

The last submitted patch, 11: 3095339-11-test-only.patch, failed testing. View results

The last submitted patch, 11: 3095339-11-test-only.patch, failed testing. View results

heddn’s picture

StatusFileSize
new4.4 KB

Re-adding patch from #11 w/o the test only patch so RTBC testbot doesn't keep falling over on it.

  • webchick committed 798af1f on 9.0.x
    Issue #3095339 by Wim Leers, longwave, heddn, quietone: Text formats...

  • webchick committed 8ddf51b on 8.9.x
    Issue #3095339 by Wim Leers, longwave, heddn, quietone: Text formats...

  • webchick committed 0a68ef6 on 8.8.x
    Issue #3095339 by Wim Leers, longwave, heddn, quietone: Text formats...
webchick’s picture

Status: Reviewed & tested by the community » Fixed

Oh dear. :) Very nice catch!

Committed and pushed to 9.0.x; 8.9.x; 8.8.x (since I highly doubt an one-line, arguably security fix, with no BC implications is going to be controversial). Thanks!

Status: Fixed » Closed (fixed)

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