? Release Blocker bug PR-4.3-dev Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
8 May 2023

Pull Request for Issue #40338.

Summary of Changes

This pr restores the behavior that custom fields in mails are rendered without HTML code. It was like that forever but the pr #37716 broke it.

Testing Instructions

  • Create a normal contact custom field
  • Create a contact mail custom field
  • Create a contact with an email address and fill in a value into the custom field
  • Create a contact menu item the new contact selected
  • Open the contact details page
  • Send a mail to the contact via the web form

You can also do the testing instructions from #37716 to ensure that the contact data is rendered like an article.

Actual result BEFORE applying this Pull Request

The custom field is rendered like on articles. The mail which got sent to the contact contains some HTML output.

Expected result AFTER applying this Pull Request

The custom field is rendered like on articles. The mail which got sent to the contact contains no HTML output.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar joomla-cms-bot joomla-cms-bot - change - 8 May 2023
Category Front End com_contact
avatar laoneo laoneo - open - 8 May 2023
avatar laoneo laoneo - change - 8 May 2023
Status New Pending
avatar richard67
richard67 - comment - 8 May 2023

@laoneo As far as I understand this PR solves issue #40338 . If that is right. please refer to that issue in the description. Thanks in advance.

avatar laoneo laoneo - change - 8 May 2023
The description was changed
avatar laoneo laoneo - edited - 8 May 2023
avatar laoneo
laoneo - comment - 8 May 2023

Yes it fixes, thanks for the hint, updated.

avatar Kostelano
Kostelano - comment - 8 May 2023

We should probably remove the lines, where do we delete these files in the script..?

'/components/com_contact/layouts/field/render.php',

'/components/com_contact/layouts/fields/render.php',

avatar richard67
richard67 - comment - 8 May 2023

We should probably remove the lines, where do we delete these files in the script..?

@laoneo I leave it to you if you do that with this PR or if I do it with my PR for script.php, but if I do it and the merge of my PR takes longer, the functionality might be broken when people update with nightly builds, so maybe you should fix that here.

avatar joomla-cms-bot joomla-cms-bot - change - 8 May 2023
Category Front End com_contact Administration com_admin Front End com_contact
avatar laoneo laoneo - change - 8 May 2023
Labels Added: bug PR-4.3-dev
avatar laoneo
laoneo - comment - 8 May 2023

Thanks for the hint @Kostelano !

avatar richard67
richard67 - comment - 8 May 2023

@laoneo It needs to remove also the deleted folders in script.php here:

// From 4.2.8 to 4.2.9
'/components/com_contact/layouts/fields',
'/components/com_contact/layouts/field',
'/components/com_contact/layouts',

avatar laoneo
laoneo - comment - 8 May 2023

@richard67 thanks

avatar laoneo laoneo - change - 11 May 2023
Labels Added: Release Blocker
avatar richard67
richard67 - comment - 13 May 2023

@laoneo I've just tested, also with the testing instructions from PR #37716 . What I've noticed is that when using a subform field in the mail context, i.e. the contact form, the email still contains some HTML markup, just less as before. I don't know how that's been in 4.2.8 or older before that PR had been merged, I haven't tested that yet with 4.2.8.

Besides this, everything works as expected, i.e. the contact fields and the article fields look the same, and when using single fields and not subforms for the contact form, there is no HTML markup in the email.

avatar laoneo
laoneo - comment - 13 May 2023

It is probably the same on 4.2.8. All this pr does is to remove the markup around the field. But the subform probably adds some more markup to align the fields. So this should be fixed in another pr.

avatar richard67
richard67 - comment - 13 May 2023

@laoneo I've just tested with 4.2.8 and there I get an error when using a subform in the contact form, so your PR doesn't break anything.

avatar richard67 richard67 - test_item - 13 May 2023 - Tested successfully
avatar richard67
richard67 - comment - 13 May 2023

I have tested this item successfully on a056f90


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

avatar Uwe-MrT
Uwe-MrT - comment - 13 May 2023

Testet, the Fix works...

avatar richard67
richard67 - comment - 14 May 2023

Testet, the Fix works...

@Uwe-MrT Could you mark your test result in the issue tracker? Just go to https://issues.joomla.org/tracker/joomla-cms/40557 and use the blue "Test this" button at the top left corner, then select your test result (success) and submit. Thanks in advance.

avatar Uwe-MrT Uwe-MrT - test_item - 14 May 2023 - Tested successfully
avatar Uwe-MrT
Uwe-MrT - comment - 14 May 2023

I have tested this item successfully on a056f90

Works for me


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

avatar richard67 richard67 - change - 14 May 2023
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 14 May 2023

RTC


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

avatar obuisard obuisard - close - 14 May 2023
avatar obuisard obuisard - merge - 14 May 2023
avatar obuisard obuisard - change - 14 May 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-05-14 16:58:23
Closed_By obuisard
Labels Added: ?
avatar obuisard
obuisard - comment - 14 May 2023

Thanks Allon @laoneo for the PR and Richard @richard67 for looking into it!

Add a Comment

Login with GitHub to post a comment