Skip to content

Conversation

@farzadtaheri
Copy link
Contributor

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

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.
@farzadtaheri farzadtaheri changed the title Update fields.php resolve category field change event issue for calendar fields in Persian language Jun 16, 2017
@laoneo
Copy link
Member

laoneo commented Jun 16, 2017

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

@Heggi93
Copy link

Heggi93 commented Aug 22, 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.

@farzadtaheri
Copy link
Contributor Author

farzadtaheri commented Sep 4, 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

@laoneo
Copy link
Member

laoneo commented Sep 4, 2017

You need to update your branch to fix the conflicts.

farzadtaheri added a commit to farzadtaheri/joomla-cms that referenced this pull request Sep 4, 2017
resolve category field change event issue for calendar fields in Persian language joomla#16721
@farzadtaheri
Copy link
Contributor Author

please check new PR #17859.

@ghost
Copy link

ghost commented Sep 4, 2017

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

HLeithner added a commit that referenced this pull request Apr 14, 2020
resolve category field change event issue for calendar fields in Persian language #16721
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants