? Success

User tests: Successful: Unsuccessful:

avatar rdeutz
rdeutz
6 Feb 2015

Executive summary

This patch removes a useless and wrong attribute from a FormField

The removed line is:

statuses="*,0,1,2,-2"

It seems that this should be something like a filter but if that is the case it has to be

filter="*,0,1,2,-2"

but because the filter filters on all states it filters on nothing so it is obsolet.

Backwards compatibility

Full b/c, no problems are expected

Translation impact

none

Testing instructions

Unfortunately this Patch can’t be testet directly because we aren’t filter on something, so we have two options to make sure I am right.

A) Option 1 - Changing files

1) Open the file:
administrator/components/com_banner/models/forms/filter_banners.xml

2) Change the line

statuses="*,0,1,2,-2"

to

statuses="*,0,1"

3) Save

4) Log into to backend and go to Banners/Banners and check the Status select

5) You should see all Status:

  • Trashed
  • Published
  • Unpublished
  • Archived
  • All

6) Now change

statuses="*,0,1"

to

filter="*,0,1"

7) You should see the Status:

  • Published
  • Unpublished
  • All

B) Option 2 - by code review

If you open the file:
libraries/cms/form/field/status.php
you can see that this class is extending „JFormFieldPredefinedList“ in
libraries/joomla/form/fields/predefinedlist.php

in line 73 you can see that the used attribute is „filter“, nothing to find that is called „statuses“

avatar rdeutz rdeutz - open - 6 Feb 2015
avatar joomla-cms-bot joomla-cms-bot - change - 6 Feb 2015
Labels Added: ?
avatar brianteeman
brianteeman - comment - 6 Feb 2015

Robert can you check this with Hathor as well

I can confirm your findings following Options 1 but when switching to hathor after step 6 I still see all 5 status


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6003.
avatar rdeutz
rdeutz - comment - 6 Feb 2015

Hathor has overwrites for the banners view and is not using the filter_banners.xml, in this case it is operating as the old view before we had the search tools. So this is another problem and has noting to do with the issue here. I am only using the banners view to show the effect.

avatar brianteeman
brianteeman - comment - 6 Feb 2015

ok then makes sense

On 6 February 2015 at 22:02, Robert Deutz notifications@github.com wrote:

Hathor has overwrites for the banners view and is not using the
filter_banners.xml, in this case it is operating as the old view before we
had the search tools. So this is another problem and has noting to do with
the issue here. I am only using the banners view to show the effect.


Reply to this email directly or view it on GitHub
#6003 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar brianteeman
brianteeman - comment - 7 Feb 2015

@test unknown

After applying the patch there is no change with Isis and the status filter works as expected
Switching to Hathor and while the names of the filters are displayed the status filter does not work at all

Reverted the patch and realised that the none of the filters work in Hathor anyway in the banners component


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6003.
avatar zero-24 zero-24 - change - 7 Feb 2015
Category Administration
avatar wilsonge
wilsonge - comment - 7 Feb 2015

Can we put that Hathor thing in as a separate issue please Brian?

avatar brianteeman
brianteeman - comment - 7 Feb 2015

Sure thing will do later

avatar roland-d
roland-d - comment - 7 Feb 2015

@test success. After applying the patch I still see all the statuses. The statuses attribute is obsolete. @rdeutz The same goes for the administrator\components\com_categories\models\forms\filter_categories.xml, administrator\components\com_content\models\forms\filter_featured.xml and administrator\components\com_menus\models\forms\filter_items.xml. Can you include them in this PR?

avatar rdeutz
rdeutz - comment - 8 Feb 2015

@roland-d removed the line in the other 3 files, missed this ones because I searched for name="state" good catch Roland.

avatar brianteeman
brianteeman - comment - 8 Feb 2015

@wilsonge the hathor issue IS related to this issue and should be handled
here not in another issue. Hathor works perfectly without this PR but does
NOT work with this PR

My non-developer conclusion then is that this "obsolete" code IS used in
joomla as the hathor template uses it

On 8 February 2015 at 08:22, Robert Deutz notifications@github.com wrote:

@roland-d https://github.com/roland-d removed the line in the other 3
files, missed this ones because I searched for name="state" good catch
Roland.


Reply to this email directly or view it on GitHub
#6003 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar rdeutz
rdeutz - comment - 8 Feb 2015

No this issue has nothing to do with Hathor. Hathor implements the search filters different. The removed attribute isn't used at all.

avatar brianteeman
brianteeman - comment - 8 Feb 2015

But it works in Hathor before applying this patch and does not work after
applying the patch

On 8 February 2015 at 13:21, Robert Deutz notifications@github.com wrote:

No this issue has nothing to do with Hathor. Hathor implements the search
filters different. The removed attribute isn't used at all.


Reply to this email directly or view it on GitHub
#6003 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar rdeutz
rdeutz - comment - 8 Feb 2015

It does work after the patch, you clicked on "submit" ?

avatar brianteeman
brianteeman - comment - 8 Feb 2015

Yes and to prove I am not making things up here is a video of a clean 3,4
beta 2 install with test data. Showing filters working in hathor before the
patch and not working in hathor after the patch

https://www.dropbox.com/s/n8w5qgbntx2rdxo/banners.mp4?dl=0

On 8 February 2015 at 13:34, Robert Deutz notifications@github.com wrote:

It does work after the patch, you clicked on "submit" ?


Reply to this email directly or view it on GitHub
#6003 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar brianteeman
brianteeman - comment - 8 Feb 2015

Wow - really weird - with the exact same site I just logged out and back in again and it worked again. No idea


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6003.
avatar rdeutz
rdeutz - comment - 8 Feb 2015

Maybe something saved in the session?

avatar brianteeman
brianteeman - comment - 8 Feb 2015

Could be - I think we can ignore my report now - sorry

On 8 February 2015 at 13:56, Robert Deutz notifications@github.com wrote:

Maybe something saved in the session?


Reply to this email directly or view it on GitHub
#6003 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar rdeutz rdeutz - change - 8 Feb 2015
Status Pending Ready to Commit
avatar rdeutz rdeutz - alter_testresult - 9 Feb 2015 - roland-d: Tested successfully
avatar rdeutz
rdeutz - comment - 9 Feb 2015

I am setting this to RTC counting Brian's test as success after removing the Hathor confusion


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6003.
avatar brianteeman brianteeman - change - 9 Feb 2015
Labels Added: ?
avatar wilsonge wilsonge - change - 9 Feb 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-02-09 23:54:00
avatar wilsonge wilsonge - close - 9 Feb 2015
avatar wilsonge wilsonge - reference | - 9 Feb 15
avatar wilsonge wilsonge - merge - 9 Feb 2015
avatar wilsonge wilsonge - close - 9 Feb 2015
avatar wilsonge
wilsonge - comment - 9 Feb 2015

Merged. Thanks Robert!

Add a Comment

Login with GitHub to post a comment