? Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
31 May 2017

Pull Request for Issue #16366.

Summary of Changes

This PR fix the default filter state in backend list views. It causes by the changes in PR #15455 . Now, the first time you visit the page (articles list for example), the $published value has value null instead of '' (empty string) like before, so this line return false https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_content/Model/Articles.php#L249 , no filter is applied and all articles are being shown.

This PR just cast type of $published to string to solve the issue.

Testing Instructions

  1. Install Joomla 4, confirm the issue described at #16366

  2. Apply patch, confirm the issue fixed

avatar joomdonation joomdonation - open - 31 May 2017
avatar joomdonation joomdonation - change - 31 May 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 31 May 2017
Category Administration com_banners com_categories com_contact com_content com_languages com_newsfeeds com_plugins com_redirect com_tags
avatar Bakual
Bakual - comment - 31 May 2017

I have tested this item successfully on 670647a


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16389.

avatar Bakual Bakual - test_item - 31 May 2017 - Tested successfully
avatar joomdonation
joomdonation - comment - 31 May 2017

Thanks Thomas

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 31 May 2017 - Tested successfully
avatar C-Lodder
C-Lodder - comment - 31 May 2017

Working fine, but would it not be better to cast the result of getState in the actual function itself?

Like:

function getState()
{
    // some code

    return (string) $state;
}

Not my area, so apologies if I'm talking rubbish.

avatar joomdonation
joomdonation - comment - 31 May 2017

@C-Lodder No, it is not correct. State data is not always string, I can be any types, so we could not cast the result to string for every states. It is only needed for filter.published in this case.

avatar C-Lodder
C-Lodder - comment - 31 May 2017

ah fair enough. thanks for the explanation

avatar C-Lodder
C-Lodder - comment - 31 May 2017

I have tested this item successfully on 670647a


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16389.

avatar C-Lodder C-Lodder - test_item - 31 May 2017 - Tested successfully
avatar wilsonge wilsonge - close - 31 May 2017
avatar wilsonge wilsonge - merge - 31 May 2017
avatar wilsonge wilsonge - change - 31 May 2017
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-05-31 15:29:42
Closed_By wilsonge
Labels Added: ?

Add a Comment

Login with GitHub to post a comment