Elxis CMS Forum

Support => Elxis 4.x/5.x DEV => Topic started by: seadhna on July 30, 2019, 12:59:35

Title: Can't change the date of an article in Elxis 5.0
Post by: seadhna on July 30, 2019, 12:59:35
Hi, I remember downloading a patch to fix the issue with changing the article date but I can't find it now in 'Download' or 'Blog' or this forum - I am unable to change the date of an article in Elxis 5.0 - is this still an issue - is the patch still available?
Title: Re: Can't change the date of an article in Elxis 5.0
Post by: webgift on August 02, 2019, 09:07:50

You can change the date time of an article under 5.0 version. Don't you?

(https://i.imgur.com/WCFyGzW.jpg)
Title: Re: Can't change the date of an article in Elxis 5.0
Post by: bledi on August 13, 2019, 12:30:03
I can not change the date as well..Elxis 5, Uranus
Title: Re: Can't change the date of an article in Elxis 5.0
Post by: webgift on August 15, 2019, 18:58:38

It's weird. @seadhna, have you found a solution about?
Title: Re: Can't change the date of an article in Elxis 5.0
Post by: nikos on August 16, 2019, 21:11:23
He is right. The date can not be changed. I tried it on a localhost installation Elxis 5.0 rev 2299
Title: Re: Can't change the date of an article in Elxis 5.0
Post by: datahell on August 20, 2019, 18:42:17
@seadhna please send a personal message for this in 2 days to check it.
Title: Re: Can't change the date of an article in Elxis 5.0
Post by: datahell on August 22, 2019, 20:36:09
The date doesnt change because it has not the proper length (16 characters instead of 19) and it is considered invalid.
Make this fix please:

Open file components/com_content/controllers/aarticle.php
go to line 1077:
$newcreated = trim(filter_input(INPUT_POST, 'newcreated', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH));
Add below:
if (strlen($newcreated) == 16) { $newcreated .= ':00'; }

Save the file and you are ready.

Sorry for the trouble!
Title: Re: Can't change the date of an article in Elxis 5.0
Post by: nikos on August 22, 2019, 21:43:37
I did it and now the date of any article can be changed.
Title: Re: Can't change the date of an article in Elxis 5.0
Post by: bledi on August 25, 2019, 11:59:55
I fixed it too,  :)
Title: Re: Can't change the date of an article in Elxis 5.0
Post by: seadhna on September 13, 2019, 12:18:57
Sorry for the delay in responding datahell and webgift!
Thanks very much for this fix - it also worked for me.