Problem/Motivation

In ProcessBase.php line 171:

Unable to decode output into JSON: Syntax error

ArgumentCountError: Too few arguments to function Drupal\canvas\AutoSave\AutoSaveManager::__construct(), 7 passed in /var/www/html/web/modules/contrib/canvas_builder/sr
c/AutoSave/CanvasBuilderAutoSaveManager.php on line 58 and exactly 8 expected in Drupal\canvas\AutoSave\AutoSaveManager->__construct() (line 112 of /var/www/html/web/mo
dules/contrib/canvas/src/AutoSave/AutoSaveManager.php).

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

thomas.frobieter created an issue. See original summary.

aaronchristian’s picture

Assigned: Unassigned » aaronchristian
aaronchristian’s picture

This one's fixed on 1.0.x as well.

The issue was that we were overriding AutoSaveManager::__construct() with Canvas's exact constructor signature. That worked until Canvas 1.9.0 added another required parameter, which immediately broke our subclass.

The fix was to remove the constructor override entirely. The extra dependencies our subclass needs are now injected through a setter in the service provider, so we're no longer tied to Canvas's constructor signature.

I verified it by patching a local copy of Canvas to require the additional constructor argument, which reproduced your exact error. With the current 1.0.x code, everything resolves cleanly and the test suite passes.

It's included in the same commit (7459dbf), so it should be good to test against Canvas 1.9.0.

aaronchristian’s picture

Status: Active » Needs review
thomas.frobieter’s picture

Status: Needs review » Reviewed & tested by the community

LGTM! Works like expected.

anybody’s picture

Priority: Normal » Major

Confirming RTBC. @aaronchristian could you maybe tag a new alpha3 release with this fix?

grevil’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

grevil’s picture

Assigned: aaronchristian » Unassigned
anybody’s picture

Still needs a fresh release please! This major issue is not fixed in a tagged release yet.

aaronchristian’s picture

Status: Fixed » Closed (fixed)
anybody’s picture

Thanks for the fresh release @aaronchristian!! :)