Closed rico closed 3 months ago
After updating form v2 to v3 I get the following error for some of my CMS pages (which are not modules) that extend the twill::layouts.form view.
twill::layouts.form
Undefined variable $formBuilder (View: [...]/vendor/area17/twill/views/layouts/form.blade.php) (View: [...]/vendor/area17/twill/views/layouts/form.blade.php)
For example:
Entry in twill-navigation.php:
twill-navigation.php
'kontakt' => [ 'title' => 'Kontakt', 'route' => 'twill.kontakt', ],
The controller code:
class PageController extends ModuleController { protected $moduleName = 'pages'; public function kontakt(PageRepository $page) { return view('twill.pages.kontakt', $this->form( $page->byName('kontakt')->id ) ); } }
The view:
@extends('twill::layouts.form', [ 'customTitle' => 'Kontakt', 'editableTitle' => false, 'contentFieldsetLabel' => 'Eigenschaften', ]) @section('contentFields') @formField('wysiwyg', [ 'name' => 'content.body', 'label' => 'Inhalt', 'required' => true, 'toolbarOptions' => [ ['header' => [2, 3, 4, 5, 6, false]], 'bold', 'italic', 'underline', 'strike', ['list' => 'ordered'], ['list' => 'bullet'], ['indent' => '-1'], ['indent' => '+1'], ["align" => []], 'link', "clean", ], ]) @stop
Open the admin and select the page.
No error, $formBuilder should be defined.
$formBuilder
Error as stated above.
Twill: 3.2.0 Laravel: v9.52.16 PHP: 8.0.30
Description
After updating form v2 to v3 I get the following error for some of my CMS pages (which are not modules) that extend the
twill::layouts.form
view.For example:
Entry in
twill-navigation.php
:The controller code:
The view:
Steps to reproduce
Open the admin and select the page.
Expected result
No error,
$formBuilder
should be defined.Actual result
Error as stated above.
Versions
Twill: 3.2.0 Laravel: v9.52.16 PHP: 8.0.30