? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
7 Feb 2019

Summary of Changes

Changing text type to calendar in category.xml
When using Persian language, the jalali date is not displayed in the date fields when editing a category.

Testing Instructions

Install Persian language and switch to Persian in back-end.
Edit a category, Publishing tab.
Look at the Created and Modified date fields.

Patch and test again.

Before patch

screen shot 2019-02-07 at 08 47 43

After patch

screen shot 2019-02-07 at 08 46 25

avatar infograf768 infograf768 - open - 7 Feb 2019
avatar infograf768 infograf768 - change - 7 Feb 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Feb 2019
Category Administration com_categories
avatar infograf768
infograf768 - comment - 8 Feb 2019
avatar Bakual
Bakual - comment - 8 Feb 2019

Same exists in administrator/components/com_fields/models/forms/field.xml. You may want to extend you PR with this file.

It seems to be those fields which are readonly. However I don't see why they should be readonly to start with. other similar fields (eg for an article) are fully editable. Maybe we can do that consistent at the same time?

avatar infograf768
infograf768 - comment - 8 Feb 2019

Good idea. Evidently Modified date should remain readonly, but we could indeed change the created date to be active.

I found out though that we may have a general bug here. Tested on article:
A Created date can be set in the future, and therefore appear as created AFTER the modified date...
screen shot 2019-02-08 at 09 14 26

avatar infograf768
infograf768 - comment - 8 Feb 2019

I can solve this bug by preventing save and set an error in that case all over core.
Something like (for contacts):

		if ($data['modified'] < $data['created'])
		{
			$this->setError(JText::_('JERROR_CREATED'));

			return false;
		}

in the save($data) method.
may be a bit different depending on components.

What do you think?

avatar Bakual
Bakual - comment - 8 Feb 2019

I certainly wouldn't do that in the same PR as it is quite unrelated.

avatar mbabker
mbabker - comment - 8 Feb 2019

A Created date can be set in the future, and therefore appear as created AFTER the modified date...

I don't consider this an issue. If in 4.0 it wants to be redefined that the create date is the time an item is first saved in a site and made readonly then so be it. Otherwise I quite commonly set my create and publish times to the same thing, which will most often be in the future of the modified date; off hand I don't know where the create time is actually exposed in the frontend but I feel like making it a readonly field in a patch release has bad idea written all over it.

avatar infograf768
infograf768 - comment - 9 Feb 2019

Created Date IS used both in backend and frontend for articles.
Backend:

screen shot 2019-02-09 at 09 04 55

Frontend:

screen shot 2019-02-09 at 09 06 57

avatar infograf768 infograf768 - change - 9 Feb 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 9 Feb 2019
Category Administration com_categories Administration com_categories com_fields
avatar infograf768
infograf768 - comment - 9 Feb 2019

In the mean while, I corrected the readonly for Created time and added similar modifications in field.xml

avatar infograf768 infograf768 - change - 9 Feb 2019
Title
[staging] Category date fields do not display jalali date
[staging] Category and field date fields do not display jalali date
avatar infograf768 infograf768 - edited - 9 Feb 2019
avatar HLeithner
HLeithner - comment - 13 Feb 2019

@infograf768 can you plz upgrade the PR

avatar infograf768
infograf768 - comment - 13 Feb 2019

@HLeithner
As usual I merged again

avatar HLeithner HLeithner - change - 13 Feb 2019
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-02-13 17:21:03
Closed_By HLeithner
avatar HLeithner HLeithner - close - 13 Feb 2019
avatar HLeithner HLeithner - merge - 13 Feb 2019
avatar HLeithner
HLeithner - comment - 13 Feb 2019

thx

Add a Comment

Login with GitHub to post a comment