Issues recording Date Fields
-
Hi, thank you for this very usefull plugin. I’m about to purchase the date picker addon. Before that, I need to solve one issue about the Date Fields, I have several date fields in my form, the problem is: sometimes I add a date and when I save it, the field displays the date in a random order. For example, I tape 22-01-23 and when I save the field displays 23/01/22 when it supposed to display 22/01/23. This Issue doesn’t happen all the time, but it’s odd when it happens. Another issue with date fields is: when I save one date, other date fields (randomly) appears blank (after saving), I mean, seems like I was erased those fields info.
It’s difficult to me make a “log” of the issues because 1) Them doesn’t happen all the time, but they happen too frequent and that’s odd. and 2) It doesn’t happen with an specific date field, it happens randomly, and all of them are set in a same way.
I have update wordpress, PHP (to version 8.0), my theme, the plugin’s version is the newest, so I don’t know what else to do.
As I told you I need to solve those odd issues before purchase the datepicker addon. Thank you in advance for your help. I’ll wait for your response. And again thank you for this very useful plugin.
The page I need help with: [log in to see the link]
-
Parsing dates that are input as numbers with various delimiters can lead to problems as they can be ambiguous (is the first number a month or a date?) and php sometimes gets it wrong.
The datepicker is a good way to solve this, another approach is to enforce a specific format for the input.
Thank you for the response, I have set the format for the date input this way: d\m\y and have checked the “force strict date format” box. But the issue still unsolved.
Any clue about the date fields that become blank when I save other different date fields.
Thank you again for your kindness.
When using the strict dates setting it’s usually necessary to have the “Input Date Format” match your site’s date format.
Numeric dates are fussy.
- This reply was modified 1 year, 9 months ago by xnau webdesign.
Thank you again for your response, but the problem is not solved yet. The input date format match perfectly with the wordpress core date format. I guess I can’t purchase the datepicker addon until I don’t solve this two issues, because whatever is causing them will afect the same way having a date picker or not.
OK, I don’t understand what the problem is exactly.
You have “strict dates” on, with the format set to “d\m\y”
You say it doesn’t work, does that mean that when someone inputs a date with the correct format, it still gets the date wrong? Can you give me a specific example?
Thank you for your response. I’ll try to be as clear as possible.
I have two Issues here:
- I have set “strict date” on the format d/m/y but when I save (carefuly based on that format) can happen one of the following three things: a) The field saves right b) The field saves with a wrong date or c) The filed doesn’t save anything and the result is a blank field. Those options happen randomly. I have try with “strict date” off and the result is the same.
- In my Form I have more than one date fields but the plugin (or my wordpress, MYSQL, etc. I don’t really know where the problem is) doesn’t allow me to save more than one date (field). when I got luky in Issue 1 and the result is a field saved (with the date correct or incorrect) no matter how many times I try to save info in the other fields it always gives me as result a blank field, so, the system only allows me to save just one date field.
I need to purchase the datepicker in order to make it easy for my clients to input the date, but I’m worried about this two issues, because them can happen with or without the datepicker. I need to solve them first. I probably will need to purchase other addons in a near future but I need the plugin work fine until then.
I can allow you to enter in my backend if you need to take a look for technical purposes.
The problem is probably not in the configuration, it sounds like you got that right, and I know this is working I’ve tested it with your settings and it’s working reliably.
The fact that you’re getting inconsistent results suggest you’ve got some kind of caching active on the page, you should make sure caching is not active on pages with Participants Database forms.
Thank you for your reply. I have disabled my cache plugin (Litespeed cache) and now the dates are saving “right” (with one or two exceptional cases where I have to try two o three times in order to get the date fiel saved right). Now I have one data text field that is not saving, I’m wondering if there’s any issue if I have several input fields, because, the plugin (now that I have disabled my cache plugin) is working better than before but not 100% right. Another question is, how may I flush cache if I had to disable my cache plugin, do you recomend an specific cache plugin or what can I do?… Thank you for your useful help. I’ll purchase the date picker addon.
Ok, I have installed the date picker and now the plugin doesn’t save any date :’-)
So far, I haven’t been able to figure out what’s going on for you there. I’ve tried testing pretty much the exact setup you’re using (as much as I can with what I know) and not seeing any problems here, so we need more information to move forward with this.
The next step is to take a look at your php error log. You should clear the log then test saving a date.
Another thing that can be a factor is make sure your php installation includes the “intl” module. Ask your hosting provider about this if you don’t have control over which php modules are included.
My other suggestion is you try using a different date format, using month names is much more reliable, for instance. But since your settings are working fine for me here, this isn’t really a solution, just avoiding the problem.
Thank you for you kind reply: I will paste here the log. I cleaned it and then try again to save a date by using the date picker, and it didn’t work, if you see some dates saved those were save before installing the datepicker. The field that I tried to save is the first “fecha” date field, After “proxima_cita_1” field.
I have PHP 8.0 installed and the module “intl” is correctly activated. Thank you in advance.
Archivo de registro iniciado en: 18/02/23 18:36 UTC
[02/18/23 6:36pm UTC]
PDb_Session::get_alt_session_id obtaining session id by alternate method: PDB cookie: n0pebeht2id5iet5b6odma1acf
Archivo de registro iniciado en: 18/02/23 18:36 UTC
[02/18/23 6:36pm UTC]
PDb_Session::get_alt_session_id obtaining session id by alternate method: PDB cookie: n0pebeht2id5iet5b6odma1acf
Archivo de registro iniciado en: 18/02/23 18:36 UTC
[02/18/23 6:36pm UTC]
PDb_List_Admin::initialize list query: SELECT * FROM wpsx_participants_database p ORDER BY date_updated desc LIMIT 0,100
[02/18/23 6:36pm UTC]
PDb_Session::get_alt_session_id obtaining session id by alternate method: PDB cookie: n0pebeht2id5iet5b6odma1acf
Archivo de registro iniciado en: 18/02/23 18:36 UTC
[02/18/23 6:36pm UTC]
PDb_Participant_Cache::refresh_cache: Refreshing Participants Database cache for cache group 0
[02/18/23 6:36pm UTC]
PDb_Session::get_alt_session_id obtaining session id by alternate method: PDB cookie: n0pebeht2id5iet5b6odma1acf
[02/18/23 6:36pm UTC]
PDb_submission\main_query\base_query::execute_query storing record: UPDATE wpsx_participants_database SETdate_updated
= "2023-02-18 18:36:26",first_name
= 'Joel Nuevo',cédula_de_identidad
= 'cccccccccc',phone
= 'ccccccccc',address
= 'ccccccccccc',email
= '[email protected]',instagram
= 'aaaaaaaaaaaa',nombre_del_paciente
= 'aaaaaa',photo
= '',especie
= 'Canino',raza
= 'aaaaaaaaaa',edad
= 'aaaaaaa',fecha_de_nacimiento
= '480315600',color
= 'aaaaa',microchip
= 'aaaaaaa',sexo
= 'Macho',esterilizado
= 'No',peso
= 'aaaaaaaa',desparasitación
= '480315600',vacunas
= '',tarjeta_de_vacunas
= '',tarjeta_de_vacunas_2da_cara
= '',alimentación
= 'aaaaaaaaaaa',fuc
= 'NA',historia_previa
= '',tratamientos_previos
= '',fiv
= '',fecha_última_cita
= '480315600',próxima_cita_1
= '480315600',fecha
= '',motivo_de_la_consulta
= '',alimentación_1
= '',apetito_1
= '',micción_1
= 'Normal',defecación_1
= 'Dura, café',vómito_1
= 'No',convulsiones_1
= 'No',parámetros_fisiológicos
= 'Peso:\r\nT°:\r\nFC:\r\nFR:\r\nCP:\r\nPA:\r\nTPC:\r\nMembranas Mucosas:\r\nGanglios Linfáticos:\r\nRT:\r\nRD:',condición_corporal_1
= '',presión_1
= 'NE',examen_físico
= 'Estado de Hidratación:\r\nCavidad Bucal:\r\nSistema Tegumentario:\r\nOjos:\r\nOídos:\r\nNariz:\r\nSistema Digestivo:\r\nSistema Respiratorio:\r\nSistema Nervioso:\r\nSistema Musculo-Esquelético:\r\nSistema Cardiovascular:\r\nSistema Genito-Urinario:\r\nTimo:',diagnóstico_consulta_1
= '',tratamiento_consulta_1
= '',lab_2
= '',lab_1
= '',imagen_adicional
= '',imagen_adicional_2
= '',diagnóstico_defitivo
= '',fecha_consulta_2
= NULL,motivo_de_consulta_2
= '',alimentación_2
= '',apetito_2
= '',micción_2
= 'Normal',defecación_2
= 'Dura, café',vómito_2
= 'No',convulsiones_2
= 'No',parámetros_fisiológicos_2
= 'Peso:\r\nT°:\r\nFC:\r\nFR:\r\nCP:\r\nPA:\r\nTIC:\r\nMembranas Mucosas:\r\nGanglios Linfáticos:\r\nRT:\r\nRD:',condición_corporal_2
= '',presión_arterial_2
= 'NE',exámen_físico_2
= 'Estado de Hidratación:\r\nCavidad Bucal:\r\nSistema Tegumentario:\r\nOjos:\r\nOídos:\r\nNariz:\r\nSistema Digestivo:\r\nSistema Respiratorio:\r\nSistema Nervioso:\r\nSistema Musculo-Esquelético:\r\nSistema Cardiovascular:\r\nSistema Genito-Urinario:\r\nTimo:',diagnóstico_presuntivo_2
= '',tratamiento_2
= '',lab_3
= '',lab_4
= '',imágenes_adicionales_3
= '',imágenes_adicionales_4
= '',diagnóstico_definitivo_2
= '',fecha_consulta_3
= NULL,motivo_de_consulta_3
= '',alimentación_3
= '',apetito_3
= 'Normal',micción_3
= 'Normal',defecación_3
= 'Dura, café',vómito_3
= 'No',convulsiones_3
= 'No',parámetros_fisiológicos_3
= 'Peso:\r\nT°:\r\nFC:\r\nFR:\r\nCP:\r\nPA:\r\nTIC:\r\nMembranas Mucosas:\r\nGanglios Linfáticos:\r\nRT:\r\nRD:',condción_corporal_3
= '',exámen_físico_3
= 'Estado de Hidratación:\r\nCavidad Bucal:\r\nSistema Tegumentario:\r\nOjos:\r\nOídos:\r\nNariz:\r\nSistema Digestivo:\r\nSistema Respiratorio:\r\nSistema Nervioso:\r\nSistema Musculo-Esquelético:\r\nSistema Cardiovascular:\r\nSistema Genito-Urinario:\r\nTimo:',presión_3
= 'NE',diagnóstico_presuntivo_3
= '',tratamiento_3
= '',lab_5
= '',lab_6
= '',imágenes_adicionales_5
= '',imágenes_adicionales_6
= '',diagnóstico_definitivo_3
= '',fecha_consulta_4
= NULL,motivo_de_consulta_4
= '',alimentación_4
= '',apetito_4
= 'Normal',micción_4
= 'Normal',defecación_4
= 'Dura, café',vómito_4
= 'No',convulsiones_4
= 'No',parámetros_fisiológicos_4
= 'Peso:\r\nT°:\r\nFC:\r\nFR:\r\nCP:\r\nPA:\r\nTIC:\r\nMembranas Mucosas:\r\nGanglios Linfáticos:\r\nRT:\r\nRD:',condición_corporal_4
= '',exámen_físico_4
= 'Estado de Hidratación:\r\nCavidad Bucal:\r\nSistema Tegumentario:\r\nOjos:\r\nOídos:\r\nNariz:\r\nSistema Digestivo:\r\nSistema Respiratorio:\r\nSistema Nervioso:\r\nSistema Musculo-Esquelético:\r\nSistema Cardiovascular:\r\nSistema Genito-Urinario:\r\nTimo:',presión_4
= 'NE',diagnóstico_presuntivo_4
= '',tratamiento_4
= '',lab_7
= '',lab_8
= '',imágenes_adicionales_7
= '',imágenes_adicionales_8
= '',diagnóstico_definitivo_4
= '',fecha_consulta_5
= NULL,motivo_de_consulta_5
= '',alimentación_5
= '',apetito_5
= 'Normal',micción_5
= 'Normal',defecación_5
= 'Dura, café',vómito_5
= 'No',convulsiones_5
= 'No',parámetros_fisiológicos_5
= 'Peso:\r\nT°:\r\nFC:\r\nFR:\r\nCP:\r\nPA:\r\nTIC:\r\nMembranas Mucosas:\r\nGanglios Linfáticos:\r\nRT:\r\nRD:',condición_corporal_5
= '',examen_físico_5
= 'Estado de Hidratación:\r\nCavidad Bucal:\r\nSistema Tegumentario:\r\nOjos:\r\nOídos:\r\nNariz:\r\nSistema Digestivo:\r\nSistema Respiratorio:\r\nSistema Nervioso:\r\nSistema Musculo-Esquelético:\r\nSistema Cardiovascular:\r\nSistema Genito-Urinario:\r\nTimo:',presión_5
= 'NE',diagnóstico_presuntivo_5
= '',tratamiento_5
= '',lab_9
= '',lab_10
= '',imágenes_adicionales_9
= '',imágenes_adicionales_10
= '',diagnóstico_definitivo_5
= '',fecha_de_consulta_6
= NULL,motivo_de_consulta_6
= '',alimentación_6
= '',apetito_6
= 'Normal',micción_6
= 'Normal',defecación_6
= 'Dura, café',vómito_6
= 'No',convulsiones_6
= 'No',parámetros_fisiológicos_6
= 'Peso:\r\nT°:\r\nFC:\r\nFR:\r\nCP:\r\nPA:\r\nTIC:\r\nMembranas Mucosas:\r\nGanglios Linfáticos:\r\nRT:\r\nRD:',condición_corporal_6
= '',exámen_físico_6
= 'Estado de Hidratación:\r\nCavidad Bucal:\r\nSistema Tegumentario:\r\nOjos:\r\nOídos:\r\nNariz:\r\nSistema Digestivo:\r\nSistema Respiratorio:\r\nSistema Nervioso:\r\nSistema Musculo-Esquelético:\r\nSistema Cardiovascular:\r\nSistema Genito-Urinario:\r\nTimo:',presión_6
= 'NE',diagnóstico_presuntivo_6
= '',tratamiento_6
= '',lab_11
= '',lab_12
= '',imágenes_adicionales_11
= '',imágenes_adicionales_12
= '',diagnóstico_definitivo_6
= '',last_update_user
= 'gaby.cat.dog' WHERE id = 48
[02/18/23 6:36pm UTC]
PDb_Participant_Cache::refresh_cache: Refreshing Participants Database cache for cache group 0
[02/18/23 6:36pm UTC]
PDb_Session::get_alt_session_id obtaining session id by alternate method: PDB cookie: n0pebeht2id5iet5b6odma1acf
Archivo de registro iniciado en: 18/02/23 18:36 UTC
[02/18/23 6:36pm UTC]
PDb_Participant_Cache::refresh_cache: Refreshing Participants Database cache for cache group 0
[02/18/23 6:36pm UTC]
PDb_Session::get_alt_session_id obtaining session id by alternate method: PDB cookie: n0pebeht2id5iet5b6odma1acf
Archivo de registro iniciado en: 18/02/23 18:36 UTC
[02/18/23 6:36pm UTC]
Cannot modify header information - headers already sent
in /home/gabyekcx/public_html/wp-content/plugins/participants-database/classes/PDb_Session.php on line 380
[02/18/23 6:36pm UTC]
PDb_Session::get_alt_session_id obtaining session id by alternate method: create new: 4etlmf16q8qcfaj1d7h3ujeethMy page’s url is https://gabycatdog.com/ and the frontend form is located on https://gabycatdog.com/historias but the 80% of the data is submitted from the backend.
Thanks again for your kindness
OK, no issues appearing in the log.
So I tried the form you linked to and it wouldn’t accept the date in the format you specified (d/m/y)…I couldn’t even type the forward slash character in there. It let me use a back slash, but that doesn’t work. Maybe it’s not configured correctly? If you’re using a datepicker, I recommend you go with date fromat with a named month. Also, back slashes can be troublesnome, might be a good idea to avoid using them in the date.
If the date is blank, that means it couldn’t parse the date, if you have
“strict dates” on, it means it was not is that exact format.Thank you again for you kindly responses. The case is now closed. The problem was, in my settings as i said I had set the format d\m\y with the slash like this “\” but in my date picker configuration I had d/m/y with the slash like this “/” that made impossible for the system to record the date. Now the datepicker is working fine. I recomend this very useful plugin as a complete solution for your database recording needs. Thank you again.
- The topic ‘Issues recording Date Fields’ is closed to new replies.