Skip to content

[4.0] Fix the new emptyState feature #33466

@bembelimen

Description

@bembelimen

The emptyState feature is really nice, but the database query has two issues:

Steps to reproduce the issue

First issue:

Go to a model and add the following code:

	public function getTest()
	{
		echo $this->_getListQuery()->dump();

		$this->getIsEmptyState();

		echo $this->_getListQuery()->dump();
	}

Now call in your view:
$this->get('Test');

2nd issue:

have a query with 2 from or joins, grouping, having, etc.

Expected result

First issue

twice the same query

Second issue

The method is generic enough to work all the time (Imho clearing the query is per se wrong, it should build up the query...but that's my opinion)

Actual result

First issue

different queries

Second issue

It fails on so many instances (Joins, Grouping, several froms, ...)

Additional comments

The emptyState check changes the original query instead of making a clone (which is still broken) or do a normal new query with the correct syntax. => also check _getListCount(...)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions