No Code Attached Yet
avatar Scrabble96
Scrabble96
1 Feb 2024

Steps to reproduce the issue

Add an email address to an article or custom module and add space at end ensure it becomes a live email mailto link
(Only just noticed this as most of my sites use contact forms and don't advertise email addresses)

Expected result

View the email in front-end page source code and/or with inspector tool and the email should be disguised with JavaScript

Actual result

It isn't,
but emails are protected in a J4 site that I keep for reference

System information (as much as possible)

Edit: The "Content - Email Cloaking" plugin is active and set to "As linkable mailto address"

Additional comments

avatar Scrabble96 Scrabble96 - open - 1 Feb 2024
avatar joomla-cms-bot joomla-cms-bot - change - 1 Feb 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 1 Feb 2024
avatar Scrabble96 Scrabble96 - change - 1 Feb 2024
The description was changed
avatar Scrabble96 Scrabble96 - edited - 1 Feb 2024
avatar brianteeman
brianteeman - comment - 1 Feb 2024

Chrome inspector shows the email. But it is not displayed if you view the source in your browser.

avatar Scrabble96
Scrabble96 - comment - 2 Feb 2024

Ok. Two screenshots of page source code (not inspector):

Joomla 4:
email-cloaking-J4

Joomla 5:
email-cloaking-J5

avatar brianteeman
brianteeman - comment - 2 Feb 2024

I can see from both of those screenshots that you are using a template override.

These are screenshots without any template override

Joomla 4
image

Joomla 5
image

avatar chmst
chmst - comment - 2 Feb 2024

@Scrabble96 can you check the console, if there is a javascript error?

avatar Scrabble96
Scrabble96 - comment - 2 Feb 2024

No JS errors.

avatar brianteeman
brianteeman - comment - 2 Feb 2024

You are using template overrides as I have already shown!!

avatar Scrabble96
Scrabble96 - comment - 2 Feb 2024

Ok. [I can't really see your images any bigger as when I click on them I just get a blank page with the URL https://private-user-images.githubusercontent.com/1296369/30... etc. Edit: Can't see mine, either. Not sure if it's a Firefox thing.]

I tracked it down. The difference was that I had this in my article default.php code:

          <?php echo $this->item->introtext; ?>
          <?php echo $this->item->fulltext; ?>

and the new version has this:

        <?php echo $this->item->text; ?>

Somehow I'd missed that when checking file updates.

avatar brianteeman
brianteeman - comment - 2 Feb 2024
          <?php echo $this->item->introtext; ?>
          <?php echo $this->item->fulltext; ?>

Yes that is your override and it is why it is breaking. fulltext does not process plugins. Only introtext and text do that. That is true for joomla 4 and joomla 5

But the good news is that I made a pr yesterday that fixes that

avatar Scrabble96 Scrabble96 - change - 2 Feb 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-02-02 18:26:22
Closed_By Scrabble96
avatar Scrabble96 Scrabble96 - close - 2 Feb 2024
avatar Scrabble96
Scrabble96 - comment - 2 Feb 2024

Great. Thanks.

Add a Comment

Login with GitHub to post a comment