Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.1k views
in Technique[技术] by (71.8m points)

Enable TYPO3 page content expiration date

I'm in TYPO3 v.6.2 and from this year the expiration date is no longer accepting dates beyond 2020-12-31.

That was some sort of prophecy? XD

enter image description here

I suppose it is just a matter of configuration.

Where can I change that to enable future expiration dates?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

That's the gentle reminder to upgrade your TYPO3 installation ;)

Your problem is that in old TYPO3 versions the upper limit of the date selector is hard coded in the TYPO3 core.

This can be fixed with a little bit of PHP code, e.g. in the ext_localconf.php or Configuration/TCA/Overrides/YOUR_TABLE_NAME.php of your own extension:

$GLOBALS['TCA']['YOUR_TABLE_NAME']['columns']['YOUR_FIELD_NAME']['config']['range']['upper'] =
    mktime(0,0,0,12, 31, 2030);

The code snippet must be adapted for every table and field that contains a date selector.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...