Skip to main content
Topic: Error on Date Field component in mode Range, PHPRad version 2.7.1 (Read 1940 times) previous topic - next topic

Error on Date Field component in mode Range, PHPRad version 2.7.1

Hi, friends from PHPRad!

Can you help us on this issue?

After setup of a Date Field component with mode Range, we have tested a date interval and received the following error message:

Notice: Undefined offset: 1 in C:\xampp\htdocs\mysilo\app\controllers\AvaliacoesController.php on line 101

Thanks!

Euder Ribeiro
  


Re: Error on Date Field component in mode Range, PHPRad version 2.7.1

Reply #2
@Wilvin , I´ve added the files at the bottom.

Re: Error on Date Field component in mode Range, PHPRad version 2.7.1

Reply #3
@Euder‍ from my end the configurations works fine with no error, please provide a screenshot of this file C:\xampp\htdocs\mysilo\app\controllers\AvaliacoesController.php showing line 101

Re: Error on Date Field component in mode Range, PHPRad version 2.7.1

Reply #4
@Wilvin, good morning!

Done.

Re: Error on Date Field component in mode Range, PHPRad version 2.7.1

Reply #5
@Euder‍ the issue is with your app language if you check the screenshot you sent, you'll see that phprad uses the "to" keyword to split the two dates selected into an array and yours is "até", because of this the end date is not gotten. if you check the link generated, when you click on the date filter you will see the word am talking about. In the meantime, the solution is to edit the file manually and replacing the "to" with "até" C:\xampp\htdocs\mysilo\app\controllers\AvaliacoesController.php on line 99.

Re: Error on Date Field component in mode Range, PHPRad version 2.7.1

Reply #6
Regarding language, I´ve some corrections and, if it´s possible, I would like to help you.

Re: Error on Date Field component in mode Range, PHPRad version 2.7.1

Reply #7
Hi @Wilvin,

Now that I´ve corrected manualy the file, we have a new issue (see screenshot): The criteria o top of the list is incorrect. I was revising other aplications made with the previous version of PHPRad and they worked fine in Portuguese and date ranges.



Re: Error on Date Field component in mode Range, PHPRad version 2.7.1

Reply #9
Nope, the date range is correct. It is after the filter apply. The list is matching the date range but the criteria is wrong.