Joomla-cms: [com_fields] Contact-Mail Custom field issue after joomla 3.8.3

Created on 18 Apr 2018  路  17Comments  路  Source: joomla/joomla-cms

Hello,

I had 2 contacts on my page and i made 2 different catagory for mail-custom-fields and made also different custom field for each catagory and contact it was everything ok on joomla 3.8.3 after update to joomla 3.8.5 and more the custom field appear on all of contacts and not just on selected field categories.

i tried to use a new instal joomla but it has the same problem i hope you can to help me to solve this issue .

thank you
regards
N.K

No Code Attached Yet

Most helpful comment

I can have a look next week.

All 17 comments

Please ask help on the forums. This repository concerns in first Place Joomla-Core coding. For this Reason closing this Issue, thanks.

Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/20195

@franz-wohlkoenig
Could you please reopen this issue. I can confirm it for current Staging Joomla 3.8.8-dev.

  • Create 2 contact categories (Test-Cat-1 and Test-Cat-2).
  • Create 2 contacts:
    1) Test-Contact-1 with category Test-Cat-1.
    2) Test-Contact-2 with category Test-Cat-2.
  • Create 2 com_fields fields of type "Mail".
    1) Test-Cat-1 field. Select Category: Test-Cat-1.
    2) Test-Cat-2 field. Select Category: Test-Cat-2.
  • Create 2 menu items of type "single contact":
    1) for contact Test-Contact-1.
    2) for contact Test-Contact-2.

  • Go to frontend and open the menu items.

  • In both contact forms are ALL fields visible.

18-04-_2018_21-18-20

Set to "open" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/20195

reopened as stated above.


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

Thank you!

Some investigations:
We had this issue already in the past. @laoneo correted it here:
https://github.com/joomla/joomla-cms/pull/16666/files
https://github.com/joomla/joomla-cms/pull/16666

In Joomla 3.8.4 these lines were added by @sandewt
https://github.com/joomla/joomla-cms/pull/17743/files
https://github.com/joomla/joomla-cms/pull/17743

From the point of logic both fixes look somehow conflictive.

In the meantime, under each field, under Options tab, set Display When Read-Only to No.

In the meantime, under each field, under Options tab, set Display When Read-Only to No.

That my fields are only read-only is just because of my laziness concerning writing testing instructions ;-)
Makes no difference. The issue was also reported in German forum where the fields are editable.

Sorry for pushing but this is a serious bug for some Joomla users!
Could we get here comments please from @laoneo and/or @sandewt
My problem is that I don't understand https://github.com/joomla/joomla-cms/pull/17743

I can have a look next week.

Sorry for pushing but this is a serious bug for some Joomla users!

@ReLater very clear instruction.

Tested with: Joomla! 3.8.8-dev Development

File + location: joomla-cms-staging\components\com_contact\views\contact\view.html.php

If you change this code in the rules 75 ...

if (empty($item->catid))
{
    $app->setUserState('com_contact.contact.data', array('catid' => $item->catid));
}

back to one rule

$app->setUserState('com_contact.contact.data', array('catid' => $item->catid));

The result is 1 field, as you wish. See the image.

screen shot 2018-04-22 at 08 54 26

However, Contact form loses data after postback with error is then an issue (#17743) again.
Honestly, I do not know a solution yet.


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

Why do you try to set the userState for com_contact.contact.data if catid is empty?

@degobbis
May be not the best argument. Because it worked and the test results were positive.


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

Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/20195

closed as having Pull Request #20214

@ReLater @sandewt
Please test #20214

Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brianteeman picture brianteeman  路  6Comments

solenthaler picture solenthaler  路  4Comments

brianteeman picture brianteeman  路  5Comments

MartijnMaandag picture MartijnMaandag  路  6Comments

wilsonge picture wilsonge  路  4Comments