?
avatar nickvanballegooijen
nickvanballegooijen
1 Aug 2018

Steps to reproduce the issue

Add this line

form->renderField('created'); ?>

In a override of the front-end edit like
template\html\com_content\form\edit.php

Expected result

Possible to edit and save the created date of a article in the front-end editor

Actual result

Date is loaded but not saved

My fix:

In site\components\com_content\models\article.xml

Add the following lines to the field created in the article.xml
filter="user_utc"
showtime="false"

I have changed the field created:
< field
name="created"
type="calendar"
label="Aanmaakdatum"
translateformat="true"
id="created"
filter="user_utc"
showtime="false"
/ >

System information (as much as possible)

Joomla version 3.8.11

Additional comments

It is possible to load the created date of a article but if you edit and save Joomla will not save it. This is caused by the filter of Joomla which will clear the value after submitting the changes.

avatar nickvanballegooijen nickvanballegooijen - open - 1 Aug 2018
avatar joomla-cms-bot joomla-cms-bot - labeled - 1 Aug 2018
avatar SharkyKZ
SharkyKZ - comment - 1 Aug 2018

This is intended. Users are not allowed to change certain data in frontend. If you want to change this, you can create a content plugin with onContentPrepareForm event and set desired field attributes there.

avatar joomla-cms-bot joomla-cms-bot - close - 1 Aug 2018
avatar joomla-cms-bot joomla-cms-bot - change - 1 Aug 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-08-01 15:34:59
Closed_By joomla-cms-bot
avatar franz-wohlkoenig franz-wohlkoenig - change - 1 Aug 2018
Status Closed Expected Behaviour
Closed_By joomla-cms-bot franz-wohlkoenig
avatar joomla-cms-bot
joomla-cms-bot - comment - 1 Aug 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 1 Aug 2018

Closed as expected Behaviour.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21349.

Add a Comment

Login with GitHub to post a comment