Problem/Motivation

@param \Drupal\Core\File\FileUrlGeneratorInterface $file_url_generator does not exist in Drupal 9.2

You have requested a non-existent service "file_url_generator". Did you mean one of these: "url_generator", "features_generator"? in Drupal\Component\DependencyInjection\Container->get() (line 156 of drupal9.2/html/core/lib/Drupal/Component/DependencyInjection/Container.php).

modules/contrib/geolocation/modules/geolocation_google_maps/src/Plugin/geolocation/MapFeature/MarkerIcon.php:39:   * @param \Drupal\Core\File\FileUrlGeneratorInterface $file_url_generator
modules/contrib/geolocation/modules/geolocation_google_maps/src/Plugin/geolocation/MapFeature/MarkerIcon.php:42:  public function __construct(array $configuration, $plugin_id, $plugin_definition, FileUrlGeneratorInterface $file_url_generator) {
modules/contrib/geolocation/modules/geolocation_google_maps/src/Plugin/geolocation/MapFeature/MarkerIcon.php:44:    $this->fileUrlGenerator = $file_url_generator;
modules/contrib/geolocation/modules/geolocation_google_maps/src/Plugin/geolocation/MapFeature/MarkerIcon.php:55:      $container->get('file_url_generator')
modules/contrib/geolocation/modules/geolocation_leaflet/src/Plugin/geolocation/MapFeature/LeafletMarkerIcon.php:39:   * @param \Drupal\Core\File\FileUrlGeneratorInterface $file_url_generator
modules/contrib/geolocation/modules/geolocation_leaflet/src/Plugin/geolocation/MapFeature/LeafletMarkerIcon.php:42:  public function __construct(array $configuration, $plugin_id, $plugin_definition, FileUrlGeneratorInterface $file_url_generator) {
modules/contrib/geolocation/modules/geolocation_leaflet/src/Plugin/geolocation/MapFeature/LeafletMarkerIcon.php:44:    $this->fileUrlGenerator = $file_url_generator;
modules/contrib/geolocation/modules/geolocation_leaflet/src/Plugin/geolocation/MapFeature/LeafletMarkerIcon.php:55:      $container->get('file_url_generator')
modules/contrib/geolocation/src/Plugin/views/style/CommonMap.php:49:  public function __construct(array $configuration, $plugin_id, $plugin_definition, $map_provider_manager, $map_center_manager, $data_provider_manager, FileUrlGeneratorInterface $file_url_generator) {
modules/contrib/geolocation/src/Plugin/views/style/CommonMap.php:50:    parent::__construct($configuration, $plugin_id, $plugin_definition, $data_provider_manager, $file_url_generator);
modules/contrib/geolocation/src/Plugin/views/style/CommonMap.php:67:      $container->get('file_url_generator')
modules/contrib/geolocation/src/Plugin/views/style/GeolocationStyleBase.php:58:  public function __construct(array $configuration, $plugin_id, $plugin_definition, $data_provider_manager, FileUrlGeneratorInterface $file_url_generator) {
modules/contrib/geolocation/src/Plugin/views/style/GeolocationStyleBase.php:62:    $this->fileUrlGenerator = $file_url_generator;
modules/contrib/geolocation/src/Plugin/views/style/GeolocationStyleBase.php:74:      $container->get('file_url_generator')

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

SocialNicheGuru created an issue. See original summary.

socialnicheguru’s picture

Geolocation 8.x-3.7 is compatible with Drupal 9.2

socialnicheguru’s picture

christianadamski’s picture

Status: Active » Postponed (maintainer needs more info)

Isn't Drupal 9.2 End-Of-Life already?

Oh, Security support til 15.6.'22.

Hmm, Is it worth for 2 months? You can just stick to 3.7?

tostinni’s picture

The problem seems to also be that this release is marked compatible 8.9 too which will cause troubles when trying to upgrade a Drupal 8.9 to 9.3

socialnicheguru’s picture

Status: Postponed (maintainer needs more info) » Active

so either mark 3.8 as compatible with 9.3+
or changes can be made to make it backward compatible.

socialnicheguru’s picture

(and I LOVE this module. the work that you do is awesome.)

christianadamski’s picture

Yeah, you're all right. Kinda angry on myself for not having caught that early

christianadamski’s picture

Status: Active » Needs work

Caused by #3265778: Remove deprecated code.

Steps necessary:
- Revert that commit
- Add specific versioning to composer.json
- Release new version compatible for 9.2
- Up requirements in composer.json to 9.3 for compatibility and safe updating
- Re-Apply commit
- Release new version

christianadamski’s picture

Added auto-testing on commit for current security release (9.2 right now). See https://www.drupal.org/node/241478/qa

  • 75617a5 committed on 8.x-3.x
    Issue #3274786 by ChristianAdamski: file_url_generator is in Drupal 9.3...
christianadamski’s picture

Status: Needs work » Fixed

Released new version that shows green for PHP 7.3 & Drupal 9.2

flocondetoile’s picture

I don't see in your commit changes about protected FileUrlGeneratorInterface $fileUrlGenerator in /src/Plugin/views/style/GeolocationStyleBase.php which break php7.3 compatiblity ?

EDIT: ok, it's in another revert commit

Status: Fixed » Closed (fixed)

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

peterwcm’s picture

For D8 sites, the up requirements in composer doesn't match with the module info. The module info still indicates that it should work with Drupal: ^8.7.7 || ^9. So D8 sites can still only get 3.8 which broke the site and have to manually pin the module at 3.7