Error when installing this module.

Created on 28 June 2023, over 1 year ago
Updated 25 July 2024, 4 months ago

I am facing the below issue when install this module.

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The service "path_alias_length.alias_storage_helper" has [error]
a dependency on a non-existent service "pathauto.alias_storage_helper"

Please check the screenshot for reference.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India revathi.b

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @revathi.b
  • 🇧🇪Belgium daften

    Hi, Do you have pathauto installed? If so, which version?

  • Status changed to Needs review over 1 year ago
  • 🇧🇪Belgium daften

    Hi,

    Please find a patch in attachment that should fix the problem. I didn't have time to test it out myself, but it basically puts all pathauto dependent functionality in a submodule.There's an update hook for existing sites that will install the new module automatically. After you apply the patch and clear the cache, it should work. If not, please report back with the problem encountered.

  • Status changed to Needs work over 1 year ago
  • 🇮🇳India revathi.b

    Hi,
    Yes, I have installed pathauto with the version of 8.x-1.1.

    For me, your patch showing an empty file. Can you please check once?

  • 🇮🇳India samit.310@gmail.com

    Hi @Revathi.B,

    I tried to reproduce it only Local, but it works at my end. Looks like it might be cache issue. Please clear the Drupal cache.

    Also check the pathauto.alias_storage_helper service should be exists in the modules/contrib/pathauto/pathauto.services.yml file.

    Thanks
    Samit K.

  • 🇮🇳India revathi.b

    Yes Samit. It is working fine.

  • 🇧🇪Belgium daften

    The patch being empty is a mistake on my part. I was trying to provide a fix quickly, but rushed it. Since the error is gone now, I'll close this issue. If it's not ok, feel free to re-open. My fix was in case pathauto wasn't installed, which could still be needed, but the folder in which I created the patch was deleted again.

  • Status changed to Closed: cannot reproduce over 1 year ago
  • 🇧🇪Belgium nightlife2008

    I'm reopening because:

    This error appears when doing a blank (re)installation.

    The path alias length module is enabled _before_ the pathauto module, which is one of its' dependencies but hasn't been added to the info.yml file...

    I've added a patch to solve this.

  • Status changed to Fixed 12 months ago
  • 🇧🇪Belgium daften

    Thank you for the patch. I don't have time to work on the original solution by splitting off pathauto dependent items to a submodule, if somebody feels like doing that, please open a new issue.

    I've accepted the patch and will release a new version.

    @nightlife2008, please keep in mind that patches should be made based on the git repository, not a downloaded version. Drupal.org adds version information, making the patch not apply fully. It was easy to fix, but could help prevent timeloss for other patches you might create :)

    Thanks for the contribution!

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

  • Status changed to Fixed 4 months ago
  • 🇧🇪Belgium nightlife2008

    Thanks for your added information, I will keep this in mind next time!

Production build 0.71.5 2024