? Success

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
3 Aug 2015

Background

This is a followup PR on #7583. That PR introduced a new property $associationsContext for model classes which holds the context for the association table. We now use this property to safely delete associations in JModelAdmin if an item is deleted.
A similar thing can be done when saving the associations

Issue

Currently, we have the same code duplicated for each extension where we support associations. With the only difference being the context of the item we're saving.
This is just tedious for extension developers.

Solution

Using that new $associationsContext property we can now do the saving in JModelAdmin instead of each child model. Which means the extension developers just have to define that property and the associations will be saved automatically.

Testing

The following extensions need to be tested. Make sure you can associate items from different languages together as before. There should be no change in function at all.

  • com_content (Articles)
  • com_contact (Contacts)
  • com_newsfeed (Newsfeeds)

The following extensions just changed the context from being hardcoded to use the class property now. The code to save the associations is still in the child class since the parent method isn't used there.

  • com_categories (Categories)
  • com_menus (Menu Items)
avatar Bakual Bakual - open - 3 Aug 2015
avatar Bakual Bakual - change - 3 Aug 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 Aug 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 3 Aug 2015
Category Libraries
avatar zero-24 zero-24 - change - 3 Aug 2015
Easy No Yes
avatar infograf768 infograf768 - test_item - 4 Aug 2015 - Tested successfully
avatar infograf768
infograf768 - comment - 4 Aug 2015

Test OK here.


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

avatar joomlacorner joomlacorner - test_item - 5 Aug 2015 - Tested successfully
avatar joomlacorner
joomlacorner - comment - 5 Aug 2015

worked here too.


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

avatar infograf768 infograf768 - change - 5 Aug 2015
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 5 Aug 2015

2 test OK. RTC


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

avatar Bakual Bakual - change - 5 Aug 2015
Milestone Added:
avatar rdeutz rdeutz - change - 5 Aug 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-08-05 16:06:54
Closed_By rdeutz
avatar rdeutz rdeutz - close - 5 Aug 2015
avatar joomla-cms-bot joomla-cms-bot - close - 5 Aug 2015
avatar rdeutz rdeutz - reference | 74d0ff2 - 5 Aug 15
avatar rdeutz rdeutz - merge - 5 Aug 2015
avatar rdeutz rdeutz - close - 5 Aug 2015
avatar joomla-cms-bot joomla-cms-bot - change - 5 Aug 2015
Labels Removed: ?
avatar gwsdesk
gwsdesk - comment - 5 Aug 2015

Just for the records otherwise "Opa" get's annoyed: Works like a charm JM ..... ;-) RTC indeed

avatar Bakual Bakual - head_ref_deleted - 5 Aug 2015

Add a Comment

Login with GitHub to post a comment