Failed to parse time string

Hi again, on a different site with the pro plugin, I got this error. How do I " check the content of your date field"? And what could be the problem?

I get a list of errors when I view my users at the top above the user list, this is repeated?
Thanks so much! I used the server check tool here, that was fine, I checked my database for errors in the cpanel, and that was fine…I am confused what to do next. Advice would be very welcome!

Sara :cherry_blossom:

DateTime::__construct(): Failed to parse time string (—) at position 0 (�): Unexpected character

Message to admin only: Fatal error caught - Unable to create DateTime object from this string: “—” Please check the content of your date fields, and any fields where you have specified a date format

Update

EOT date is missing on the registered users

You may find this article helpful: https://s2member.com/kb-article/when-is-an-eot-time-set-for-each-user/

See also this article and what it says about next payment times: https://s2member.com/kb-article/s2eot-shortcode-documentation/

I hope that helps! :slight_smile:

When I added a manual expire time it cleared up the error. But when checking paypal account, it seems that two transactions are somehow created upon the user registering. One is for 0 dollars and the other for a normal amount? Any ideas why two transactions would be created at once?

I am just using the paypal pro forms.

S

I missed asking earlier: Where do you see this error? Also, is this a clean installation, or could you do some troubleshooting? It’s normal for users to not have an EOT time and it shouldn’t give an error. https://s2member.com/kb-article/common-troubleshooting-tips/

I’m not sure. With logging enabled, what do the logs say about these $0 transactions? WP Admin > s2Member > Log Files

Have you asked PayPal? I googled it but haven’t found an answer yet.

Hi @SarahG Sarah, I’m wondering if you have the payments set up as a subscription with a $0 initial trial period perhaps? I know I get two transactions from paypal - one for the trial period dollar amount, and one for the ongoing subscription amount. I use Paypal PRO too. Gillian

Hi Gillian, no the payments are set up without a trial. And the error is back.
Thanks though!

Hi Clavaque,the error is in the User Area panel, where users are listed. I have the AMR user plugin set up.

The error is still there and being repeated like so:

DateTime::__construct(): Failed to parse time string (—) at position 0 (�): Unexpected character

Message to admin only: Fatal error caught - Unable to create DateTime object from this string: “—” Please check the content of your date fields, and any fields where you have specified a date format

DateTime::__construct(): Failed to parse time string (—) at position 0 (�): Unexpected character

Message to admin only: Fatal error caught - Unable to create DateTime object from this string: “—” Please check the content of your date fields, and any fields where you have specified a date format

DateTime::__construct(): Failed to parse time string (—) at position 0 (�): Unexpected character

Message to admin only: Fatal error caught - Unable to create DateTime object from this string: “—” Please check the content of your date fields, and any fields where you have specified a date format

DateTime::__construct(): Failed to parse time string (—) at position 0 (�): Unexpected character

Message to admin only: Fatal error caught - Unable to create DateTime object from this string: “—” Please check the content of your date fields, and any fields where you have specified a date format

DateTime::__construct(): Failed to parse time string (—) at position 0 (�): Unexpected character

Message to admin only: Fatal error caught - Unable to create DateTime object from this string: “—” Please check the content of your date fields, and any fields where you have specified a date format

I just enabled the S2 member pro debugging option, I will see if something shows up there now.
Thanks, S

This is an ongoing issue for users whose EOT gets set to ‘time string (—)’.
AMR fixed their user list plugin quickly - after the WP 7.2.34 update broke it - to show blank EOT (and other empty dates) without an error message, but the standard WP ‘Users’ screen still shows this error for every user with an empty EOT.

Is this a WP issue or an s2 issue? One suggestion for s2 would be an option to keep expired EOTs, with rules for what their new one should be if/when they renew. Otherwise, setting it to something that doesn’t trigger the error message would be mighty nice.

Thanks!

Hi Sue.

I don’t get this problem on the Users list, just checked and users with no EOT don’t cause any errors on the page.

Screenshot_2020-11-02%20Users%20%E2%80%B9%20s2Member%20Tests%20Install%20%E2%80%94%20WordPress

Could you show me a screenshot or tell me what how to reproduce it?

Thanks. :slight_smile: