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

Command icon 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:

Comments

ricovandevin created an issue. See original summary.

ricovandevin’s picture

Issue summary: View changes

ricovandevin’s picture

Patch for MR !5 attached.

  • lobodacyril committed 1fcd327 on 3.0.x
    Issue #3256872 by ricovandevin: Remove dependency on Field UI module
    
lobodakyrylo’s picture

Status: Active » Fixed

Thank 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.

lobodakyrylo’s picture

Status: Fixed » Closed (fixed)