? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
2 Nov 2019

Pull Request for Issue #26749

Summary of Changes

Taking into account both int and string possibility to display No and Hide to be B/C

Testing Instructions

Display Global Configuration

Before patch

Screen Shot 2019-11-02 at 08 20 22

After patch

Screen Shot 2019-11-02 at 08 17 57

avatar infograf768 infograf768 - open - 2 Nov 2019
avatar infograf768 infograf768 - change - 2 Nov 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Nov 2019
Category Layout
avatar alikon alikon - test_item - 2 Nov 2019 - Tested successfully
avatar alikon
alikon - comment - 2 Nov 2019

I have tested this item successfully on fe97446


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

avatar rajnish-dargan rajnish-dargan - test_item - 2 Nov 2019 - Tested successfully
avatar rajnish-dargan
rajnish-dargan - comment - 2 Nov 2019

I have tested this item successfully on fe97446

#pbf19 #test1


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

avatar vaibhavsTekdi vaibhavsTekdi - test_item - 2 Nov 2019 - Tested successfully
avatar vaibhavsTekdi
vaibhavsTekdi - comment - 2 Nov 2019

I have tested this item successfully on fe97446

#pbf19 #test2


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

avatar alikon alikon - change - 2 Nov 2019
Status Pending Ready to Commit
avatar alikon
alikon - comment - 2 Nov 2019

RTC


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

avatar SharkyKZ
SharkyKZ - comment - 2 Nov 2019

Doesn't work with float-like values.

avatar infograf768
infograf768 - comment - 2 Nov 2019

@SharkyKZ

Doesn't work with float-like values.

I do not understand. Please explain a case.

It never works for any other option value than 0/1 in the xml

avatar infograf768 infograf768 - change - 3 Nov 2019
Labels Added: ? ?
avatar Quy Quy - change - 3 Nov 2019
Title
[4.0] Fixing switcher label #2649
[4.0] Fixing switcher label #26749
avatar Quy Quy - edited - 3 Nov 2019
avatar Quy
Quy - comment - 7 Nov 2019

Please view configuration.php. Look for settings with true and false values.
Under System > System Information > Configuration File, true and false are displayed as 1 as a string and empty string respectively.

Therefore, you only need to check for empty string (false) and assign it 0 as a string which is a simpler fix.

		$value		= $value === '' ? '0' : $value ;
		$checked	= ((string) $option->value == $value) ? 'checked="checked"' : '';
		$active		= ((string) $option->value == $value) ? 'class="active"' : '';
avatar infograf768 infograf768 - change - 7 Nov 2019
Status Ready to Commit Pending
avatar infograf768
infograf768 - comment - 7 Nov 2019

@Quy Done
Took off RTC until tested again.
@alikon @SharkyKZ

avatar infograf768 infograf768 - change - 7 Nov 2019
Labels Removed: ?
avatar ChristineWk ChristineWk - test_item - 11 Nov 2019 - Tested successfully
avatar ChristineWk
ChristineWk - comment - 11 Nov 2019

I have tested this item successfully on 14620e0


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

avatar Quy Quy - test_item - 13 Nov 2019 - Tested successfully
avatar Quy
Quy - comment - 13 Nov 2019

I have tested this item successfully on bf8ee6d


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

avatar infograf768 infograf768 - change - 14 Nov 2019
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 14 Nov 2019

rtc


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

avatar infograf768 infograf768 - change - 14 Nov 2019
Labels Added: ?
avatar Quy Quy - change - 17 Nov 2019
Status Ready to Commit Pending
avatar Quy
Quy - comment - 17 Nov 2019

Removed RTC to address Harald's comment.

avatar alikon
alikon - comment - 17 Nov 2019

what this pr still need to do to became RTC ? unable to find

Harald's comment.

avatar Quy
Quy - comment - 17 Nov 2019

Discussion in Glip. This PR forces empty string to be 0 which does not allow the case when a value should be an empty string.

avatar brianteeman
brianteeman - comment - 17 Nov 2019

In what scenario would a radio have an empty string value

avatar infograf768
infograf768 - comment - 18 Nov 2019

@HLeithner
Please comment.

avatar infograf768 infograf768 - change - 18 Nov 2019
Labels Removed: ?
avatar HLeithner
HLeithner - comment - 18 Nov 2019

@brianteeman for example if the value should be empty^^

<select><option value="">JNONE</option><option value="enlightenment">JENLIGHTENMENT</option></select>

For me I don't understand why it should not be possible to have an empty value.

avatar SharkyKZ
SharkyKZ - comment - 18 Nov 2019

@brianteeman In Global Configuration. Radio fields with 0/1 values are stored as booleans in configuration.php. When cast as string false becomes an empty string.

avatar brianteeman
brianteeman - comment - 18 Nov 2019

By definition one item in a radio should always have a value unlike a checkbox- or am I completely missing the point here

avatar HLeithner
HLeithner - comment - 18 Nov 2019

An empty value is not invalid.

avatar Quy
Quy - comment - 18 Nov 2019

Please test PR #27098.

avatar infograf768
infograf768 - comment - 19 Nov 2019

Shall this be closed?

avatar Quy Quy - close - 19 Nov 2019
avatar Quy Quy - change - 19 Nov 2019
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2019-11-19 15:03:10
Closed_By Quy

Add a Comment

Login with GitHub to post a comment