Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move editAssociations code to regular save method #27941

Merged
merged 1 commit into from
Feb 16, 2020

Conversation

Bakual
Copy link
Contributor

@Bakual Bakual commented Feb 15, 2020

Pull Request for Issue #27921

Summary of Changes

The associations button in the article edit form triggered the editAssocations task. That task invoked a save method in the model and then redirected to the association manager.
Unfortunately that save method bypassed everything done in the controller->save method. Resulting beside other potential issues in the issue above where the dateformat wasn't properly translated back.

This PR moves the code from the editAssociations method to the save method with a conditional on the active task.
in the controller, the "editAssociations" task is registered as a variant of the save method.

I have left the old "editAssociations" methods in the controller and model to keep B/C and added a deprecation note for 5.0.

Testing Instructions

  • Test in the administrator backend using a language that doesn't use the regular english date format YYYY-MM-DD, for example german or russian.
  • In a multilingual site, create an article assigned to a specific language.
  • After saving the article, click on the "Associations" button in the edit form.
  • It will redirect to the Associations Manager. In the new side-by-side form, check the created date of the article.

Expected result

Date is still there

Actual result

Date is empty

Documentation Changes Required

None

@richard67
Copy link
Member

@sanek4life Please thest. I'll test too tomorrow.

@infograf768
Copy link
Member

I have tested this item ✅ successfully on e89d1f5

😄


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

@viocassel
Copy link
Contributor

I have tested this item ✅ successfully on e89d1f5


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

@infograf768
Copy link
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Feb 16, 2020
@infograf768 infograf768 merged commit 9fc091b into joomla:staging Feb 16, 2020
@joomla-cms-bot joomla-cms-bot added PR-staging and removed RTC This Pull Request is Ready To Commit labels Feb 16, 2020
@infograf768
Copy link
Member

Thanks @Bakual

@infograf768 infograf768 added this to the Joomla! 3.9.16 milestone Feb 16, 2020
@universewrld
Copy link

@sanek4life Please thest. I'll test too tomorrow.

It finally works!

изображение

@infograf768
Copy link
Member

Already merged. ;) Will be available in next release 3.9.16.

@universewrld
Copy link

Already merged. ;) Will be available in next release 3.9.16.

What to do with other articles that were created before 3.9.16? Have to set the Created Date again and Save it?

@Bakual
Copy link
Contributor Author

Bakual commented Feb 16, 2020

What to do with other articles that were created before 3.9.16? Have to set the Created Date again and Save it?

Yep, unfortunately there is no other way as the data is lost.

Thanks for being stubborn with this issue. It was quite a bit hidden 😄

@Bakual Bakual deleted the FixEditAssociations branch February 16, 2020 09:01
@infograf768
Copy link
Member

@Bakual
This broke loading com_associations for menu items when using the button

@rvbgnu
Copy link
Contributor

rvbgnu commented Mar 10, 2020

Issue open #28310

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.

7 participants