Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
custom_block.module
Priority:
Critical
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
12 Nov 2014 at 19:17 UTC
Updated:
8 Dec 2014 at 23:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
alexpottI've move the basic block content type to the Standard profile since this is inline with the Node module and it will fail with this patch because it tries to create the body field before the storage exists. I think we should go the whole way in this issue and remove...
From the BlockContentType entity and put this functionality in the UI. We should try to avoid all side effects in configuration entities - especially those that create other configuration entities.
Comment #3
alexpottWe can stop adding body fields by default like so...
Comment #5
berdirThe component name is outdated, but comment is certainly not correct either ;)
Comment #6
alexpottThanks @Berdir.
Here's a patch the fixes all the tests. For me the only remaining question is should be introduce (or keep) some generic functionality somewhere to add the body field to block content type. And if the answer is yes - where?
Comment #8
alexpottSo it turns out migrate has a hard dependency on the basic block content type existing so we need to create one (and it's body field) through a migration. The migration tests are tricky but they caught this so huge++
Comment #10
alexpottSo I think the schema for
migrate.source.emptyis a bit tricky - we should just ignore the constants here - anything could be in there. This can be used to create anything migrate can create.Comment #11
alexpottComment #12
larowlanPutting on my list to review
Comment #13
yched commentedLooks like this needs a reroll - I reviewed on top of 55b8558.
So the three "body fields autocreated on 'bundle create' form submit" in core end up using three different patterns:
- node body: a legacy node_add_body_field_function()
- comment body: a public addBodyField() on CommentManager
- block body: an internal helper method on the BlockContentTypeForm()
That's a bit unfortunate ?
Unless I'm missing smthg, looks like having a body field isn't actually needed for that test ?
Comment #14
alexpottblock_content_add_body_field()and used it everywhere. So now node and block_content are the same - and this set of related issues has not really changed anything wrt to the difference between them and comment.Comment #15
yched commented@alexpott: thnks - then aren't there tests modified here that could simply use block_content_add_body_field() instead of receiving new verbose code ?
Other than that, looks fine to me, but I'll let @larowlan review.
Comment #17
alexpottSilly me. Didn't remove the the method on the form creating a body field.
Comment #18
alexpottRerolled - conflicted with #2346039: Add missing migrations to MigrateDrupal6Test and fix the result in core/modules/migrate_drupal/src/Tests/d6/MigrateDrupal6Test.php
Comment #19
larowlanCan't see anything wrong with this - thanks!
Comment #20
catchLooks fine.
Committed/pushed to 8.0.x, thanks!