Nice to have, but not a rabbithole I have time for unfortunately.

Should be fairly simple to do:

- add a Views field plugin
- subclass the core EntityLabel class
- override the methods to do the same thing as the patch at #2080745: EntityLabel Views field Plugin is basically useless - allow to use the EntityLabel field plugin for displaying the entity label of current listing
- change our views data to use our plugin
- remove the mention of the patch from the readme

Comments

joachim created an issue. See original summary.

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new109.15 KB
new5.92 KB

I totally understand what you mean with rabbithole!

Here is a workaround. It almost feels for me that we should throw away the entire core plugin. Its super useless for most cases ... Its mostly an edge case implementation.

Note: I needed some additional change to fix the notice.

dawehner’s picture

joachim’s picture

Status: Needs review » Needs work

Looks good, just a few glitches:

  1. +++ b/README.txt
    @@ -21,7 +21,3 @@ This module requires the following modules:
    -- https://www.drupal.org/node/2080745#comment-12306682
    

    The line with the patch URL needs to be taken out too.

  2. +++ b/src/Form/LicenseCreateForm.php
    @@ -151,7 +151,8 @@ class LicenseCreateForm extends FormBase implements ContainerInjectionInterface
    -        $license_type = reset($plugins);
    +        reset($plugins);
    +        $license_type = key($plugins);
    

    Unrelated change.

  3. +++ b/src/Plugin/views/field/EntityLabel.php
    @@ -0,0 +1,97 @@
    + * Field handler to display entity label optionally linked to entity page.
    

    This could do with a TODO referencing the core issue to say we'll remove this.

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new5.27 KB
new1.25 KB

Thank you for your quick review!

The line with the patch URL needs to be taken out too.

Wait, isn't that what the patch is doing?

Unrelated change.

Oh right. I tried to fix the form to use the UI for testing, but then felt back to PHP.

This could do with a TODO referencing the core issue to say we'll remove this.

Good idea

  • joachim committed 736327e on 8.x-2.x authored by dawehner
    Issue #2917449 by dawehner: Added a workaround for core EntityLabel...
joachim’s picture

Status: Needs review » Fixed

> Wait, isn't that what the patch is doing?

Ah yes, you're right. It was Dreditor's highlighting that was showing up wrong.

Committed!

dawehner’s picture

Thank you!

Status: Fixed » Closed (fixed)

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