itflow icon indicating copy to clipboard operation
itflow copied to clipboard

Bug: Canned Date Doesnt Change the GET VARs upon submit

Open johnnyq opened this issue 3 years ago • 8 comments

Moe than likely we will remove the Backend PHP Canned Date Functionality in Favor for a Javascript Canned Date Drop Down that will update the date_from and date_to fields instantly before submit.

johnnyq avatar Aug 11 '21 17:08 johnnyq

Can you please make the default listing to show all existing data in ASC order, then Canned Date selection should be optional and only if needed. For instance, when i select clients, nothing shows there, unless i select something from the drop down menu. And same for other sections where canned date is used

aftechro avatar Aug 22 '21 09:08 aftechro

Hi @aftechro you shouldn't have to select anything from the drop down menu to see all your clients. By default when you click on clients it will sort all clients by date accessed. You might be on old code for some of the data listings as this was a bug that was corrected when I was making modifications. pull the latest code and let me know if its still happening

johnnyq avatar Aug 22 '21 16:08 johnnyq

Hi Johnny,

Nope, still not working for me for some reason... I still have to select something from the lost in order to see the data

Using mariadb with php 7.4 not sure if something to do about the versioning of sql or php, and i always get the latest code as zip download (being on shared server, cant do the ssh install)

Thank you!

aftechro avatar Aug 23 '21 07:08 aftechro

That is strange im wondering if it has to do with this piece of code below in all the listings like client lists. It doesn't seem to affect me but maybe if your DB is using different region settings it may affect you, I'm using MariaDB 10.5.x post your mariadb Version

}else{
  $date_from = "0000-00-00";
  $date_to = "9999-00-00";
}

Try changing the code to the following

}else{
  $date_from = "2000-01-01";
  $date_to = "2022-01-01";
}

Let me know if that works, i'm curious?

johnnyq avatar Aug 24 '21 02:08 johnnyq

Yep, that works!

Actually is mysql Ver 8.0.26-0ubuntu0.20.04.2 for Linux on x86_64 ((Ubuntu)), not MariaDB, my mistake...used to work on MariaDB but forgot i changed the server

aftechro avatar Aug 24 '21 05:08 aftechro

Fantastic!! Although its going to not be viable for everyone to use MariaDB i'm going to have to come up with another solution. I may need your help testing some minor code changes to see if they are going to work in mysql @aftechro Right now im doing some major code refactoring so I wont be able to get to it until maybe next week depending on how busy we get here.

johnnyq avatar Aug 24 '21 18:08 johnnyq

Sure, whenever need me, count me in!

aftechro avatar Aug 25 '21 10:08 aftechro

Fantastic!! Thanks @aftechro I'm still deciding on how I want to handle this one but will keep you informed

johnnyq avatar Aug 28 '21 17:08 johnnyq

I think the majority of this was fixed in the code and the remaining bugs worked around by turning off MySQLs No Zero Date feature?

https://forum.itflow.org/d/103-mysql-compatibility-fix/6

wrongecho avatar Sep 03 '23 21:09 wrongecho

Issue due to how different database engines work with dates. MariaDB is recommended for ITFlow, but MySQL may work with the above workaround.

Closing.

wrongecho avatar Dec 03 '23 21:12 wrongecho