Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
configuration entity system
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Dec 2013 at 19:05 UTC
Updated:
29 Jul 2014 at 23:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
alexpottComment #2
alexpottThe relevant parts of those patches merged into one.
Comment #4
alexpottDrupal\custom_block\Tests\CustomBlockTranslationUITestdoes not fail locally requesting a retest.Comment #5
alexpott2: 2148211.1.patch queued for re-testing.
Comment #6
alexpott@swentel mentioned that the patch is missing the comment body field creation.
Comment #7
swentel commentedGood to go!
Comment #8
webchickI'd like to commit this but I do not understand at all what's happening here. Maybe tests would help. But to me...
postSave()is effectively a hook, acting just after the block is saved. Thenif (!$update)is basically saying "if it's a new block.." So far so good. But if the block is actively synching, andcustom_block_add_body_field($this->id)is skipped, when does the code go back and add it again? Does CMI re-issue a postSave() again once the block is imported?Comment #9
swentel commented@webchick
When config is importing, we want the actual configuration to be imported. In case someone created a block type without a body field on his dev site (ie, the user has removed the body field), and only kept an image field, we don't want to suddenly see a body field popping up on the production site because that's not what the user wanted.
We introduced this isSyncing flag in #2069373: Race conditions on import if CUD on ConfigEntity A triggers changes in ConfigEntity B which tests it for the body field on content types. I talked with Alex asking whether we need additional tests here too, but he argued that we'll tests this more thoroughly, to begin with in #2108813: Add fancier config import/export test scenario. So this is still good to go imo.
Comment #10
webchickAll right, I still don't totally get it but let's give it a shot. :)
Committed and pushed to 8.x. Thanks!