? ? Pending

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
10 Feb 2017

Pull Request for Issue #14004 .

Summary of Changes

This PR adds the object to the FieldsHelper::extract method as an optional argument. This way extensions can determine in their helper if the context is the proper one for the current object.
It adds a check to the com_contact helper so it can give the correct context (mail or contact) back based on the passed object (item or form).

Testing Instructions

  • Assign some custom fields to a contact as well as its mail form and add some values.
  • Check the contact in frontend, the fields should show up as expected and form needs to additional fields.

Expected result

Fields show up as expected both in contact and form.

Actual result

Only the added fields for the contact form show up.

Documentation Changes Required

None

Comment

We need this because in com_contact (and maybe 3rd party extensions) the context doesn't differentiate between the contact itself and the contact form. It's always "com_contact.contact". So we need a way to differentiate that, which we can do by looking at the object.
With 4.0, we can change the context for the contact form to "com_contact.mail". The question is if we then should remove the optional argument again (and deprecate it right away now) or if we want to leave it for 4.x. Imho, it wouldn't really hurt to pass it and it may be helpful for 3rd parties.

avatar Bakual Bakual - open - 10 Feb 2017
avatar Bakual Bakual - change - 10 Feb 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Feb 2017
Category Administration com_contact com_fields Front End Plugins
avatar Bakual Bakual - change - 10 Feb 2017
Labels Added: ?
avatar AlexRed
AlexRed - comment - 10 Feb 2017

I have tested this item successfully on c024c88

Patch ok for me


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

avatar AlexRed AlexRed - test_item - 10 Feb 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 11 Feb 2017

I have tested this item successfully on c024c88

Form-Fields not shown in Backend.


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

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 11 Feb 2017 - Tested successfully
avatar laoneo
laoneo - comment - 11 Feb 2017

I would mark it as deprecated. For me it is cleaner as it is actually. But due the contextes are right now we need this one in the three series.

avatar laoneo
laoneo - comment - 11 Feb 2017

I have tested this item successfully on c024c88


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

avatar laoneo laoneo - test_item - 11 Feb 2017 - Tested successfully
avatar Bakual
Bakual - comment - 11 Feb 2017

I would mark it as deprecated. For me it is cleaner as it is actually. But due the contextes are right now we need this one in the three series.

The thing here is the same as with other stuff for 4.0. I don't feel very comfortable introducing something just to deprecate it right away.
I agree it is cleaner, but imho there is no drawback in passing the object as well and it could be a huge help for some 3rd parties.

avatar jeckodevelopment jeckodevelopment - change - 11 Feb 2017
Status Pending Ready to Commit
avatar jeckodevelopment
jeckodevelopment - comment - 11 Feb 2017

RTC


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

avatar rdeutz rdeutz - change - 11 Feb 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-02-11 18:47:45
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 11 Feb 2017
avatar rdeutz rdeutz - merge - 11 Feb 2017

Add a Comment

Login with GitHub to post a comment