- Issue created by @cindytwilliams
- Status changed to Needs review
about 2 years ago 8:48pm 26 June 2023 - 🇺🇸United States cindytwilliams Nashville, TN
Here is a patch that passes the $linkLabel to the getObfuscatedLink function via the correct parameter.
- 🇮🇳India supriya1992
This patch is working absolutely fine. I tested it by following the steps.
- Created a field-type email in a content type.
- Changed the email field display format to Obfuscate and add the link label in configuration.
- Add content in this field.
- Before applying the patch, the email will display in the node content.
- After applying the patch, the email is replaced with the provided link label.
Attaching the screenshots.
- 🇮🇳India anjali mehta
I have tested the patch. The patch has been implemented successfully.
I am attaching screenshot for your reference.
Thank You. - Status changed to RTBC
almost 2 years ago 4:57pm 22 September 2023 - 🇺🇸United States thejimbirch Cape Cod, Massachusetts
Hiding screenshots from the main issue as they are in comments, and hiding the actual patch.
Patch solves the issue, marking as RTBC. Thanks!
- 🇨🇭Switzerland weri
In general, there seem to be a few implementations with the wrong order of the defined function parameters of the interface ObfuscateMailInterface::getObfuscatedLink($email, array $params = [], $text = '')
/** * Returns an obfuscated link from an email address. * * @param string $email * Email address. * @param array $params * Optional parameters to be used by the a tag. * @param string $text * Optional text for the a tag innerHtml. * * @return array * Obfuscated email link render array. */ public function getObfuscatedLink($email, array $params = [], $text = '');
See also: https://www.drupal.org/project/obfuscate/issues/3506101 🐛 Broken Twig function Active