Skip to content

Custom fields in contact mails are rendered with HTML#40557

Merged
obuisard merged 8 commits intojoomla:4.3-devfrom
Digital-Peak:contact/layouts
May 14, 2023
Merged

Custom fields in contact mails are rendered with HTML#40557
obuisard merged 8 commits intojoomla:4.3-devfrom
Digital-Peak:contact/layouts

Conversation

@laoneo
Copy link
Copy Markdown
Member

@laoneo laoneo commented May 8, 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

@richard67
Copy link
Copy Markdown
Member

@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.

@laoneo
Copy link
Copy Markdown
Member Author

laoneo commented May 8, 2023

Yes it fixes, thanks for the hint, updated.

@richard67 richard67 added the bug label May 8, 2023
@Kostelano
Copy link
Copy Markdown
Contributor

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',

@richard67
Copy link
Copy Markdown
Member

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.

@laoneo
Copy link
Copy Markdown
Member Author

laoneo commented May 8, 2023

Thanks for the hint @Kostelano !

@richard67
Copy link
Copy Markdown
Member

@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',

@laoneo
Copy link
Copy Markdown
Member Author

laoneo commented May 8, 2023

@richard67 thanks

@obuisard obuisard added this to the Joomla! 4.3.2 milestone May 8, 2023
@richard67
Copy link
Copy Markdown
Member

@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.

@laoneo
Copy link
Copy Markdown
Member Author

laoneo commented May 13, 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.

@richard67
Copy link
Copy Markdown
Member

@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.

@richard67
Copy link
Copy Markdown
Member

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.

@Uwe-MrT
Copy link
Copy Markdown

Uwe-MrT commented May 13, 2023

Testet, the Fix works...

@richard67
Copy link
Copy Markdown
Member

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.

@Uwe-MrT
Copy link
Copy Markdown

Uwe-MrT commented May 14, 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.

@joomla-cms-bot joomla-cms-bot removed this from the Joomla! 4.3.2 milestone May 14, 2023
@richard67
Copy link
Copy Markdown
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label May 14, 2023
@richard67 richard67 added this to the Joomla! 4.3.2 milestone May 14, 2023
@obuisard obuisard merged commit ec94239 into joomla:4.3-dev May 14, 2023
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label May 14, 2023
@obuisard
Copy link
Copy Markdown
Contributor

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

@laoneo laoneo deleted the contact/layouts branch May 14, 2023 17:42
richard67 added a commit to richard67/joomla-cms that referenced this pull request Jun 23, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Jun 23, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Jun 24, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Jul 3, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Jul 3, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Jul 23, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Aug 12, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Aug 12, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Aug 19, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Aug 19, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Aug 20, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Aug 22, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Sep 1, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Sep 1, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Sep 4, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Sep 4, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Sep 4, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Sep 14, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Sep 14, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Sep 19, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Sep 19, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Sep 26, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants