Problem/Motivation

There is a missing dependencie on path_alias. On the installation, I have the following error :
The service "google_analytics.visibility" has a dependency on a non-existent service "path_alias.manager".

Proposed resolution

Add the dependencie in info.yml

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

Quentin Massez created an issue. See original summary.

quentin massez’s picture

StatusFileSize
new425 bytes
rosk0’s picture

Version: 4.0.0 » 4.x-dev
StatusFileSize
new406 bytes
new340 bytes

Thanks for reporting this and for the patch.

  1. +++ b/google_analytics.info.yml
    @@ -4,3 +4,5 @@ description: 'Allows your site to be tracked by Google Analytics by adding a Jav
    +  - path_alias
    

    Dependencies should be namespaced.

  2. +++ b/google_analytics.info.yml
    @@ -4,3 +4,5 @@ description: 'Allows your site to be tracked by Google Analytics by adding a Jav
    \ No newline at end of file
    

    There should be a new line at the end of the file

Fixed in the new patch.

rosk0’s picture

Title: Missing dependencie on v4. » Missing dependency on v4
StatusFileSize
new481 bytes

Adding patch that is useful for composer-patches - patch from #3 would not apply because of added by Drupal.org packaging information. I manually dropped the date from the packaging information to avoid potential future conflicts if there would be a new release before this is committed.

danyg’s picture

Status: Needs review » Reviewed & tested by the community

Despite of the last patch has failed on tests, it worked for me and dependency error has gone.

gorkagr’s picture

Last patch works for me too in couple sites I have jsut deployed. Thnks

taran2l’s picture

StatusFileSize
new407 bytes

This patch can be applied via composer patches and it should be fine here

No, it's not

taran2l’s picture

damienmckenna’s picture

Priority: Normal » Major

Bumping the priority on this as it can break site when the module is installed.

pookmish’s picture

This is a very minor change (very few lines) that would prevent installation from breaking. Can the maintainers please move this along and create a release. It is the only thing preventing using the 4+ version.

bemarlan’s picture

Posted patch is also working for me on multiple projects. D9 / PHP 8.0 sites.

jwilson3’s picture

Title: Missing dependency on v4 » Missing dependency on drupal:path_alias

This bug was breaking the following command, run from a preexisting Acquia CMS install...

drush site:install --existing-config

 You are about to:
 * DROP all tables in your 'acquia_cms_demo' database.

 Do you want to continue? (yes/no) [yes]:
 > yes

 [notice] Starting Drupal installation. This takes a while.
 [notice] Performed install task: install_select_language
 [notice] Performed install task: install_select_profile
 [notice] Performed install task: install_load_profile
 [notice] Performed install task: install_verify_requirements
 [notice] Performed install task: install_verify_database_ready
 [notice] Performed install task: install_base_system
 [notice] Performed install task: install_bootstrap_full

In CheckExceptionOnInvalidReferenceBehaviorPass.php line 86:

  The service "google_analytics.visibility" has a dependency on a non-existent service "path_alias.manager".

Applying the patch in my global composer.json solved the problem.

RTBC++

jwilson3’s picture

Title: Missing dependency on drupal:path_alias » Add dependency on drupal:path_alias

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

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

taran2l’s picture

@losewn @Rajeshreeputra - patch in #3 is the same as your MR and is already RTBC'ed ... why spending time on this ?

japerry’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

lisa.rae’s picture

Can we get a new release please? The patch to fix this has been merged for over a year!