We no longer need to list entity_reference as a dependency because entity_reference is no longer a module. With entity_reference listed as a dependency for entity_reference_revisions, drush will enter an infinite install loop. So we should remove the dependency.

But this issue has a larger impact as we not recieve this error upon adding fields to new paragraph types:

Fatal error: Class 'Drupal\entity_reference\ConfigurableEntityReferenceItem' not found in /var/www/drupal/modules/contrib/entity_reference_revisions/src/Plugin/Field/FieldType/EntityReferenceRevisionsItem.php on line 44

I believe the related change record for this late-break change that got in right before RC1 is this:

...
Actually there is no change record but here's the issue that made the change:
#2429191: Deprecate entity_reference.module and move its functionality to core

The prescribed solution for the error we got is to replace Drupal\entity_reference\ConfigurableEntityReferenceItem with Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem

Comments

cosmicdreams created an issue. See original summary.

cosmicdreams’s picture

Title: D8: entity_reference no long needed as dependency » D8: entity_reference no longer needed as dependency
cosmicdreams’s picture

Title: D8: entity_reference no longer needed as dependency » D8: entity_reference not a module anymore
Issue summary: View changes
cosmicdreams’s picture

I'll try to submit a patch for this tomorrow but if I simply make the replacement above in drupal/modules/contrib/entity_reference_revisions/src/Plugin/Field/FieldType/EntityReferenceRevisionsItem.php it works again.

berdir’s picture

Yes, it is deprecated. But it should still work fine, the module is hidden and it should be possible to install it.

If it's not possible with drush, then that is IMHO a bug in drush.

Doesn't mean that we shouldn't fix it, of course.

berdir’s picture

$ drush en entity_reference_revisions
The following extensions will be enabled: entity_reference_revisions, entity_reference
Do you really want to continue? (y/n): y
entity_reference was enabled successfully.                                                                                                                                                                [ok]
entity_reference_revisions was enabled successfully.             

So.. that seems to work fine for me?

sasanikolic’s picture

Status: Active » Needs review
StatusFileSize
new374 bytes

Status: Needs review » Needs work

The last submitted patch, 7: d8_entity_reference-2583737-7.patch, failed testing.

cosmicdreams’s picture

StatusFileSize
new1.76 KB

#7: The fix is one step more than that.

cosmicdreams’s picture

#6: Yes, without the replacement of ConfigurableEntityReferenceItem it does install properly. HOWEVER, as soon as you try to add a field to a paragraph it blows up.

sasanikolic’s picture

Status: Needs work » Needs review
StatusFileSize
new1.76 KB
new1.39 KB

Second try. :)

berdir’s picture

Status: Needs review » Reviewed & tested by the community

Only if you manage to install entity_reference_revisions without entity_reference (with the patch in #6 for example).

Otherwise it still works, using the deprecated module and class. That was the point of keeping the module hidden like that.

We have passing tests in #2582961: Broken in Drupal 8 RC1 that proves that :)

But we want to get rid of deprecated usage, so no need to argue about this further ;)

The last submitted patch, 7: d8_entity_reference-2583737-7.patch, failed testing.

cosmicdreams’s picture

@Berdir, Why does #11 pass the tests and #7 didn't?

RTBC++

  • jeroen.b committed da25d87 on 8.x-1.x authored by sasanikolic
    Issue #2583737 by sasanikolic: D8: entity_reference not a module anymore
    
jeroen.b’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, pushed to dev!

Status: Fixed » Closed (fixed)

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

ws.agency’s picture

Can we get new RC released? Current one is unusable because of this issue!

miro_dietiker’s picture

ERR long released RCs since this issue was committed.