? Pending

User tests: Successful: Unsuccessful:

avatar dgt41
dgt41
30 Jun 2017

Pull Request for Issue #16794 .

Summary of Changes

  • Fix the parser for Jalali calendar
  • Fix the data-alt-value to be always Gregorian!
  • Bonus: Run the on submit event only one time!

Testing Instructions

Create a new article and fill the publishing fields with different methods (manual using the UI)
save the article
Edit again the fields (try clearing the filed with backspace, the clear button) and also change the values manually and using the UI

Repeat the tests with fa-IR as your admin language

Report any remaining inconsistencies, if any

Expected result

Values are always consistent!

Actual result

Inconsistent values when a value was typed in

@farzadtaheri @farhadst can you please test here!

avatar dgt41 dgt41 - open - 30 Jun 2017
avatar dgt41 dgt41 - change - 30 Jun 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jun 2017
Category JavaScript Language & Strings
avatar dgt41 dgt41 - change - 30 Jun 2017
Labels Added: ? ?
avatar infograf768 infograf768 - test_item - 30 Jun 2017 - Tested successfully
avatar infograf768
infograf768 - comment - 30 Jun 2017

I have tested this item successfully on 83ff2fb

Works fine now !

Test instructions for non-Persian speakers.
Install Persian language.
Apply patch on staging or RC2.
Create a new article and save. Keep the page open on the Publishing tab.

Then switch to Persian by opening a new instance of admin in the browser and go back to the page displaying the article just created, reload the page.

In the Finish Publishing Calendar Field enter a date in the future ۱۳۹۶-۰۶-۲۶ ۱۴:۳۰:۰۰ which is the equivalent of 2017-09-17 14:30:00 for en-GB.
Save again. The calendars fields will display for a second the UNIX date i.e. 2017-09-17 14:30:00 and then the new Jalali date which has been entered.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16922.
avatar infograf768
infograf768 - comment - 30 Jun 2017

jalali_corrected

avatar farhadst
farhadst - comment - 1 Jul 2017

I have test this item and manual date is works fine by persian number or latin number, just in edit manual date, after save item, day change to 1 day ago
screencapture_17-07-01_11 47 25

avatar farhadst
farhadst - comment - 1 Jul 2017

I can not set or edit the first month manually. After set or changing to first month and saving the month, it changes to the second month
screencapture_17-07-01_12 07 49

avatar infograf768
infograf768 - comment - 1 Jul 2017

@farhadst
Not sure you tested correctly
The start Publishing date can't be set to a date older than the Created date.
Please try using a date = or >Created date

Test this case:
Created date = Start Publishing date.
Created date is ۱۳۹۶-۰۴-۰۹ ۱۳:۵۷:۰۰ (this will be displayed as rtl when Persian language is used. (Equivalent Gregorian is 2017-06-30 13:57:00)

screen shot 2017-07-01 at 10 43 35

Now, in Start Publishing change the day only by pasting ۱۰ to replace ۰۹ (i.e. 10 to replace 09 and save.

I get here while it is saving:
screen shot 2017-07-01 at 10 49 46

Which is the correct Gregorian date as we have 30 days in June, so 1 day more (today in fact here) is July 1. (2017-07-01 13:57:00)
And when jalali displays again

screen shot 2017-07-01 at 10 52 02

Which is exactly what is desired at the beginning.

As far as months are concerned
Is'nt ۰۴ before ۰۵ ? In this case, when you modify the Start publishing and the Created Date is ۰۴ , you should use ۰۵ . This works fine here.

This why I tested the Finish Publishing field with a future date, to be independent from the Created vs Start vs Finish

avatar farhadst
farhadst - comment - 1 Jul 2017

@infograf768
I do not think it's related to Created date
(I changed the numbers to Latin to be clearer)
I test again
create date is before published and no effect in result
I think this issue is for calculate 30 or 31 days month
In the Jalali calendar, the first 6 months are 31 days (Apr-May-Jun-Jul-Aug-Sep) and 5 months later are 30 days and Twelfth month is 29 days

And still The first month can not be set manual even in Created date

screencapture_17-07-01_16 04 05

avatar dgt41
dgt41 - comment - 1 Jul 2017

@farhadst can you edit the layout and remove these lines: https://github.com/joomla/joomla-cms/blob/staging/layouts/joomla/form/field/calendar.php#L98-L104

Of course you will not have a jallali date, but can you try doing the same test there? What's the results?

avatar farhadst
farhadst - comment - 1 Jul 2017

@dgt41
after remove lines from 98 to 104 on calendar.php the calendar is displayed as Gregorian
And edit manual date by Gregorian calendar to any date work fine but if set invalid date like 2017-02-30 12:10:00 ,after save calendar change to next valid date.

screencapture_17-07-01_19 15 51

avatar dgt41
dgt41 - comment - 1 Jul 2017

@farhadst so to compare that to jallali calendar, what's different? Was the value (in the jallali test) a valid date, if not then this was expected (nothing to do with the calendar, this is the php side validation.

avatar farhadst
farhadst - comment - 2 Jul 2017

@dgt41 I have check again
The value of selected date in the Jalali calendar is correct
This problem happens when the value is set manually and there is no problem if the same value of pop-up is added.
I reviewed many days in different months by manual
If one of the January (12/10 to 11/11 jalali) days is chosen according to Jalali, one day will be added
to date, for example if set 1396-10-13 (3January) and save it, date change to 1396-10-14
any date In February, 1 day is added to the selected date
any date In March, 2 days from the chosen date will be reduced
any date In April, no day can be chosen and if set any date, this change to the first of may
any date In may, 1 days from the chosen date will be reduced
There is no problem in June
any date In july, 1 days from the chosen date will be reduced
There is no problem in August and September
any date In October, 1 days from the chosen date will be reduced
any date In November, 1 day is added to the selected date
There is no problem in December

screencapture_17-07-02_12 41 04

avatar dgt41
dgt41 - comment - 2 Jul 2017

@farhadst I think I had an error in this patch, now should be ok, please test again!
Thanks

avatar farhadst
farhadst - comment - 3 Jul 2017

@dgt41 i have replace new file but get new issue
In this case, after manually entering the date and saving it, the year will not be converted and changed incorrectly
but in set date by popup no problem

screencapture_17-07-03_10 48 26

avatar rdeutz rdeutz - change - 3 Jul 2017
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-07-03 07:36:57
Closed_By rdeutz
Labels Removed: ?
avatar rdeutz rdeutz - close - 3 Jul 2017
avatar rdeutz rdeutz - merge - 3 Jul 2017
avatar infograf768
infograf768 - comment - 3 Jul 2017

@rdeutz
This should not be merged if this bc64928 is included.
That part should be reverted

avatar farhadst
farhadst - comment - 16 Jul 2017

@dgt41 This problem not fix and still exists in the new version of joomla 3.7.3

avatar infograf768
infograf768 - comment - 16 Jul 2017

@farhadst
We do know there are still issues when entering dates manually in the field for fa-IR.
We decided to merge what we had to at least let use the Calendar popup correctly.
It will not be solved either in 3.7.4

I suggest you create a new Issue which would contain #16922 (comment) in order to try to solve it in the future.

avatar davenlife
davenlife - comment - 15 Aug 2017

There's an issue in Joomla 3.7.4, published time is different than time in server and in global configuration. When you modify an article appears "published but pending". I've tried almost everything, changed server time, global settings in joomla, change user time settings, and so on. I guess it is a bug because it started happening with 3.7.4 version... Any idea?

I am using Joomla! 3.7.4 , PHP 7.0.22, cPanel.


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

avatar zero-24
zero-24 - comment - 15 Aug 2017

@davenlife please open a new issue as this is already closed and your comment will be missed. Thanks.

Add a Comment

Login with GitHub to post a comment