Smart Link PHP 8.0
Permalink Browser Info Environment
Ladies and Gentlemen
after the PHP update to PHP 8.0, I can no longer use a smart link. This is the error message:
Undefined array key "parent"
private function linkTypeClass($type)
{
$parent = $this->data['parent'] ? $this->data['parent']['slug'] . '-' : '';
return 'ft-smart-link-' . $parent . $this->data['slug'] . '-' . $type . '-selector';
}
after the PHP update to PHP 8.0, I can no longer use a smart link. This is the error message:
Undefined array key "parent"
private function linkTypeClass($type)
{
$parent = $this->data['parent'] ? $this->data['parent']['slug'] . '-' : '';
return 'ft-smart-link-' . $parent . $this->data['slug'] . '-' . $type . '-selector';
}
Type: | Ticket |
---|---|
Status: | Resolved |
Hello,
thanks for the fast reply, now i get this error:
Undefined variable $Link_File
Details
/html/application/blocks/link_test/form.php(40): Whoops\Exception\ErrorException->null
/html/application/blocks/link_test/form.php(40): Whoops\Run->handleError
/html/concrete/src/Block/View/BlockView.php(380): null->include
/html/application/blocks/link_test/add.php(2): Concrete\Core\Block\View\BlockView->inc
/html/concrete/src/Block/View/BlockView.php(267): null->include
/html/concrete/src/View/AbstractView.php(164): Concrete\Core\Block\View\BlockView->renderViewContents
/html/concrete/views/dialogs/page/add_block.php(102): Concrete\Core\View\AbstractView->render
/html/concrete/src/View/View.php(318): null->include
/html/concrete/src/View/View.php(296): Concrete\Core\View\View->renderInnerContents
/html/concrete/src/View/DialogView.php(34): Concrete\Core\View\View->renderViewContents
/html/concrete/src/View/AbstractView.php(164): Concrete\Core\View\DialogView->renderViewContents
/html/concrete/src/Routing/ControllerRouteAction.php(82): Concrete\Core\View\AbstractView->render
/html/concrete/src/Http/RouteDispatcher.php(37): Concrete\Core\Routing\ControllerRouteAction->execute
/html/concrete/src/Http/Middleware/DispatcherDelegate.php(39): Concrete\Core\Http\RouteDispatcher->dispatch
/html/concrete/src/Http/Middleware/MiddlewareStack.php(86): Concrete\Core\Http\Middleware\DispatcherDelegate->next
/html/concrete/src/Http/DefaultDispatcher.php(127): Concrete\Core\Http\Middleware\MiddlewareStack->process
/html/concrete/src/Http/DefaultDispatcher.php(60): Concrete\Core\Http\DefaultDispatcher->handleDispatch
/html/concrete/src/Http/Middleware/DispatcherDelegate.php(39): Concrete\Core\Http\DefaultDispatcher->dispatch
/html/concrete/src/Http/Middleware/FrameOptionsMiddleware.php(39): Concrete\Core\Http\Middleware\DispatcherDelegate->next
/html/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\FrameOptionsMiddleware->process
/html/concrete/src/Http/Middleware/StrictTransportSecurityMiddleware.php(36): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
/html/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\StrictTransportSecurityMiddleware->process
/html/concrete/src/Http/Middleware/ContentSecurityPolicyMiddleware.php(36): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
/html/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\ContentSecurityPolicyMiddleware->process
/html/concrete/src/Http/Middleware/CookieMiddleware.php(35): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
/html/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\CookieMiddleware->process
/html/concrete/src/Http/Middleware/ApplicationMiddleware.php(29): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
/html/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\ApplicationMiddleware->process
/html/concrete/src/Http/Middleware/MiddlewareStack.php(86): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
/html/concrete/src/Http/DefaultServer.php(85): Concrete\Core\Http\Middleware\MiddlewareStack->process
/html/concrete/src/Foundation/Runtime/Run/DefaultRunner.php(125): Concrete\Core\Http\DefaultServer->handleRequest
/html/concrete/src/Foundation/Runtime/DefaultRuntime.php(102): Concrete\Core\Foundation\Runtime\Run\DefaultRunner->run
/html/concrete/dispatcher.php(45): Concrete\Core\Foundation\Runtime\DefaultRuntime->run
/html/index.php(2): null->require
thanks for the fast reply, now i get this error:
Undefined variable $Link_File
Details
/html/application/blocks/link_test/form.php(40): Whoops\Exception\ErrorException->null
/html/application/blocks/link_test/form.php(40): Whoops\Run->handleError
/html/concrete/src/Block/View/BlockView.php(380): null->include
/html/application/blocks/link_test/add.php(2): Concrete\Core\Block\View\BlockView->inc
/html/concrete/src/Block/View/BlockView.php(267): null->include
/html/concrete/src/View/AbstractView.php(164): Concrete\Core\Block\View\BlockView->renderViewContents
/html/concrete/views/dialogs/page/add_block.php(102): Concrete\Core\View\AbstractView->render
/html/concrete/src/View/View.php(318): null->include
/html/concrete/src/View/View.php(296): Concrete\Core\View\View->renderInnerContents
/html/concrete/src/View/DialogView.php(34): Concrete\Core\View\View->renderViewContents
/html/concrete/src/View/AbstractView.php(164): Concrete\Core\View\DialogView->renderViewContents
/html/concrete/src/Routing/ControllerRouteAction.php(82): Concrete\Core\View\AbstractView->render
/html/concrete/src/Http/RouteDispatcher.php(37): Concrete\Core\Routing\ControllerRouteAction->execute
/html/concrete/src/Http/Middleware/DispatcherDelegate.php(39): Concrete\Core\Http\RouteDispatcher->dispatch
/html/concrete/src/Http/Middleware/MiddlewareStack.php(86): Concrete\Core\Http\Middleware\DispatcherDelegate->next
/html/concrete/src/Http/DefaultDispatcher.php(127): Concrete\Core\Http\Middleware\MiddlewareStack->process
/html/concrete/src/Http/DefaultDispatcher.php(60): Concrete\Core\Http\DefaultDispatcher->handleDispatch
/html/concrete/src/Http/Middleware/DispatcherDelegate.php(39): Concrete\Core\Http\DefaultDispatcher->dispatch
/html/concrete/src/Http/Middleware/FrameOptionsMiddleware.php(39): Concrete\Core\Http\Middleware\DispatcherDelegate->next
/html/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\FrameOptionsMiddleware->process
/html/concrete/src/Http/Middleware/StrictTransportSecurityMiddleware.php(36): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
/html/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\StrictTransportSecurityMiddleware->process
/html/concrete/src/Http/Middleware/ContentSecurityPolicyMiddleware.php(36): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
/html/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\ContentSecurityPolicyMiddleware->process
/html/concrete/src/Http/Middleware/CookieMiddleware.php(35): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
/html/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\CookieMiddleware->process
/html/concrete/src/Http/Middleware/ApplicationMiddleware.php(29): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
/html/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\ApplicationMiddleware->process
/html/concrete/src/Http/Middleware/MiddlewareStack.php(86): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
/html/concrete/src/Http/DefaultServer.php(85): Concrete\Core\Http\Middleware\MiddlewareStack->process
/html/concrete/src/Foundation/Runtime/Run/DefaultRunner.php(125): Concrete\Core\Http\DefaultServer->handleRequest
/html/concrete/src/Foundation/Runtime/DefaultRuntime.php(102): Concrete\Core\Foundation\Runtime\Run\DefaultRunner->run
/html/concrete/dispatcher.php(45): Concrete\Core\Foundation\Runtime\DefaultRuntime->run
/html/index.php(2): null->require
This one should be fixed too now in the latest version, so please update!
Please let me know once you have issues elsewhere and sorry for the inconveniences meanwhile. Not fully migrated to PHP8 everywhere and not running into issues just yet.
Kind regards
Ramon
Please let me know once you have issues elsewhere and sorry for the inconveniences meanwhile. Not fully migrated to PHP8 everywhere and not running into issues just yet.
Kind regards
Ramon
I have updated the packages and they now have the following versions:
Block Designer v.4.1.4
Block Designer Pro v.4.1.3
I still get the following error when I embed the block in the webpage. This only occurs when I have selected a smart link in Black Designer Pro:
Undefined variable $Link_File
Details
/html/application/blocks/link_test/form.php(40): Whoops\Exception\ErrorException->null
/html/application/blocks/link_test/form.php(40): Whoops\Run->handleError
/html/concrete/src/Block/View/BlockView.php(380): null->include
/html/application/blocks/link_test/add.php(2): Concrete\Core\Block\View\BlockView->inc
/html/concrete/src/Block/View/BlockView.php(267): null->include
/html/concrete/src/View/AbstractView.php(164): Concrete\Core\Block\View\BlockView->renderViewContents
/html/concrete/views/dialogs/page/add_block.php(102): Concrete\Core\View\AbstractView->render
/html/concrete/src/View/View.php(318): null->include
/html/concrete/src/View/View.php(296): Concrete\Core\View\View->renderInnerContents
/html/concrete/src/View/DialogView.php(34): Concrete\Core\View\View->renderViewContents
/html/concrete/src/View/AbstractView.php(164): Concrete\Core\View\DialogView->renderViewContents
/html/concrete/src/Routing/ControllerRouteAction.php(82): Concrete\Core\View\AbstractView->render
/html/concrete/src/Http/RouteDispatcher.php(37): Concrete\Core\Routing\ControllerRouteAction->execute
/html/concrete/src/Http/Middleware/DispatcherDelegate.php(39): Concrete\Core\Http\RouteDispatcher->dispatch
/html/concrete/src/Http/Middleware/MiddlewareStack.php(86): Concrete\Core\Http\Middleware\DispatcherDelegate->next
/html/concrete/src/Http/DefaultDispatcher.php(127): Concrete\Core\Http\Middleware\MiddlewareStack->process
/html/concrete/src/Http/DefaultDispatcher.php(60): Concrete\Core\Http\DefaultDispatcher->handleDispatch
/html/concrete/src/Http/Middleware/DispatcherDelegate.php(39): Concrete\Core\Http\DefaultDispatcher->dispatch
/html/concrete/src/Http/Middleware/FrameOptionsMiddleware.php(39): Concrete\Core\Http\Middleware\DispatcherDelegate->next
/html/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\FrameOptionsMiddleware->process
/html/concrete/src/Http/Middleware/StrictTransportSecurityMiddleware.php(36): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
/html/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\StrictTransportSecurityMiddleware->process
/html/concrete/src/Http/Middleware/ContentSecurityPolicyMiddleware.php(36): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
/html/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\ContentSecurityPolicyMiddleware->process
/html/concrete/src/Http/Middleware/CookieMiddleware.php(35): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
/html/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\CookieMiddleware->process
/html/concrete/src/Http/Middleware/ApplicationMiddleware.php(29): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
/html/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\ApplicationMiddleware->process
/html/concrete/src/Http/Middleware/MiddlewareStack.php(86): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
/html/concrete/src/Http/DefaultServer.php(85): Concrete\Core\Http\Middleware\MiddlewareStack->process
/html/concrete/src/Foundation/Runtime/Run/DefaultRunner.php(125): Concrete\Core\Http\DefaultServer->handleRequest
/html/concrete/src/Foundation/Runtime/DefaultRuntime.php(102): Concrete\Core\Foundation\Runtime\Run\DefaultRunner->run
/html/concrete/dispatcher.php(45): Concrete\Core\Foundation\Runtime\DefaultRuntime->run
/html/index.php(2): null->require
Block Designer v.4.1.4
Block Designer Pro v.4.1.3
I still get the following error when I embed the block in the webpage. This only occurs when I have selected a smart link in Black Designer Pro:
Undefined variable $Link_File
Details
/html/application/blocks/link_test/form.php(40): Whoops\Exception\ErrorException->null
/html/application/blocks/link_test/form.php(40): Whoops\Run->handleError
/html/concrete/src/Block/View/BlockView.php(380): null->include
/html/application/blocks/link_test/add.php(2): Concrete\Core\Block\View\BlockView->inc
/html/concrete/src/Block/View/BlockView.php(267): null->include
/html/concrete/src/View/AbstractView.php(164): Concrete\Core\Block\View\BlockView->renderViewContents
/html/concrete/views/dialogs/page/add_block.php(102): Concrete\Core\View\AbstractView->render
/html/concrete/src/View/View.php(318): null->include
/html/concrete/src/View/View.php(296): Concrete\Core\View\View->renderInnerContents
/html/concrete/src/View/DialogView.php(34): Concrete\Core\View\View->renderViewContents
/html/concrete/src/View/AbstractView.php(164): Concrete\Core\View\DialogView->renderViewContents
/html/concrete/src/Routing/ControllerRouteAction.php(82): Concrete\Core\View\AbstractView->render
/html/concrete/src/Http/RouteDispatcher.php(37): Concrete\Core\Routing\ControllerRouteAction->execute
/html/concrete/src/Http/Middleware/DispatcherDelegate.php(39): Concrete\Core\Http\RouteDispatcher->dispatch
/html/concrete/src/Http/Middleware/MiddlewareStack.php(86): Concrete\Core\Http\Middleware\DispatcherDelegate->next
/html/concrete/src/Http/DefaultDispatcher.php(127): Concrete\Core\Http\Middleware\MiddlewareStack->process
/html/concrete/src/Http/DefaultDispatcher.php(60): Concrete\Core\Http\DefaultDispatcher->handleDispatch
/html/concrete/src/Http/Middleware/DispatcherDelegate.php(39): Concrete\Core\Http\DefaultDispatcher->dispatch
/html/concrete/src/Http/Middleware/FrameOptionsMiddleware.php(39): Concrete\Core\Http\Middleware\DispatcherDelegate->next
/html/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\FrameOptionsMiddleware->process
/html/concrete/src/Http/Middleware/StrictTransportSecurityMiddleware.php(36): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
/html/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\StrictTransportSecurityMiddleware->process
/html/concrete/src/Http/Middleware/ContentSecurityPolicyMiddleware.php(36): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
/html/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\ContentSecurityPolicyMiddleware->process
/html/concrete/src/Http/Middleware/CookieMiddleware.php(35): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
/html/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\CookieMiddleware->process
/html/concrete/src/Http/Middleware/ApplicationMiddleware.php(29): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
/html/concrete/src/Http/Middleware/MiddlewareDelegate.php(50): Concrete\Core\Http\Middleware\ApplicationMiddleware->process
/html/concrete/src/Http/Middleware/MiddlewareStack.php(86): Concrete\Core\Http\Middleware\MiddlewareDelegate->next
/html/concrete/src/Http/DefaultServer.php(85): Concrete\Core\Http\Middleware\MiddlewareStack->process
/html/concrete/src/Foundation/Runtime/Run/DefaultRunner.php(125): Concrete\Core\Http\DefaultServer->handleRequest
/html/concrete/src/Foundation/Runtime/DefaultRuntime.php(102): Concrete\Core\Foundation\Runtime\Run\DefaultRunner->run
/html/concrete/dispatcher.php(45): Concrete\Core\Foundation\Runtime\DefaultRuntime->run
/html/index.php(2): null->require
- You have to uninstall the Block Type first
- Then load the configuration of that block type into block designer (/index.php/dashboard/blocks/block_designer/block_config)
- Then regenerate that block type (it will give a notice to remove the directory, click the link to do so)
- Now (re)generate the block type since it is removed from your installation and ready to be generated
- Then install the block type like you normally install block types
After doing these steps, it should work.
You can not simply update the Add-Ons and it will work, because the code is already generated and lives in your blocks directory.
Let me know if that worked out for you!
Kind regards
Ramon
- Then load the configuration of that block type into block designer (/index.php/dashboard/blocks/block_designer/block_config)
- Then regenerate that block type (it will give a notice to remove the directory, click the link to do so)
- Now (re)generate the block type since it is removed from your installation and ready to be generated
- Then install the block type like you normally install block types
After doing these steps, it should work.
You can not simply update the Add-Ons and it will work, because the code is already generated and lives in your blocks directory.
Let me know if that worked out for you!
Kind regards
Ramon
It works, thank you :)
Just pushed version 4.1.2 to fix this specific issue. Let me know if this worked out for you or not!
Kind regards
Ramon