Problem/Motivation
The module has an (undeclared) dependency on the Field UI module as it uses the \Drupal\field_ui\FuildUI class in \Drupal\entity_comparison\Entity\EntityComparison::getOverviewUrl(). As (many) sites do not have Field UI enabled in production (or should not have it enabled there) this makes the Entity Comparison module unusable for those sites.
Steps to reproduce
- Install Drupal 9
- Install, enable and configure Entity Comparison
- Disable Field UI
- Try using the comparison feature
Proposed resolution
Remove the call to \Drupal\field_ui\FieldUI::getRouteBundleParameter() by reimplementing the really simple logic of that method directly in \Drupal\entity_comparison\Entity\EntityComparison::getOverviewUrl().
Remaining tasks
- Find a way to make things work with using any code from the Field UI module
- Create MR
- Review MR
- Merge MR
User interface changes
N/A
API changes
N/A
Data model changes
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | entity-comparison-remove-dependency-on-field-ui-3256872-5.patch | 1.64 KB | ricovandevin |
Issue fork entity_comparison-3256872
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3.0.x
changes, plain diff MR !5
- 3256872-remove-dependency-on
changes, plain diff MR !4
Comments
Comment #2
ricovandevin commentedComment #6
ricovandevin commentedPatch for MR !5 attached.
Comment #8
lobodakyrylo commentedThank you ricovandevin. I had to change your patch since it didn't worked in some cases and unit tests returned errors. Anyway, it's a good point to remove Field UI dependency since the logic of this module can work without it. I added it to the 3.0.x-dev version.
Comment #9
lobodakyrylo commented