When creating a view on the content type of a search api Index,
trying to add a 'leaflet attachment' display throws this error.

Error: Call to a member function id() on boolean in Drupal\leaflet_views\Plugin\views\row\LeafletMarker->init() (line 182 of modules/contrib/leaflet/modules/leaflet_views/src/Plugin/views/row/LeafletMarker.php).

Related issues:
https://www.drupal.org/project/leaflet/issues/2951256
https://www.drupal.org/project/leaflet/issues/2975651

Comments

vierlex created an issue. See original summary.

  • itamair committed 277c58e on 8.x-1.x
    Issue #3046841:  LeafletAttachment @ViewsDisplay...
itamair’s picture

Status: Active » Closed (won't fix)
vierlex’s picture

Status: Closed (won't fix) » Active

I am sorry to report, but the error is still there with the latest commit.
Also why is it a "wont fix"?

itamair’s picture

@vierlex sorry ... I commented on this, but didn't save and send it probably.

When I took this module in its D8 alpha state the following Leaflet Views plugins where there as drafted, and totally unusable:

- modules/leaflet_views/src/Plugin/views/display/LeafletAttachment.php (@ViewsDisplay);
- modules/leaflet_views/src/Plugin/views/row/LeafletMarker.php (@ViewsRow);
- modules/leaflet_views/src/Plugin/views/style/Leaflet.php (@ViewsStyle);

and they still are now.
I couldn't fix them, both because I din't have time and also because I couldn't figure out their original (requested) function, and still cannot.

In the last commit (and Leaflet 8.x-1.5 version) I made them hidden from the UI, with this annotation index: no_ui = TRUE,
as really they are buggy and un-usable at the moment, and would need deep review, refactoring, fix.
But I am not going to spend my time on that at the moment ...
That's why this won't fix.

You can start from their actual state and fix them, deploying a well tested, php/drupal 8 coding compliant and not regressive patch, if you can.
And then reopen this issue ...
Or, probably more opportunely, even open a new Feature Request on them.

itamair’s picture

Status: Active » Closed (won't fix)
vierlex’s picture

Thank you very much for the clarification!
I see what I can do.