Problem/Motivation

Error:

TypeError: Drupal\geolocation\MapFeatureBase::__construct(): Argument #7 ($libraryDiscovery) must be of type Drupal\Core\Asset\LibraryDiscovery, Drupal\Core\Asset\LibraryDiscoveryCollector given.
In this list of files:

/geolocation/modules/geolocation_geometry/src/Plugin/Validation/Constraint/GeometryConstraint.php
/geolocation/modules/geolocation_geometry/src/Plugin/Validation/Constraint/GeometryConstraintValidator.php
/geolocation/modules/geolocation_leaflet/src/Plugin/geolocation/LayerFeature/LeafletMarkerIcon.php
/geolocation/src/LayerFeatureBase.php
/geolocation/src/MapFeatureBase.php
/geolocation/src/Plugin/geolocation/MapFeature/ControlCustomGeocoder.php
/geolocation/src/Plugin/geolocation/MapFeature/ControlTileLayers.php

Core "library.discovery" service is an instance of LibraryDiscoveryCollector, but these classes expects a Library discovery.

Drupal Core: 11.1.0
Geolocation: 4.0.0-alpha7

Steps to reproduce

With the versions above, create a field and enter in display settings of the field.

Proposed resolution

Use LibraryDiscoveryInterface instead of LibraryDiscovery

Patch attached.

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

toleillo created an issue. See original summary.

trickfun’s picture

Same error for me.

kumareshbaksi made their first commit to this issue’s fork.

kumareshbaksi’s picture

Status: Active » Needs review

Made the changes. MR 88, please review.

sleitner’s picture

Version: 4.0.0-alpha7 » 4.x-dev
Status: Needs review » Reviewed & tested by the community

Works for me

  • kumareshbaksi committed ef690a8a on 4.x
    Issue #3494936: Fixed the issue of Conflict with library discovery core...
christianadamski’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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