Amin
June 6, 2024, 6:57am
#1
Hi, I get the following error when exporting my blueprint. Apparently the type: nesteditems
causes the error. As soon as I hide the field it works. Can someone help me or is it a bug? @daft
“SQLSTATE[HY000]: General error: 1 no such table: nested_form_items (SQL: select * from “nested_form_items” where “nested_form_items”.“parent_id” = 1 and “nested_form_items”.“parent_id” is not null order by “nested_form_items”.“sort_order” asc)” on line 760 of /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Database/Connection.php
This is the Blueprint.
uuid: d7c8aa2b-2262-417b-a41f-0fa2b018ced3
handle: Menu\Menu
type: entry
name: Menu
drafts: false
multisite: true
pagefinder: false
primaryNavigation:
label: Menus
icon: 'ph ph-list'
order: 40
customMessages:
buttonCreate: Create menu
fields:
title:
placeholder: Menu title
menu_items:
order: 10
label: Menu items
span: row
spanClass: col-12 hide-label
type: nesteditems
maxDepth: 3
customMessages:
buttonCreate: Create menu item
titleUpdateForm: Update menu item
titleCreateForm: Create menu item
form:
fields:
hide:
label: Hide
type: switch
span: row
spanClass: col-12
column: invisible
title:
label: Titel
type: text
span: row
spanClass: col-12 mb-2
tabs:
fields:
page:
tab: Link
label: Page
type: pagefinder
span: row
spanClass: col-12
order: 1
anchor:
tab: Link
label: Anchor
type: text
span: row
spanClass: col-12
daft
July 25, 2024, 11:29pm
#2
Hey @Amin
Confirming this has been fixed in v3.6.27
Best regards
1 Like
Amin
July 26, 2024, 7:21am
#3
Unfortunately, it does not work with a nestedform.
ErrorException: Attempt to read property "attributes" on null in /Users/macbookpro/Sites/vite/modules/tailor/models/RecordExport.php:117
Stack trace:
#0 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(270): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'Attempt to read...', '/Users/macbookp...', 117)
#1 /Users/macbookpro/Sites/vite/modules/tailor/models/RecordExport.php(117): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}(2, 'Attempt to read...', '/Users/macbookp...', 117)
#2 /Users/macbookpro/Sites/vite/modules/tailor/models/RecordExport.php(99): Tailor\Models\RecordExport->encodeRepeaterItem(NULL)
#3 /Users/macbookpro/Sites/vite/modules/tailor/models/RecordExport.php(72): Tailor\Models\RecordExport->encodeRepeaterItems(Object(Tailor\Models\EntryRecord), 'test')
#4 /Users/macbookpro/Sites/vite/modules/tailor/models/RecordExport.php(56): Tailor\Models\RecordExport->encodeModelAttribute(Object(Tailor\Models\EntryRecord), 'test')
#5 /Users/macbookpro/Sites/vite/modules/backend/models/ExportModel.php(51): Tailor\Models\RecordExport->exportData(Array, 'Sl96MYBZxmg3T8O...')
#6 /Users/macbookpro/Sites/vite/modules/backend/behaviors/importexportcontroller/ActionExport.php(54): Backend\Models\ExportModel->export(Array, Array)
#7 /Users/macbookpro/Sites/vite/modules/backend/behaviors/ImportExportController.php(219): Backend\Behaviors\ImportExportController->actionExport()
#8 [internal function]: Backend\Behaviors\ImportExportController->onExport()
#9 /Users/macbookpro/Sites/vite/vendor/october/rain/src/Extension/ExtendableTrait.php(504): call_user_func_array(Array, Array)
#10 /Users/macbookpro/Sites/vite/vendor/october/rain/src/Extension/Extendable.php(55): October\Rain\Extension\Extendable->extendableCall('onExport', Array)
#11 /Users/macbookpro/Sites/vite/modules/system/traits/DependencyMaker.php(29): October\Rain\Extension\Extendable->__call('onExport', Array)
#12 /Users/macbookpro/Sites/vite/modules/backend/classes/Controller.php(646): Backend\Classes\Controller->makeCallMethod(Object(Tailor\Controllers\BulkActions), 'onExport', Array)
#13 /Users/macbookpro/Sites/vite/modules/backend/classes/Controller.php(457): Backend\Classes\Controller->runAjaxHandler('onExport')
#14 /Users/macbookpro/Sites/vite/modules/backend/classes/Controller.php(265): Backend\Classes\Controller->execAjaxHandlers()
#15 /Users/macbookpro/Sites/vite/modules/backend/classes/WildcardController.php(20): Backend\Classes\Controller->run('index', Array)
#16 /Users/macbookpro/Sites/vite/modules/backend/classes/BackendController.php(98): Backend\Classes\WildcardController->run('menu_menu', Array)
#17 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): Backend\Classes\BackendController->run('tailor/bulkacti...')
#18 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\Routing\Controller->callAction('run', Array)
#19 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Routing/Route.php(259): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Backend\Classes\BackendController), 'run')
#20 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\Routing\Route->runController()
#21 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Routing/Router.php(798): Illuminate\Routing\Route->run()
#22 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#23 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#24 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure))
#25 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#26 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#27 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#28 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest(Object(Illuminate\Http\Request), Object(Illuminate\Session\Store), Object(Closure))
#29 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#30 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#31 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#32 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#33 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#34 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#35 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Routing/Router.php(797): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#36 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Routing/Router.php(776): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#37 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Routing/Router.php(740): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#38 /Users/macbookpro/Sites/vite/vendor/october/rain/src/Router/CoreRouter.php(32): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#39 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(190): October\Rain\Router\CoreRouter->dispatch(Object(Illuminate\Http\Request))
#40 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#41 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#42 /Users/macbookpro/Sites/vite/vendor/october/rain/src/Foundation/Http/Middleware/CheckForMaintenanceMode.php(23): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle(Object(Illuminate\Http\Request), Object(Closure))
#43 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): October\Rain\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#44 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#45 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(165): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#46 /Users/macbookpro/Sites/vite/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(134): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#47 /Users/macbookpro/Sites/vite/index.php(42): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#48 /Applications/Herd.app/Contents/Resources/valet/server.php(155): require('/Users/macbookp...')
#49 {main}
daft
July 27, 2024, 9:07am
#4
Hey Amin,
The nestedform
is working in our tests. Could you share the nested form definition you are using so we can test it?
Amin
July 29, 2024, 2:06pm
#5
Hey @daft ,
it’s a simple nested form. nothing special.
nested_form_test:
label: nestedform
type: nestedform
showPanel: false
form:
fields:
details:
label: Details
type: textarea
title:
label: This the title
type: text
if I insert this into the blueprint from the first post I get the error message from above.