Needs work
Project:
Media entity
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
12 Mar 2018 at 19:42 UTC
Updated:
26 Jun 2018 at 15:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
freelockExample of the error thrown:
Comment #3
Anonymous (not verified) commentedThere is another problem with the extends RevisionableContentEntityForm. If you change the namespace interface you will receive the next error.
Comment #4
freelockPatch attached, also fixes fatal error from the removed RevisionableContentEntityForm.
Comment #6
freelockPatch fails because of this:
1) Drupal\Tests\media_entity\Functional\MediaUiFunctionalTest::testMediaWithOnlyOneBundle
Behat\Mink\Exception\ElementNotFoundException: Form field with id|name|label|value "edit-revision" not found.
... is there a comparable field in the ContentEntityForm, or what are we missing here?
Comment #7
bojanz commentedLook at ContentEntityForm::addRevisionableFormFields() and then compare the fields.
I see a "revision" checkbox there, so I'm unsure why the test would not be finding it.
Comment #8
johnpitcairn commentedFor anyone in this situation, it appears that pegging composer to drupal/entity 1.0-beta1 will survive the 8.4.5 to 8.5.0 update and still work, until this fix is in.
Comment #9
lvbeck commentedsame problem on drupal 8.5.0, have to rollback to entity-8.x-1.0-beta1
Comment #10
idiaz.ronceroSame here, completely unable to update Drupal to 8.5 using Composer due to this error.
(media entity is at 1.x)
Using entity-8.x-1.0-beta1 works.
Comment #11
chr.fritschComment #12
bojanz commentedI'll tag a beta3 of Entity API today that resolves this.
Comment #13
alexpottThe media entity needs to have the
show_revision_uiannotation set. And also the test needs adjusting because it is making assumptions about the url redirects and form elements that are no longer true. For example when creating a completing new entity the revision stuff is not there with the core form because it makes no sense. It is there with the entity module version afaics.The new patch in #2952495: [beta2 regression] Undo class removal, deprecate them instead fixes the media entity module and gives it some time to move to core's new API.
Comment #14
bojanz commentedI've tagged beta3 which fixes this issue.
However, the Entity API class has known issues not present in the core version, so moving to ContentEntityForm should be a priority.
Comment #15
alexpottHere's what's necessary to make the tests go green using core APIs. I think we're going to need an upgrade path here to add the revision_log to the entity form displays.
This is now a task since the entity module has reverted their API breaking changes.
Comment #16
alexpottComment #17
alexpottI've tested and actually we don't need an upgrade path. Also we can use more of the core API.
Comment #18
yang_yi_cn commentedI tried the patch in #17 but had some PHP errors after saving / re-edit a media entity. Note that I have "create new revision" set as default but there's no revision UI showing.