the problem with big numbers
good day, installed a clean Joomla 3.7.0 updated to 3.7.5
added several categories of materials, said group of fields, added the fields themselves.
If you specify the value of a field "integer" = 100000000, I get the error
/public_html/libraries/joomla/form/fields/integer.php
73 for ($i = $first; $i <= $last; $i += $step)
74 {
75 // $options[] = JHtml::_('select.option', $i);
76 }
[31-Aug-2017 09:30:20 Europe/Moscow] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in /home/l/lawrfeu1/main.lawrfeu1.beget.tech/public_html/libraries/cms/html/select.php on line 515
Thank you for the help!
Please forgive a silly question from my side.
@lawrakina if this Isuue is solved please close it, thanks.
The text field with integer filter is for this purpose just it is lacking browser side validation
At minimum
class="validate-numeric"
can be added by the text field when integer filter is selected
Or better add class="validate-integer"
, this will requiring addin 1 more case at validate.js
setHandler('integer', function(value, element) {
var regex = /^[0-9]*$/;
return regex.test(value);
});
Also notice that above element is passed to the handler,
so tag attibutes like data-value-min="..."
and data-value-max="..."
could also be used ...
Also maybe the "Integer" name for the field is bad, maybe a name "Integer drop-down select" or something shorter
Thank you very much for the answers! I will try!
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-08-31 09:06:28 |
Closed_By | ⇒ | franz-wohlkoenig |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/17792
closed; Issue can always reopened.
Integer field creates a select containing options based on min, max and step values. It's not the right field type to use if you intend to have a large number of valid values. Text field with integer filter or number field would be more fitting.