After enabling the AdvAgg module, the screen returns the following error:

The website encountered an unexpected error. Please try again later.
Error: Call to undefined method Drupal\s3fs\S3fsStreamOverrideManager::preparePath() in Drupal\advagg\State\Files->__construct() (line 68 of modules/contrib/advagg/src/State/Files.php).

Not sure if it's AdvAgg's responsibility to make sure that the function exists before calling it (and perhaps calling another function if it does not exist) or if it's S3FS's responsibility to provide a function with that name that mirrors the real function. Regardless, they appear to be incompatible at this time.

Comments

belvedere created an issue. See original summary.

belvedere’s picture

Issue tags: +AssetDumper
alex_optim’s picture

Assigned: Unassigned » alex_optim
alex_optim’s picture

Assigned: alex_optim » Unassigned
mikeytown2’s picture

Have you tried the latest dev? #2843510: AdvAgg and s3fs fail.

Ah 8.x ok

kducharm’s picture

This is actually caused because both AdvAgg and S3FS are overriding the asset.css.dumper and asset.js.dumper services. The easiest solution (if you don't need to store css/js files in S3) is to remove or rename modules/s3fs/src/S3fsServiceProvider.php. That will allow AdvAgg's service overrides to work again.

The longer solution is that both AdvAgg and S3FS should probably be using aliases for the asset.css.dumper and asset.js.dumper and/or Service Decorators so that both modules could be compatible with each other. If both AdvAgg and S3fs didn't directly override the core asset dumpers and each added a service alias like advagg.asset.css.dumper, you could put an alias entry in your services.yml file in docroot/sites/default like:

asset.css.dumper:
  alias: advagg.asset.css.dumper
asset.js.dumper:
  alias: advagg.asset.js.dumper

...or S3fs could put some logic into its Service Provider so that it's configurable somehow to enable/disable the overrides

NickDickinsonWilde’s picture

Status: Active » Postponed

mmph that's a somewhat complicated topic/refactor area that I've been thinking about. For now I'll note that it has an incompatibility with S3FS and figure out the best way to fix it for next release (ie after the release I do tonight).

NickDickinsonWilde’s picture

Version: 8.x-2.x-dev » 8.x-3.x-dev
Status: Postponed » Fixed

I'm no longer overriding asset.*.dumper services in 8.x-3.x in core. (Optional module may end up doing so, but hopefully not).
Won't fix for 8.x-2.x as that would be a major change.

Status: Fixed » Closed (fixed)

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