? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
30 Apr 2021

Fixes #33445

avatar PhilETaylor PhilETaylor - open - 30 Apr 2021
avatar PhilETaylor PhilETaylor - change - 30 Apr 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 Apr 2021
Category Administration com_categories com_tags Libraries
avatar joomdonation
joomdonation - comment - 1 May 2021

@PhilETaylor @Bakual I think we should re-think about the implementation of method getIsEmptyState in our model classes. As of right now, we assume that the method is always called after getItems method (mean we have $query property already initialized somewhere)

However, since it is a Public method, we could not assure that. For a public method like that, developer could call it anytime they want and not depend on the calling of other methods. For example, in any view class, if we call this command at the top:

$this->isEmptyState = $this->get('IsEmptyState');

We will get error below:

Call to a member function clear() on array

To implement this method properly, we can borrow getTotal method from ListModel class.

avatar richard67
richard67 - comment - 1 May 2021

See also #33466 ... seems me and others missed that when testing/reviewing.

avatar PhilETaylor
PhilETaylor - comment - 1 May 2021

@joomdonation please move discussion of removing getIsEmptyState content to #33466

This PR stands on its own to fix a specific issue, and works well.

avatar PhilETaylor PhilETaylor - change - 1 May 2021
Labels Added: ?
avatar PhilETaylor PhilETaylor - change - 1 May 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-05-01 17:58:26
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - close - 1 May 2021

Add a Comment

Login with GitHub to post a comment