question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] relationship field: Column not found: 1054 Unknown column

See original GitHub issue

Bug report

What I did

$this->crud->addField( [ ‘type’ => “relationship”, ‘name’ => ‘category’, ], );

What I expected to happen

Success create or update

What happened

column not found: 1054 Unknown column ‘category’ in ‘field list’

What I’ve already tried to fix it

‘name’ => ‘category_id’, ‘entity’ => ‘category’,

Backpack, Laravel, PHP, DB version

“php”: “^7.2.5”, “backpack/crud”: “4.1.*”,

When I run php artisan backpack:version the output is: PHP 7.4.1 (cli) (built: Dec 17 2019 19:24:02) ( ZTS Visual C++ 2017 x64 ) Copyright © The PHP Group Zend Engine v3.4.0, Copyright © Zend Technologies

LARAVEL VERSION:

v7.13.0@6fa69bfbd57744a5bbec5538ce483919b3fd625f

BACKPACK VERSION:

4.1.6@cbd4143d3eb8302916012af205565cd3183f274f

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
tabacitucommented, Jun 22, 2020

@mbanna-smart still not sure what the issue is. Could you please post screenshots of your ENTIRE CrudController, and entire error page (the stack)? That might help debug the issue.

0reactions
pxpmcommented, Sep 30, 2020

@mbanna-smart @rinodrummer and all the other who pitch in.

Thank you very much for your effort explaining and debugging this issue.

This is beeing addressed in #3199

I am going to close this, if you happen to have a spare time or are willing to have a fix for this before we merge it we would highly appreciate any possible feedback on the PR thread.

Wish you guys the best, Pedro

Read more comments on GitHub >

github_iconTop Results From Across the Web

Model relationship problem? SQLSTATE[42S22]: Column not ...
I have oneToMany relationship for these two. First error: Store data. Copy Code "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'forms_id_form ...
Read more >
Laravel 5.8: Column not found: 1054 Unknown column error in ...
Hey dude, I wonder if both belongsToMany relationships defined with with the same keys in the same order ie 'user_wallet','user_id','wallet_id' ...
Read more >
SQLSTATE[42S22]: Column not found: 1054 Unknown ...
I have created my own OG reference field with Entityreference to reference to a Group. However, when I use Views to build a...
Read more >
How to fix Column not found: 1054 Unknown column error in ...
How to fix Column not found : 1054 Unknown column error in Laravel || Laravel || Online Study For CSIn this video I...
Read more >
1054 Unknown column 'configVersion' in 'field list' - Craft CMS ...
I work local and have project config activated. At the moment i have no idea where to begin to eliminate that error. I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found