?
avatar lawrakina
lawrakina
31 Aug 2017

Steps to reproduce the issue

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 }

Expected result

Actual result

System information (as much as possible)

[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

Additional comments

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar lawrakina lawrakina - open - 31 Aug 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 31 Aug 2017
avatar SharkyKZ
SharkyKZ - comment - 31 Aug 2017

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.

avatar lawrakina
lawrakina - comment - 31 Aug 2017

Thank you for the help!
Please forgive a silly question from my side.


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 31 Aug 2017

@lawrakina if this Isuue is solved please close it, thanks.

avatar ggppdk
ggppdk - comment - 31 Aug 2017

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 ...

avatar ggppdk
ggppdk - comment - 31 Aug 2017

Also maybe the "Integer" name for the field is bad, maybe a name "Integer drop-down select" or something shorter

avatar lawrakina
lawrakina - comment - 31 Aug 2017

Thank you very much for the answers! I will try!


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 31 Aug 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-08-31 09:06:28
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 31 Aug 2017
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 31 Aug 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 31 Aug 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 31 Aug 2017

closed; Issue can always reopened.


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

Add a Comment

Login with GitHub to post a comment