Publisher does not support the Fluid field type. Please do not contact asking when support will be available.
If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.
Ticket: {speedy:set_ttl} gives “Failed to parse time string” error
Status | Resolved |
Add-on / Version | Speedy 1.7.0 |
Severity | |
EE Version | 7.1.6 pro |
University Communications
Dec 17, 2022I tried using {speedy:set_ttl}{expiration_date}{/speedy:set_ttl} as the docs say that timestamps are acceptable, but it gives the following error:
DateTime::modify(): Failed to parse time string ({expiration_date}) at position 0 ({): Unexpected character
user/addons/speedy/mod.speedy.php, line 417
The code on line 417 is executing the !is_numeric conditional. I even tried hardcoding a number between the tags but it gives the same error.
Thank you!
BoldMinded (Brian)
Dec 17, 2022
Sounds like {expiration_date} is not parsed, so Speedy is getting the actual value of “{expiration_date}”, not a numeric timestamp. Did you try putting in a numeric timestamp instead of the {expiration_date} variable to test it?
BoldMinded (Brian)
Dec 17, 2022
Never mind, I didn’t fully read your comment. Can you please share more of your template code? I can’t diagnose this without more context. I also need to try to replicate locally what you’re doing.
University Communications
Dec 17, 2022
Sure, here’s the part of the template that’s being cached:
And the {modules_feature-detail-hero} partial has this code at the very top of the file containing the {speedy:set_ttl} tag:
BoldMinded (Brian)
Dec 19, 2022
Due to the upcoming holidays it could be a week or two before I have time to dig into this.
BoldMinded (Brian)
Dec 20, 2022
Did you try using this take outside of the partial and putting it directly into the entries tag?
University Communications
Dec 21, 2022
Yes, I did try that as well. I’ll be out on holiday for two weeks as well fyi. Thanks!
BoldMinded (Brian)
Dec 21, 2022
I forgot to update you yesterday but I think I have it fixed so I’ll post a build when I get a chance.
BoldMinded (Brian)
Dec 23, 2022
Comment has been marked private.
University Communications
Jan 05, 2023
Comment has been marked private.
BoldMinded (Brian)
Jan 05, 2023
Comment has been marked private.
University Communications
Jan 06, 2023
Comment has been marked private.