procajlok
Member
Hello!
I have a problem with the repeat group performance, and i dont know what field generate the problem.
In every repeat i have 27 field. Among them there are 17 fields with php validation enabled - 14 with 'notempty' 3 with 'notempty' and my php code (above this post).
The problem is when user add circa 17 repeat, the page hangs up, slows down and user cannot add new repeat and go to next page.
My question: Can You check PHP code - maybe this slows down the page?
Can we increase the performance of repeat group?
How will a repeating group behave at 80-100 repetition? - That is possible in my system!
In attachement i send screens from firefox console. There is something wrong...
There is 1st field PHP code:
2nd field:
3rd field:
Condition:
PHP Code:
#joomla3.8
I have a problem with the repeat group performance, and i dont know what field generate the problem.
In every repeat i have 27 field. Among them there are 17 fields with php validation enabled - 14 with 'notempty' 3 with 'notempty' and my php code (above this post).
The problem is when user add circa 17 repeat, the page hangs up, slows down and user cannot add new repeat and go to next page.
My question: Can You check PHP code - maybe this slows down the page?
Can we increase the performance of repeat group?
How will a repeating group behave at 80-100 repetition? - That is possible in my system!
In attachement i send screens from firefox console. There is something wrong...
There is 1st field PHP code:
PHP:
if (!function_exists('validatepesel'))
{
function validatepesel($data) {
$reg = '/^[0-9]{11}$/';
if(preg_match($reg, $data)==false)
return true;
else
{
$dig = str_split($data);
$kontrola = (1*intval($dig[0]) + 3*intval($dig[1]) + 7*intval($dig[2]) + 9*intval($dig[3]) + 1*intval($dig[4]) + 3*intval($dig[5]) + 7*intval($dig[6]) + 9*intval($dig[7]) + 1*intval($dig[8]) + 3*intval($dig[9]))%10;
if($kontrola == 0) $kontrola = 10;
$kontrola = 10 - $kontrola;
if(intval($dig[10]) == $kontrola)
return true;
else
return false;
}
}
}
return validatepesel($data);
if (validatepesel($data) != 0){
return true;
} else {
return false;
}
2nd field:
PHP:
$panama = strtotime("2019/01/21");
$wiek14 = (14 * 60 * 60 * 24 * 365);
$pole = strtotime ($data);
if( $pole < ($panama - $wiek14)) {
return true;
} else {
return false;
}
3rd field:
Condition:
PHP:
$paszp_walid = '{zgloszenia___gr_etap1}';
$myUser = JFactory::getUser();
$myLevels = $myUser->getAuthorisedViewLevels();
if($paszp_walid = "1" AND !in_array(7, $myLevels)) {
return true;
} else {
return false;
}
PHP Code:
PHP:
$paszp_wazn = strtotime ( date('d-m-Y', strtotime(str_replace(".","-",$data))));
$paszp_data_wymagana = strtotime ("1 February 2019");
if($paszp_data_wymagana <= $paszp_wazn) {
return true;
} else {
return false;
}
#joomla3.8