27

Whenever I open the Catalog Product it gives the following error on loop and continue loading the loader

Attention Something went wrong.

Something went wrong with processing the default view and we have restored the filter to its original state.

I tried clear the cache(php bin/magento cache:clean)also upgraded magento(php bin/magento setup:upgrade)even given the files and folder permission but still facing the same problem.

loading

3
  • hi @rahul how did u fix this issue? can you please advise? Aug 20, 2019 at 8:10
  • 2
    temporary fix is to clear (empty, not delete) the ui_bookmark table of your magento 2 database, this will reset the grid back to it's default and stop the infinite load. Aug 27, 2019 at 5:05
  • I started having this issue after upgrade from 1.9.0.1 to 2.3.3 only when I tried to sort elements by some parameter. Though when I created another user it didn't have that issue. More like temporary fix but it worked for me.
    – in43sh
    Feb 18, 2020 at 0:05

11 Answers 11

49

Old post but for future viewers - a temporary fix is to clear (empty, not delete) the ui_bookmark table of your Magento 2 database, this will reset the grid back to its default and stop the infinite load.

 TRUNCATE ui_bookmark;

(you can find out your admin user ID in the admin_users table as well and only remove the ui_bookmark rows relevant to your account if this is a multi-admin site)

The actual problem can be harder to diagnose, but a good place to start (and in my case) was to increase the PHP timeout limit.

8
  • yes working after empty ui_bookmark! Thanks Aug 1, 2018 at 14:09
  • 1
    Did not work for me using 2.2.5
    – dbcn
    Nov 28, 2018 at 17:36
  • This worked for me.
    – Ndianabasi
    Apr 24, 2019 at 17:50
  • not working after empty ui_bookmark! magento 2.3.2 Feb 6, 2020 at 5:31
  • 1
    Worked for me on magento 2.4.0
    – Black
    Oct 29, 2020 at 16:28
17

In My Case, It was due to that some null SKU related error I resolved using the following query.

UPDATE catalog_product_entity SET sku='' WHERE sku IS NULL;

run SELECT * FROM catalog_product_entity WHERE sku IS NULL to check all product not have sku, then update them

1
  • 2
    thanks, fixed my issue after a migration. so many things are wrong with the software Apr 11, 2019 at 7:55
3

It might be solved by cleaning the bookmarks database table using the command below.

TRUNCATE ui_bookmark;

In case it didn't solve the issue you can try to solve it by increasing the admin user session in this admin option below.

Magento 2 Admin user session

1
  • 1
    This was the correct answer for me, increasing the admin session size solved the issue on Magento 2.4.3-p1
    – Mir
    May 11, 2022 at 9:05
2

Sometimes, this error is made by version upgrade. In my case, I upgraded Magento 2.2.7 to 2.3.1 and then I got this error in the product grid panel of backend. So I checked "catalog_product_entity" table in the database. There were several products with NULL as sku value. I made those skus empty and the error went away!!! I hope this will be helpful for you.

2

Add rights for:

  • Invoices
  • Shipments
  • Credit Memos

This will fix the error message.

4
  • This is working fine for me as well Thank you! Nov 18, 2021 at 6:35
  • What does "Add rights for" mean?
    – Tobe_Sta
    Dec 1, 2021 at 2:30
  • Visit the user roles section in Magento admin, select the appropriate role and enable the checkboxes for Invoices, Shipments and Credit Memos under section: Sales » Operations » Orders » Actions.
    – Edd
    Dec 4, 2021 at 11:38
  • @Edd Thanks it's working for me.
    – Vivek
    Jul 26, 2022 at 6:44
1

I've had this issue for some Users which only had very restricted Access to the magento backend. Giving those users access to the product catalog fixes the immediate issue.

Note that these users will be able to edit products with that access, as there is no view-only access for the catalog -.-

enter image description here

1

This may help someone like me who using UI Component in area other than Admin.

I found this error in the front end/ seller portal. I'm using an extension that is using UI components to create grids in the seller portal.

I have created a new grid following examples from blogs that were created for the Admin area.

I observed the network request having namespace keyword throwing 302 status.

I found this error and it was due to the below code

<dataSource name="data_source">
    <argument name="dataProvider" xsi:type="configurableObject">
        <argument name="class" xsi:type="string">Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider</argument>
        <argument name="name" xsi:type="string">data_source</argument>
        <argument name="primaryFieldName" xsi:type="string">id</argument>
        <argument name="requestFieldName" xsi:type="string">id</argument>
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
                <item name="update_url" xsi:type="url" path="mui/ui/render"/>
            </item>
        </argument>
    </argument>
</dataSource>

Later I searched in the extension itself and found the URL they have used instead of mui/ui/render for this kind of operation and that fixes the problem.

0

This commit can solve your problem.

https://github.com/magento/magento2/pull/14905

Magento/Framework/View/Element/UiComponent/DataProvider/FulltextFilter.php

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Magento\Framework\View\Element\UiComponent\DataProvider;
use Magento\Framework\Data\Collection;
use Magento\Framework\Data\Collection\AbstractDb;
use Magento\Framework\Api\Filter;
/**
 * Class Fulltext
 */
class FulltextFilter implements FilterApplierInterface
{
    /**
     * Returns list of columns from fulltext index (doesn't support more then one FTI per table)
     *
     * @param AbstractDb $collection
     * @param string $indexTable
     * @return array
     */
    protected function getFulltextIndexColumns(AbstractDb $collection, $indexTable)
    {
        $indexes = $collection->getConnection()->getIndexList($indexTable);
        foreach ($indexes as $index) {
            if (strtoupper($index['INDEX_TYPE']) == 'FULLTEXT') {
                return $index['COLUMNS_LIST'];
            }
        }
        return [];
    }
    /**
     * Add table alias to columns
     *
     * @param array $columns
     * @param AbstractDb $collection
     * @param string $indexTable
     * @return array
     */
    protected function addTableAliasToColumns(array $columns, AbstractDb $collection, $indexTable)
    {
        $alias = '';
        foreach ($collection->getSelect()->getPart('from') as $tableAlias => $data) {
            if ($indexTable == $data['tableName']) {
                $alias = $tableAlias;
                break;
            }
        }
        if ($alias) {
            $columns = array_map(
                function ($column) use ($alias) {
                    return '`' . $alias . '`.' . $column;
                },
                $columns
            );
        }
        return $columns;
    }
    /**
     * Escape against value
     * @param string $value
     * @return string
     */
    private function escapeAgainstValue(string $value): string
    {
        return preg_replace('/([+\-><\(\)~*\"@]+)/', ' ', $value);
    }
    /**
     * Apply fulltext filters
     *
     * @param Collection $collection
     * @param Filter $filter
     * @return void
     */
    public function apply(Collection $collection, Filter $filter)
    {
        if (!$collection instanceof AbstractDb) {
            throw new \InvalidArgumentException('Database collection required.');
        }
        /** @var SearchResult $collection */
        $mainTable = $collection->getMainTable();
        $columns = $this->getFulltextIndexColumns($collection, $mainTable);
        if (!$columns) {
            return;
        }
        $columns = $this->addTableAliasToColumns($columns, $collection, $mainTable);
        $collection->getSelect()
            ->where(
                'MATCH(' . implode(',', $columns) . ') AGAINST(?)',
                $this->escapeAgainstValue($filter->getValue())
            );
    }
}
0
0

File open:

\vendor\magento\framework\View\Element\UiComponent\DataProvider\FulltextFilter.php

Function change:

public function apply(Collection $collection, Filter $filter)
{
    if (!$collection instanceof AbstractDb) {
        throw new \InvalidArgumentException('Database collection required.');
    }

    /** @var SearchResult $collection */
    $mainTable = $collection->getMainTable();
    $columns = $this->getFulltextIndexColumns($collection, $mainTable);
    if (!$columns) {
        return;
    }

    $columns = $this->addTableAliasToColumns($columns, $collection, $mainTable);
    $collection->getSelect()
        ->where(
            'MATCH(' . implode(',', $columns) . ') AGAINST(?)',
          //  $filter->getValue()
            $this->escapeAgainstValue($filter->getValue())
        );
}

0

None of the above worked for me. What solved the problem for me is related to the admin user roles configuration as described in this article: https://medium.com/@teacha/magento-2-something-went-wrong-with-processing-the-default-view-and-we-have-restored-the-filter-9e2810733e71

When I provide all access to the orders section, the problem was solved. When access is partial, this error may appear. It's not ideal, especially if some users shouldn't have accesss to certains of the admin order page, but this is good solution for me until the bug is fixed by Magento.

3
  • By default admin having the all user role assigned, if you add any 2nd user and want to give the access of admin in that case you have to assign the role Jul 8, 2020 at 9:40
  • @RahulSingh correct. I only had this issue with 2nd user role, not with my admin role. Jul 9, 2020 at 10:05
  • then your solution is correct in this case Jul 10, 2020 at 11:04
0

I was also getting similar issue (Magento2.3.5-p2) when I had a user with limited access role to view the orders.

enter image description here

When I allowed the resources under Archive then after the issue was fixed.

Not the answer you're looking for? Browse other questions tagged or ask your own question.