7

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

  • hi @rahul how did u fix this issue? can you please advise? – Nagaraju K Aug 20 at 8:10
  • 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. – Rahul Singh Aug 27 at 5:05
13

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 it's default and stop the infinite load.

(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.

  • yes working after empty ui_bookmark! Thanks – Jugal Kishor Aug 1 '18 at 14:09
  • Did not work for me using 2.2.5 – dbcn Nov 28 '18 at 17:36
  • This worked for me. – Ndianabasi Apr 24 at 17:50
9

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;

  • thanks, fixed my issue after a migration. so many things are wrong with the software – Breakpoint25 Apr 11 at 7:55
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

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

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.

0

Unable to add a comment that why I am putting my question here. I am facing the same issue but for the order grid. I applied the above solution but not working for me.enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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