Problem/Motivation

When trying to enable this module using drush on a Drupal 9.2.0 with Paragraphs 8.x-1.12 , I get the following error:

In CheckExceptionOnInvalidReferenceBehaviorPass.php line 86:
                                                                                                           
  The service "paragraphs_report.report" has a dependency on a non-existent service "path.alias_manager".  

This doesn't happen for me on Drupal 8.9.17 with Paragraphs 8.x-1.8

Proposed resolution

Replace deprecated path.alias_manager with path_alias.manager

Comments

redsky created an issue. See original summary.

redsky’s picture

anacolautti’s picture

Status: Active » Needs review
StatusFileSize
new1.19 KB

I tested out the suggestion from @redsky on drupal 9.2 and It worked for me. Please someone else review it as well.

anacolautti’s picture

StatusFileSize
new913 bytes

my bad, I generated last patch wrong.

huijse’s picture

Works

huijse’s picture

Status: Needs review » Reviewed & tested by the community
eric_a’s picture

Version: 8.x-1.0 » 8.x-1.x-dev
Status: Reviewed & tested by the community » Needs work

The path_alias.manager service exists since 8.8.0 *but* the providing core module is no longer a required one. So:

  • The dependency needs to be added to info.yml files for modules that use this service.
  • The module should require core ^8.8, which in turn means removing the core property in the info.yml files.

Change records:

eric_a’s picture

Status: Needs work » Needs review
StatusFileSize
new1.32 KB

Here's an updated patch that addresses #7.

It applies to both the HEAD of 8.x-1.x-dev and to the 8.x-1.0 release build artefact. To make it apply to both I deliberately ordered the new dependency wrongly in the info.yml file. If this gets committed it would be best to fix the order before commit.

@huijse, does this still work for you?

eric_a’s picture

Issue tags: +Drupal 9 readiness
eric_a’s picture

Assigned: Unassigned » eric_a
Status: Needs review » Needs work

Oops, there are still references to \Drupal\Core\Path\AliasManager.
Will fix and I'll also provide an interdiff between #4 and the next patch.

eric_a’s picture

Status: Needs work » Needs review
StatusFileSize
new483 bytes
new1.12 KB
new1.59 KB
new2.29 KB

Like in #8, this applies to both the HEAD of 8.x-1.x-dev and to the 8.x-1.0 release build artefact. To make it apply to both I deliberately ordered the new dependency wrongly in the info.yml file. If this gets committed it would be best to fix the order before commit.

eric_a’s picture

Assigned: eric_a » Unassigned
eric_a’s picture

Maintainers, please credit @web-beest for pinging me about the references to deprecated \Drupal\Core\Path\AliasManager.

xaa’s picture

hi, I confirm patch #11 is working. thank you

robert ngo’s picture

Status: Needs review » Reviewed & tested by the community

The patch from #11 is working correctly.
Thank you

aisforaaron’s picture

Status: Reviewed & tested by the community » Fixed

Merged in, thanks!

eric_a’s picture

@aisforaaron, thanks for committing this and thanks for releasing 1.1!

I'm reviewing all changes since f156ac5 and noticed that your commit associated with the service fix has also reverted an earlier bug fix commit. Which worries me a little.
Commit 23434b1 has reverted the checks and error message in batchSetup() from commit f156ac5.

Was this done deliberately or an accident?

eric_a’s picture

The reverted code had no issue number in the commit message, but I think the commit belonged to #3053444: Type error. I'll comment there.

nicholass’s picture

I too am now having issues after updating, I think there was a bug introduced with the latest version I am getting notices now after updating content

Notice: Undefined index pg_card ..... /modules/contrib/paragraphs_report/src/ParagraphsReport.php on line 670

Status: Fixed » Closed (fixed)

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

generalredneck’s picture

credit

xaa’s picture