modxcms / Collections

An Extra for MODX Revolution that provides for Resource Collections managed by CollectionContainer Resources
GNU General Public License v2.0
53 stars 37 forks source link

Modx3 Collection and Fred #350

Closed afifs closed 1 year ago

afifs commented 2 years ago

When I tried to access Collections via Fred (Modx3 and Fred 2.0.0) from side bar, there was an error: "PHP message: PHP Fatal error: Uncaught TypeError: Collections\Endpoint\Ajax\Endpoint::__construct(): Argument #2 ($fred) must be of type Fred, Fred\Fred given, called in /var/www/html/tavook/core/components/collections/src/Endpoint/Ajax.php on line 85 and defined in /var/www/html/tavook/core/components/collections/src/Endpoint/Ajax/Endpoint.php:33"

I edited Endpoint.php line 33 as: public function __construct(\Collections\Collections &$collections, \Fred\Fred &$fred, $payload)

It solved the problem.