Layout Designer not accessible in Xibo 3.0.0-alpha

Hey fellas,
I set up a xibo test environment and installed the 3.0.0-alpha release. I imported the database and shared directory from the older, working environment 2.3.5. Everything seems to work fine - except the Layout Designer. When I click on ‘Design’ in the layout dropdown menu I get the following Error related to my custom module:

**Fatal error** : Declaration of Xibo\custom\layoutv2\layoutv2::edit() must be compatible with Xibo\Widget\ModuleInterface::edit(Slim\Http\ServerRequest $request, Slim\Http\Response $response): Slim\Http\Response in **/var/www/cms/custom/layoutv2/ayoutv2.php** on line **151**

Since the modules .php causes no error with the 2.3.5 release I was wondering if/how a custom modules general structure needs to be changed to work with the 3.0.0 release.

If you need more information, please let me know. :slight_smile:

BR, Hannes.

Hey,

Its a good question and i’m not sure if we’ve documented it yet… @maurofmferrao, can you remind me if we’ve got that somewhere, and if not can we make something?

There are some fairly simple changes to be done I believe :crossed_fingers:

1 Like

So we do need to write some documentation for v2 to v3 migration. This is due to us upgrading our framework from Slim2 to Slim4.

Now each function called by the Slim router needs to have a Request/Response object passed to it, and return a Response object - for example on edit() you would have this signature:

public function edit(Request $request, Response $response): Response
{
    $sanitizedParams = $this->getSanitizer($request->getParams());
    return $response;
}

Also note that there have been updates to the Sanitizer we use to make it more robust and easier to use (hopefully - or at the least more predictable).

We will write a conversion doc and post it here when done!

The Xibo Community site uses cookies. What are cookies?