-
Notifications
You must be signed in to change notification settings - Fork 916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined index: columns (View: .... vendor/backpack/crud/src/resources/views/crud/fields/table.blade.php) #2170
Comments
Hi @rabol , Looks like a misconfigured table field. Configuring it as explained in the docs linked above should fix it for you. It's weird though - the "table" field is loaded for you automatically? When using Cheers! |
Hi I did not add anything the first time, pure 'default' code that was created with the backpack:crud command I found out that I needed to configure the table field manually, but still I think that it's a 'bug' that one have to make 'special' code for a specific field type. |
I think you're totally right, thank you @rabol . Just pushed a fix so if nothing is defined a simple "value" column will be used, for both fields and columns. Will most likely not be what people are looking for (they'd still need to properly configure their fields), but at least they won't be met with a nasty error. Thanks, cheers! |
@ogiogiovictor can't really tell from the screenshot, the error is a bit obscure. Can you please click the Share button there, and copy-paste the error link here? That will give us access to the full error stack, to better understand what's going on. |
I noticed that the each time i add addFields either ckeditor, tinymce or
summertone to setupCreateOperation() I get Class
'Composer\InstalledVersions' not found (View:
/home/ogiogiovictor/projects/laravel/games/vendor/backpack/crud/src/resources/views/crud/inc/show_fields.blade.php)
$this->crud->addField([
'name' => 'about_the_game',
'label' => 'About',
'type' => 'tinymce',
// optional overwrite of the configuration array
'options' => [
'selector' => 'textarea.tinymce',
'skin' => 'dick-light',
'plugins' => 'image,link,media,anchor',
'toolbar' => 'undo redo formatselect fontsizeselect
bullist numlist link image bold italic underline forecolor',
],
]);
See Error below:
[image: image.png]
…On Sat, Sep 17, 2022 at 11:07 PM Cristian Tăbăcitu ***@***.***> wrote:
@ogiogiovictor <https://github.com/ogiogiovictor> can't really tell from
the screenshot, the error is a bit obscure. Can you please click the Share
button there, and copy-paste the error link here? That will give us access
to the full error stack, to better understand what's going on.
—
Reply to this email directly, view it on GitHub
<#2170 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALE7KFWGMJIAPSTX54ZUQJTV62PRZANCNFSM4JD42CAQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hmm:
|
Bug report
What I did
STEP 1. create migration
php artisan make:migration:schema create_tags_table --model=0 --schema="name:string:unique"
add a json filed
$table->json('tag_features')->nullable()
php artisan migrate
STEP 2. create crud
php artisan backpack:crud tag
What I expected to happen
being able to add a new record
What happened
Exception was thrown
Facade\Ignition\Exceptions\ViewException
Undefined index: columns (View: /home/vagrant/code/backpack/vendor/backpack/crud/src/resources/views/crud/fields/table.blade.php)
What I've already tried to fix it
Nothing so far
Backpack, Laravel, PHP, DB version
When I run
php artisan backpack:version
the output is:PHP VERSION:
PHP 7.3.9-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Sep 2 2019 12:54:24) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.9, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.9-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
LARAVEL VERSION:
laravel/framework v6.3.0 The Laravel Framework.
BACKPACK VERSION:
backpack/crud 4.0.9 Quickly build an admin interfaces using Laravel 6, CoreUI, Boostrap 4 and jQuery.
backpack/generators 2.0.4 Generate files for laravel projects
The text was updated successfully, but these errors were encountered: