DT Plugin
ExpressionEngine 2, ExpressionEngine 3
Back to this add-on's main page
View Other Add-ons From Jerry Price
Channel Form question
Support Request
springworks
|
Posted: 05 March 2014 03:14 PM |
|
|
|
I’m trying to use DT Plugin to set the expiration date of an entry submitted using a Channel Form to be 1 year after the submission date.
I can’t figure out how to do this and keep getting the following error when I try to cal DT Plugin:
Fatal error: Call to undefined method Localize::decode_date() in /system/expressionengine/third_party/dt/pi.dt.php on line 98
This is with EE 2.8.0 and DT Plugin 1.4.1.
Here’s the line I’m using in the {exp:channel:form} tag:
<input type="hidden" name="expiration_date" value="{expiration_date}" value="{exp:dt month="12" set="{current_time}" format="%Y %m %d %H:%i:%s"}">
Any ideas on how I can get this working?
|
|
|
VIM Interactive
|
Posted: 05 March 2014 03:57 PM |
# 1
|
|
Developer
|
Could be a code change in the latest EE release causing it to fail. I will take a look and try to update it in the next day or so.
|
|
|
springworks
|
Posted: 06 March 2014 07:33 AM |
# 2
|
|
|
I’ve solved the problem. You just need to replace calls to
decode_date()
to call
format_date()
instead.
These appear on lines 98 and 185 of the plugin code.
I’ve attached a revised version of the plugin with these changes made that is working for me on EE 2.8.0.
File Attachments
|
|
|
VIM Interactive
|
Posted: 06 March 2014 10:18 AM |
# 3
|
|
Developer
|
Thanks for the heads up and getting the fix. I posted the update to the plugin.
|
|
|