| Comment | File | Size | Author |
|---|---|---|---|
| #50 | 3052102-revisionable-49.patch | 24.92 KB | dpi |
| #50 | interdiff-3052102-revisionable-48-49.txt | 1.14 KB | dpi |
| #48 | 3052102-48.patch | 24.93 KB | acbramley |
| Comment | File | Size | Author |
|---|---|---|---|
| #50 | 3052102-revisionable-49.patch | 24.92 KB | dpi |
| #50 | interdiff-3052102-revisionable-48-49.txt | 1.14 KB | dpi |
| #48 | 3052102-48.patch | 24.93 KB | acbramley |
Comments
Comment #2
dpiComment #3
dpiComment #4
dpiWorking from here, posting patch to date
Comment #5
sam152 commentedWondering if these keys also need to be manually installed on the entity type definition?
If you want to test this out, any entity query against linky entities should fail if these keys haven't been installed on the entity type definition.
Comment #6
jibranThis is used if the entity is translateable which linky is not so this can be removed.
Comment #7
jibranYou don't need
$update->expression('revision_created', 'changed');if you set>setInitialValueFromField('changed');for$revisionCreatedField.Comment #8
dpiWill do.
I cannot do this, check the update hook method docs.
Looking into it
Comment #9
dpiTried this immediately after a drush updatedb without clearing cache without issue.
Also Drupal status page reports no issues with entity schemas...
Comment #10
jibranLet's bump the min core version and use the new API.
Comment #11
amateescu commentedFWIW, as the author of both the new (
EntityDefinitionUpdateManager::updateFieldableEntityType()) and the old (SqlContentEntityStorageSchemaConverter) API, I chose not to use the old API for converting taxonomy terms and menu links to revisionable in core 8.6.x, and wrote the new API for 8.7.x for the reason quoted in #10.I also maintain a fairly used D8 module (Entityqueue, with ~9.000 installs) where I need to do the same conversion to revisionable, and I will bump the requirements in order to be able to use the new API :)
Comment #12
dpiThanks @amateescu, and @jibran for the encouragement,
Updated patch to use 8.7 methods, raised requirements.
Notably using set-initial-value methods seem to be useless; modified data migration path accordingly.
Comment #13
jibranThanks, for addressing the feedback. The patch is looking good.
Can we have some upgrade path tests, please?
Comment #14
dpiGonna need these fields ;)
Status report no longer complains about mismatches.
Comment #15
amateescu commentedThis isn't needed because Drupal only looks at the dependencies defined in the linky.info.yml file.
Removing it should also fix the testbot failure.
This is not needed as well, the entity update API does it for you :)
Comment #16
dpiI’m afraid I’m not seeing it.
Comment #17
jibransetInitialValueFromFieldshould set it up, rigth?We might need this because they are different field types.
Comment #18
jibranWhy is this using node function?
Comment #19
dpiPre-existing
Comment #20
jibranAddressed #15.1
#15.2 is need without table is showing default field values.
Fixed #18 and clean up the
Linky::baseFieldDefinitions()method and removed the redundent methods.Comment #21
jibranThere was ID mismatch so added update hook for that.
Comment #23
jibranI think this is causing
> [error] The entity type linky does not have an "owner" entity key.Comment #24
jibranIt might fix #23.
Comment #25
jibranAdded desc as well.
Comment #28
dpiTracking https://github.com/dpi/linky/pull/1
Many changes on 8.x-1.x today, rerolled 25 against it. No other changes.
HEAD tests also fixed so this should go green
Comment #30
dpiInteresting fails to be happening at this point in time.
Comment #31
jibranThis might fix it.
Comment #32
jibranWith PHPCS fixes.
Comment #33
jibranUpgrade tests are blocked by #3056357: Unbale to install linky with testing profile.
Comment #34
jibranFirst pass for the upgarde path.
Comment #36
jibranUpdate path test is working now.
@amateescu I commented out
linky_post_update_set_default_revisionable_data. And the failing test will show thatsetInitialValueFromFieldis not working properly. Is there something I'm missing or is it a core bug?Comment #38
amateescu commentedYeah,
setInitialValueFromField()only works during a "regular" field install operation. not during entity schema migrations like we're doing here.A workaround would be to create those fields that need initial values in a
hook_update_N()function, which always runs before to the post_update one.Comment #39
jibranReroll after the latest release.
RE #38: I like the current state
linky_post_update_make_linky_revisionable. Splitting it intohook_update_Nmeans moving bunch of stuff around so I'd say let's leave that and re-instate thelinky_post_update_set_default_revisionable_data.Comment #40
jibranNow with
--binaryComment #42
jibranMoved
linky_post_update_make_linky_revisionabletolinky_update_8102Comment #44
jibranThis should fix. Ignore #42. Interdiff is from #40.
Comment #45
acbramley commentedReroll of #44
Comment #47
jibran@acbramley, I thought you were not intrested in this issue. :D
Comment #48
acbramley commentedNow including the db fixture.
Comment #49
jibranI think the patch needs a reroll after #3097042: Drupal 9 readiness.
Comment #50
dpiFixed D9 compat.
The interdiff doesnt show it but there was a schema version entry removal for link module.
Comment #51
jibranThis not needed anymore.
Comment #53
acbramley commentedFixed on commit 🎉