Php Notices on Insert, bug with empty value.
Php Notices on Insert, bug with empty value.
2 Things:
a) Using Generator and adding the 3rd parameter to the init call in the php script I get the following notice on insert (the record inserts just fine) which appears to be when the editor is calling the id.
REDACTED PATH
<br />
<b>Notice</b>: Undefined index: id in <b>/public_html/jquery/DataTables-1.10.0/extensions/Editor-1.3.0/php/Editor/Field.php</b> on line <b>466</b><br />
<br />
<b>Notice</b>: Undefined index: id in <b>/public_html/jquery/DataTables-1.10.0/extensions/Editor-1.3.0/php/Editor/Field.php</b> on line <b>466</b><br />
<br />
<b>Notice</b>: Undefined index: id in <b>/***public_html/jquery/DataTables-1.10.0/extensions/Editor-1.3.0/php/Editor/Field.php</b> on line <b>466</b><br />
{"row":{"DT_RowId":"row_26","ag_name":"TEst","ag_website":"TEST.COM","ag_email":""}}
I have added the correct 'ag_id' as the third param. Is this something I can safely ignore?
b) When usng Generator and selecting a URL field and ALSO 'can be blank' the validation never completes. Is it fair to say that its not possible to validate a field that can also be empty (logically it seems ok - but will go with the flow).
I can provide url links if required but I think the above is enough as its a very broad situation.
Oo
This question has an accepted answers - jump to answer
Answers
I am experiencing the exact same issue and behavior as item a) above. I noticed it immediately after upgrading to DT 1.10 and Editor 1.3 from 1.9.4 and 1.2.x? respectively. I commented out the line 466 in the Field.php file so I can keep developing, but obviously I would like to know when a fix is applied. I'm also using the third parameter to identify the key.
I'm afraid this is a bug in Editor 1.3.0. I'm going to release 1.3.1 next week with a fix, but for the moment, the patch to address it is actually relatively simple. What do to is edit the
php/Editor/Field.php
file and change:to be:
Thanks for letting me know about this. I'll look into it later today and publish a fix on the Editor site.
Regards,
Allan
Hi Allan
Cheers for the update - I had supressed errors on that line as a dramatic hack (as mschroeder also) so was moving on, look forward to the update.
The validator issue is worked around by selecting required as well as the format.
I think it might be just the way generator works, its no biggy.