Could this be caused by using Auto-Tables?
Some of the Table objects in your application were created by instantiating "Cake\ORM\Table"
instead of any other specific subclass.
This could be the cause for this exception. Auto-Tables are created for you under the following circumstances:
- The class for the specified table does not exist.
- The Table was created with a typo: $this->getTableLocator()->get('Articles');
- The class file has a typo in the name or incorrect namespace: class Articles extends Table
- The file containing the class has a typo or incorrect casing: Articles.php
- The Table was used using associations but the association has a typo: $this->belongsTo('Articles')
- The table class resides in a Plugin but no plugin notation was used in the association definition.
Please try correcting the issue for the following table aliases:
- I18n
- Destinations_nomiseo_translation
- Destinations_title_translation
- Destinations_name_translation
- Destinations_descrizione_translation
APP/Controller/DestinationsController.php at line 81
(edit)
|
$nomeseo_slug = $destination->slug; |
|
} |
|
|
|
if (empty($destination)) { |
|
throw new NotFoundException(__('Invalid Destination')); |
|
} |
|
|
|
//Creo un array dai nomiseo |
|
if (isset($destination->nomiseo) && !empty($destination->nomiseo)) { |
-
|
} |
|
|
|
public function rent($nomeseo = null) |
|
{ |
|
$this->get_seo_destination_name($nomeseo); |
|
$this->render('Ebike2021.view'); |
|
} |
|
|
|
public function view($nomeseo = null) |
Toggle Arguments
-
|
* @throws \UnexpectedValueException If return value of action is not `null` or `ResponseInterface` instance. |
|
*/ |
|
public function invokeAction(Closure $action, array $args): void |
|
{ |
|
$result = $action(...$args); |
|
if ($result !== null && !$result instanceof ResponseInterface) { |
|
throw new UnexpectedValueException(sprintf( |
|
'Controller actions can only return ResponseInterface instance or null. ' |
|
. 'Got %s instead.', |
Toggle Arguments
-
|
$args = $this->getActionArgs( |
|
$action, |
|
array_values((array)$controller->getRequest()->getParam('pass')) |
|
); |
|
$controller->invokeAction($action, $args); |
|
|
|
$result = $controller->shutdownProcess(); |
|
if ($result instanceof ResponseInterface) { |
|
return $result; |
Toggle Arguments
-
|
|
|
return $runner->run($middlewareQueue, $controller->getRequest(), $this); |
|
} |
|
|
|
return $this->handle($controller->getRequest()); |
|
} |
|
|
|
/** |
|
* Invoke the action. |
Toggle Arguments
-
|
|
|
// This is needed for auto-wiring. Should be removed in 5.x |
|
$container->add(ComponentRegistry::class, $controller->components()); |
|
|
|
return $this->controllerFactory->invoke($controller); |
|
} |
|
} |
|
|
Toggle Arguments
-
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
|
} |
|
|
|
return new Response([ |
|
'body' => 'Middleware queue was exhausted without returning a response ' |
Toggle Arguments
-
|
if ($request->getCookieParams()) { |
|
$request = $this->decodeCookies($request); |
|
} |
|
|
|
$response = $handler->handle($request); |
|
if ($response->hasHeader('Set-Cookie')) { |
|
$response = $this->encodeSetCookieHeader($response); |
|
} |
|
if ($response instanceof Response) { |
Toggle Arguments
-
|
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
Toggle Arguments
-
|
$request = $request->withAttribute($attribute, $identity); |
|
} |
|
|
|
try { |
|
$response = $handler->handle($request); |
|
|
|
if ($this->getConfig('requireAuthorizationCheck') && !$service->authorizationChecked()) { |
|
throw new AuthorizationRequiredException(['url' => $request->getRequestTarget()]); |
|
} |
Toggle Arguments
-
|
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
Toggle Arguments
-
|
$request = $request->withAttribute('authentication', $service); |
|
$request = $request->withAttribute('authenticationResult', $result); |
|
|
|
try { |
|
$response = $handler->handle($request); |
|
$authenticator = $service->getAuthenticationProvider(); |
|
|
|
if ($authenticator !== null && !$authenticator instanceof StatelessInterface) { |
|
$return = $service->persistIdentity($request, $response, $result->getData()); |
Toggle Arguments
-
|
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
Toggle Arguments
-
|
Hash::get($params, 'plugin') !== 'ADmad/SocialAuth' |
|
|| Hash::get($params, 'controller') !== 'Auth' |
|
|| !in_array($action, ['login', 'callback'], true) |
|
) { |
|
return $handler->handle($request); |
|
} |
|
|
|
$method = '_handle' . ucfirst($action) . 'Action'; |
|
|
Toggle Arguments
-
|
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
Toggle Arguments
-
|
} |
|
|
|
Configure::write('App.language', $lang); |
|
|
|
return $handler->handle($request); |
|
} |
|
|
|
/** |
|
* Set closure for deciding whether or not to ignore particular request. |
Toggle Arguments
-
|
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
Toggle Arguments
-
|
); |
|
} |
|
$matching = Router::getRouteCollection()->getMiddleware($middleware); |
|
if (!$matching) { |
|
return $handler->handle($request); |
|
} |
|
|
|
$container = $this->app instanceof ContainerApplicationInterface |
|
? $this->app->getContainer() |
Toggle Arguments
-
|
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
Toggle Arguments
-
|
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
{ |
|
$url = $request->getUri()->getPath(); |
|
if (strpos($url, '..') !== false || strpos($url, '.') === false) { |
|
return $handler->handle($request); |
|
} |
|
|
|
if (strpos($url, '/.') !== false) { |
|
return $handler->handle($request); |
Toggle Arguments
-
|
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
Toggle Arguments
-
|
*/ |
|
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
{ |
|
try { |
|
return $handler->handle($request); |
|
} catch (RedirectException $exception) { |
|
return $this->handleRedirect($exception); |
|
} catch (Throwable $exception) { |
|
return $this->handleException($exception, $request); |
Toggle Arguments
-
|
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
Toggle Arguments
-
|
) { |
|
Router::setRequest($request); |
|
} |
|
|
|
return $this->handle($request); |
|
} |
|
|
|
/** |
|
* Handle incoming server request and return a response. |
Toggle Arguments
-
|
} |
|
|
|
$this->dispatchEvent('Server.buildMiddleware', ['middleware' => $middleware]); |
|
|
|
$response = $this->runner->run($middleware, $request, $this->app); |
|
|
|
if ($request instanceof ServerRequest) { |
|
$request->getSession()->close(); |
|
} |
Toggle Arguments
-
|
// Bind your application to the server. |
|
$server = new Server(new Application(dirname(__DIR__) . '/config')); |
|
|
|
// Run the request/response through the application and emit the response. |
|
$server->emit($server->run()); |
|
|
Toggle Arguments
-
If you want to customize this error message, create
templates/Error/error400.ctp