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] Filters not working as it does not find views

See original GitHub issue

Bug report

Filters are not working.

What I did

I did upgraded from 4.0 to 4.1, I tried all the steps mentioned in the documentation and tried to visit my listing page (ListOperation). I have couple fields to be available to search/filter.

What I expected to happen

I had expected to work the filters as it is working with 4.0.

What happened

In ListOperation (Listing page), I found the following error message:

InvalidArgumentException
View [text] not found. (View: resources/views/vendor/backpack/crud/inc/filters_navbar.blade.php)

What I’ve already tried to fix it

When I tried to look at file filters_navbar.blade.php, there is a loop:

@foreach ($crud->filters() as $filter)
    @include($filter->view)
@endforeach

Here $filter->view is returning only view name i.e. text, select2, etc, rather it expects something like crud:filters.text. I found the Trait Filters has been modified a lot and I did not find extra classes in it.

Backpack, Laravel, PHP, DB version

When I run php artisan backpack:version the output is:

PHP 7.4.8 (cli) (built: Jul 13 2020 16:46:22) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.8, Copyright (c), by Zend Technologies

### LARAVEL VERSION:
v7.22.4@30e851a2b3a2af73fba0b7f4fa22b04260db98e7

### BACKPACK VERSION:
4.0.61@1977e0cc52fa7cf9547eaeadf03f5cd88402b574

Not sure what I missed to perform.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
pxpmcommented, Aug 3, 2020

@iamraju There is no command to publish all the the Backpack view files. I don’t think publishing ALL Bacpack views is a good pratice. I think publishing only the ones you are going to change makes more sense.

Best, Pedro

0reactions
iamrajucommented, Aug 3, 2020

That did not help either. I tried that running the commands in step 13.

Actually I tried dd($this->crud->buttons()); in setup() function of a controller lets say EmployeesCrudController then it returns :

Illuminate\Support\Collection {#2343 ▼
  #items: []
}

So it should be something in the framework itself or another doubt permission stuffs on which I am yet to check in details.

By the way, this is happening only in my upgraded project (4.0 to 4.1), but it is working in fresh/new installation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Instagram Filters Are Not Working [A Few Easy Fixes] - Alphr
Instagram filters add a fun and exciting element to your Stories. But sometimes, your filters fail to load or appear. Fortunately, there are...
Read more >
How To FIX Instagram Filters Not Working! (2021) - YouTube
GET SUPER CHEAP PHONES HERE: https://cheapphones.coGET AWESOME WALLPAPERS HERE: https://www.cheapphones.co/wallpapers/MY SECOND CHANNEL!
Read more >
9 Best Fixes for Instagram Effects and Filters Not Working
1. Restart Phone. The first thing you must do if Instagram effects or filters aren't working is to restart your phone. Rebooting the...
Read more >
Views "is not in" filter not working when exposed - Drupal
1. Go to Content views (/admin/structure/views/view/content). · 2. Edit the Content type filter to use the operator Is not one of and exclude ......
Read more >
I can't use Filters in DATOs view - Microsoft Power BI Community
Solved: Hello community: I have the problem that it does NOT allow me to use the filters in all the columns of my...
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