? ? Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
5 Oct 2021

Pull Request for Issue #35609, #36961, #36956.

Summary of Changes

This PR fixes issue #35609 by removing unnecessary code from view class:

Testing Instructions

  1. Create two contact categories.
  2. Created two Mail contact custom fields, each field assign to a category.
  3. Create two contacts, each contact assigned to one category.
  4. Create two menu items link to Contact -> Single Contact menu item type of com_contact. For each menu item, choose a contact from the two created above.

Actual result BEFORE applying this Pull Request

  1. Access to the first menu item (which links to contact 1)
  2. The access to the second menu item (which links to contact 2). Instead of seeing custom fields assign to Category 2, you see custom fields assigned to Category 1 (because the catid is wrong remembered in session)

Expected result AFTER applying this Pull Request

  1. Access to first menu item, you see custom fields from category 1
  2. Access to second menu item, you see custom fields from category 2 (not custom fields from category 1 as before - which is wrong)

Please note that after applying patch, you should closer your browser and re-open it to clear existing session data (or better, use a different browser to test the new behavior).

avatar joomdonation joomdonation - open - 5 Oct 2021
avatar joomdonation joomdonation - change - 5 Oct 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Oct 2021
Category Front End com_contact
avatar GennaroMarra
GennaroMarra - comment - 20 Oct 2021

Good morning I had already communicated that I had tested the solution that turned out to be working. In the last release of Joomla, i.e. version 4.0.3, has the reported bug been fixed? Thank you

avatar joomdonation
joomdonation - comment - 20 Oct 2021

@GennaroMarra Each PR needs two successful tests to be merged. Please go to https://issues.joomla.org/tracker/joomla-cms/35763 and report your test result.

Then we will need to have one more test before it could be merged.

avatar GennaroMarra
GennaroMarra - comment - 20 Oct 2021

The test was successful. Thanks.


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

avatar joomdonation joomdonation - alter_testresult - 20 Oct 2021 - GennaroMarra: Tested successfully
avatar BertaOctech
BertaOctech - comment - 22 Oct 2021

Hi,

I was testing this issue but I have not been able to reproduce the error.
I followed the testing instructions but each contact showed its own fields. There was no error I am afraid.

Cheers,
Berta


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

avatar joomdonation
joomdonation - comment - 22 Oct 2021

@BertaOctech Thanks for testing. When you access to first menu item, the system will display custom fields from first contact category properly.

However, when you access to the second menu item, you will see custom fields from first category (which is wrong - it should display custom fields from second category). Could you please try again one more time?

Thanks !

avatar pabloarias
pabloarias - comment - 22 Oct 2021

Yes, agree with @BertaOctech. Not able to show custom field value from one contact in the other one.

Thank you and best regards


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

avatar BertaOctech
BertaOctech - comment - 22 Oct 2021

@BertaOctech Thanks for testing. When you access to first menu item, the system will display custom fields from first contact category properly.

However, when you access to the second menu item, you will see custom fields from first category (which is wrong - it should display custom fields from second category). Could you please try again one more time?

Thanks !

Hi, thanks for your comment.
When I accessed the second item the custom fields from the first category disappeared and only the field from the second category were shown.

Maybe this issue was solved via another issue, sometimes this happen.
Cheers,
Berta


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

avatar joomdonation
joomdonation - comment - 22 Oct 2021

@BertaOctech Thanks for testing. Strange that you see it work properly. It is still not working, maybe someone you can test it and confirm later (I can still see it from current code by code reading)

avatar pabloarias
pabloarias - comment - 22 Oct 2021

In testing instructions is necessary to add another step: after create new contacts, fill each field with a different value, right?

I've created a Calendar field for Category 1 and Color for Category 2. Should the fields be the same type?

Thanks

avatar joomdonation
joomdonation - comment - 23 Oct 2021

@pabloarias This issue happens with custom fields display on contact form, so you do not need to enter data for these custom fields for contact. Maybe you can try to look at the original issue #35609 , it might describes the issue better than what I described here

avatar pabloarias
pabloarias - comment - 23 Oct 2021

Ok, I understand now. Custom fields are for mail form, not for contact.

I see the problem.

I'm really sorry but after applying the path, it continues failing.

One question: why these fields are shown as disabled in frontend form?

Thank you very much!


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

avatar joomdonation
joomdonation - comment - 25 Oct 2021

@pabloarias

Ok, I understand now. Custom fields are for mail form, not for contact.

The testing instructions should be more clear. We need to create custom fields for Mail, not to Contact for this PR.

I'm really sorry but after applying the path, it continues failing.

That's strange to me. I don't see how it could still fail after the patch.

One question: why these fields are shown as disabled in frontend form?

It's something with permission settings. You need to edit the field, look at Permissions tab, select Public user group and set Edit Custom Field Value permission to Allowed. After that, all users should be allowed to enter value for that field.

Thanks for your help with testing.

avatar khu5h1
khu5h1 - comment - 28 Oct 2021

Hey, even I tried to test the same but it didn't work out for me as well. I think that the test instructions are to be more clear.

avatar Quiviro Quiviro - test_item - 29 Oct 2021 - Tested unsuccessfully
avatar Quiviro
Quiviro - comment - 29 Oct 2021

I have tested this item 🔴 unsuccessfully on e919da6

Before applying the patch, both contacts show the same custom field: mail field #1.
After applying the patch, both contacts show the same custom field: mail field #2.

The error is different but remains equal


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

avatar RickR2H RickR2H - test_item - 15 Dec 2021 - Tested unsuccessfully
avatar RickR2H
RickR2H - comment - 15 Dec 2021

I have tested this item 🔴 unsuccessfully on e919da6

I could reproduce the problem but after applying the patch the problem gets worse.

What I did:

  1. Create to categories in Contacts (category "left" and category "right")
  2. go to the Contacts custom fields and select type "Mail" from the dropdown
  3. Create 2 custom fields for each category (text field "cfield-left" assigned to the "left" category and text field "cfield-right" assigned to the "right" category)
  4. Create 2 contacts "Contact-left" assigned to the "left category" and "Contact-right" assigned to the "right category". Make sure the name and a valid email address is filled.
  5. Make two menu items of type is "Single Contact" for each contact.

Before the patch:

When you click on the "Contact left" menu item the contact form shows with the "cfield-left" field. Next when you click on the "Contact right" menu item the field "cfield-left" remains. After clicking a second time or after a page refresh the custom fields updates to the correct one.

before-patch

After the patch:

Only one of the fields is loaded even when switching menu items an refreshing / clicking multiple times.

after-patch


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35763.
avatar joomdonation joomdonation - change - 12 Feb 2022
Labels Added: Conflicting Files ? ?
avatar joomdonation
joomdonation - comment - 12 Feb 2022

@RickR2H and others: I think I know why your tests were un-successful. The catid data is still remembered from your previous tests (before patch applied)

So somehow, after applying patch. We need to clear existing session data to have the right behavior:

  • Close the browser and re-open it (I'm unsure if that will completely removing session data)
  • Or maybe, use a different browser to test the behavior after applying patch.
avatar joomdonation joomdonation - change - 12 Feb 2022
The description was changed
avatar joomdonation joomdonation - edited - 12 Feb 2022
avatar joomdonation joomdonation - change - 12 Feb 2022
The description was changed
avatar joomdonation joomdonation - edited - 12 Feb 2022
avatar leoalv
leoalv - comment - 12 Feb 2022

This works!. I have tested it in the following scenarios: A classic form and an appointment form with extra fields, and 2 forms with custom fields of type Mail. The forms are in different categories and have different menu items.

For those that don't work, you can clear your browser's cache and cookies or try it from another browser.

avatar angieradtke
angieradtke - comment - 14 Feb 2022

Works like expected, thanks Tuan.
I have tested it successfully.

avatar Quy Quy - alter_testresult - 14 Feb 2022 - leoalv: Tested successfully
avatar Quy Quy - alter_testresult - 14 Feb 2022 - angieradtke: Tested successfully
avatar Quy Quy - change - 14 Feb 2022
Status Pending Ready to Commit
avatar Quy
Quy - comment - 14 Feb 2022

RTC


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

avatar bembelimen bembelimen - change - 3 Mar 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-03-03 03:10:46
Closed_By bembelimen
Labels Added: ?
Removed: Conflicting Files ?
avatar bembelimen bembelimen - close - 3 Mar 2022
avatar bembelimen bembelimen - merge - 3 Mar 2022
avatar bembelimen
bembelimen - comment - 3 Mar 2022

Thx

Add a Comment

Login with GitHub to post a comment