Welcome, Guest
Username: Password: Remember me

TOPIC: [SOLVED] Radio Boxes, Boolean Fields & Required

[SOLVED] Radio Boxes, Boolean Fields & Required 10 Oct 2011 16:29 #183

  • Tocpe
  • Tocpe's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
I think I may have found a bug...

I generated a boolean field in my table and I don't think I set it to be required. But when I d/l the code install it and load the form to enter new data, I get the following PHP error:

Notice: Undefined property: JDomHtmlFormInputRadio::$required in C:\wamp\www\[my app]\administrator\components\com_mycom\dom\html\form\input\radio.php on line 106

It appears the array is missing a required entry because when I added 'required' => true, to the array the error disappeared.

Here is where I added the require bit in the view form:
<tr>
	<td align="right" class="key">
		<label for="publish">
			<?php echo JText::_( "MYCOM_FIELD_PUBLISH" ); ?> :
		</label>
	</td>
	<td>
		<?php echo JDom::_('html.form.input.bool', array(
						'dataKey' => 'publish',
						'dataObject' => $this->myuser,
						'aclAccess' => 'core.edit.state',
                                                 'required' => true,
						));
		?>
	</td>
</tr>

I'm also noticing a similar error for inputs:
Notice: Undefined property: JDomHtmlFormInput::$validatorInvert in C:\wamp\www\[my app]\administrator\components\com_mycom\dom\html\form\input.php on line 127
Last Edit: 09 Nov 2011 20:46 by admin.
The administrator has disabled public write access.

Re: Bug Report: Radio Boxes, Boolean Fields & Required 10 Oct 2011 16:42 #184

  • Tocpe
  • Tocpe's Avatar
  • Offline
  • New Member
  • Posts: 3
  • Karma: 0
and this error also accompanies the inputs:
Notice: Undefined property: JDomHtmlFormInput::$validatorInsensitive in C:\wamp\www\[my app]\administrator\components\com_mycom\dom\html\form\input.php on line 122

The input form errors seem to originate from:
Line 122: validator case sensitivity
Line 127: validator inversion selection
The administrator has disabled public write access.

Re: Bug Report: Radio Boxes, Boolean Fields & Required 10 Oct 2011 17:19 #185

  • doob
  • doob's Avatar
  • Offline
  • Junior Member
  • Posts: 22
  • Thank you received: 2
  • Karma: 5
There are only Notices, believe me there is much much more it's because PHP interpreter didn't find a value for exiting variable (property) like
class X {
public $xaxa;
private $xoxo;
public function __construct(){
	if ($xaxa ==1) {$xoxo = 2;}
}

}
then you have $xoxo undefined and PHP interpreter noticed you about unused memory for this var...
The administrator has disabled public write access.

Re: Bug Report: Radio Boxes, Boolean Fields & Required 11 Oct 2011 13:43 #192

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Notices & Warnings are really ennoying, for exemple
foreach($array as $item)
{
	
}
You should write
if (isset(array) && count(array))
foreach($array as $item)
{
	
}


Well, you can desactivate the notices and warnings, but, Cook should be more clean and not raise any Notice or Warning.

Took note.
Coding is now a piece of cake
Last Edit: 11 Oct 2011 13:44 by admin.
The administrator has disabled public write access.

Re: Bug Report: Radio Boxes, Boolean Fields & Required 12 Oct 2011 04:37 #205

  • griiettner
  • griiettner's Avatar
  • Offline
  • Senior Member
  • Posts: 73
  • Thank you received: 12
  • Karma: 8
A topic was open on the Cleaning section where we can let the Admin know about Notices and Warnings... but please... try to add the issues with solutions if you can... so.. by this way, you can help the developers easily identify the issue and apply the fix...
Paulo Griiettner
The administrator has disabled public write access.

Re: Bug Report: Radio Boxes, Boolean Fields & Required 13 Oct 2011 17:07 #224

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Thanks griiettner.


Moved.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Bug Report: Radio Boxes, Boolean Fields & Required 14 Oct 2011 16:30 #239

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Solved since 1.3.3
Coding is now a piece of cake
Last Edit: 14 Oct 2011 18:13 by admin.
The administrator has disabled public write access.

Re: [SOLVED] Radio Boxes, Boolean Fields & Required 14 Oct 2011 19:10 #245

  • griiettner
  • griiettner's Avatar
  • Offline
  • Senior Member
  • Posts: 73
  • Thank you received: 12
  • Karma: 8
Hello, I think your name is Jocelyn if I'm not mistaken...

Thanks for the e-mail and you can count on me for one of the paid members... I'll definitely become a member of this awesome tool... it is saving weeks of working time... so I can enjoy more free time with my kids...

Thank you
Paulo Griiettner
The administrator has disabled public write access.
Time to create page: 0.102 seconds

Get Started