? Success

User tests: Successful: Unsuccessful:

avatar farzadtaheri
farzadtaheri
16 Jun 2017

Problem: com_fields category fields change event causing problem in Persian fa-IR.
with this change, all calendars fields with localized data type (like Jalali) are converted to standard date type and then submit form.

Pull Request for Issue #16628 .

Summary of Changes

replace line 350 and change this code:

element.form.submit();

to

Joomla.submitform('field.storeform', element.form);

Testing Instructions

1- make sure you have more than two category for articles(com_content)
2- make sure you have at least a field for articles with context: com_content.article in com_fields
3- change back-end language to Persian(fa-IR).
4- go to Content > Articles. in Persian language the path is: محتوا > مطالب
5- edit an article and change category field value to another one.

Expected result

before this change:
after change category field value you see an error: DateTime::__construct(): Failed to parse time string (۱۳۹۶-۰۳-۰۶ ۰۳:۳۶:۰۲) at position 0 (�): Unexpected character

after change code and replace line 350 with new one:
dont show any error and fully reload page after ajax call

avatar farzadtaheri farzadtaheri - open - 16 Jun 2017
avatar farzadtaheri farzadtaheri - change - 16 Jun 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 Jun 2017
Category Administration com_fields
avatar farzadtaheri farzadtaheri - change - 16 Jun 2017
Title
Update fields.php
resolve category field change event issue for calendar fields in Persian language
avatar farzadtaheri farzadtaheri - change - 16 Jun 2017
Title
Update fields.php
resolve category field change event issue for calendar fields in Persian language
avatar farzadtaheri farzadtaheri - edited - 16 Jun 2017
avatar laoneo
laoneo - comment - 16 Jun 2017

This will conflict with #16665 as we are dealing with a time shift issue.

avatar Heggi93 Heggi93 - test_item - 22 Aug 2017 - Tested unsuccessfully
avatar Heggi93
Heggi93 - comment - 22 Aug 2017

I have tested this item ? unsuccessfully on 6966f0d

If i follow the test instructions and the patch is applied i get the following warning, after changing the category of the articel:
خصوصیات افزونه برای فیلد مجموعه خالی است

Google told me that it means something like a missing argument. The changes of the artikel are not safed and the field overview(content>>Fields) is shown. Without the patch it works fine.
Although no DatTime__-Error occours anymore.


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

avatar farzadtaheri
farzadtaheri - comment - 4 Sep 2017

@Heggi93 hi, this pr is for Joomla 3.7.2 version after marge pr #16665 in newer version we need some change please try this line:

Joomla.submitform('" . $section . ".reload', element.form);

instead of this:

Joomla.submitform('field.storeform', element.form);
in line of 331

avatar laoneo
laoneo - comment - 4 Sep 2017

You need to update your branch to fix the conflicts.

avatar farzadtaheri
farzadtaheri - comment - 4 Sep 2017

please check new PR #17859.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 4 Sep 2017

@farzadtaheri if #17859 replace this PR please close it.

avatar farzadtaheri farzadtaheri - change - 4 Sep 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-09-04 07:49:48
Closed_By farzadtaheri
avatar farzadtaheri farzadtaheri - close - 4 Sep 2017

Add a Comment

Login with GitHub to post a comment