No Code Attached Yet bug
avatar idefax
idefax
14 Feb 2022

Steps to reproduce the issue

Go to articles. There create a custom field of type "URL". For scheme select "mailto" and save.

Expected result

If adding/editing an article and enter a valid email address into the custom URL field, in the frontend a proper email link should be generated.

Actual result

A https link including email address is generated instead, such as: https://www.mydomain.dd/firstname-lastname@mydomain.dd

System information (as much as possible)

Joomla 4.0.6, PHP 7.4

Additional comments

This issue also exists in J3.

avatar idefax idefax - open - 14 Feb 2022
avatar joomla-cms-bot joomla-cms-bot - change - 14 Feb 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Feb 2022
avatar idefax idefax - change - 14 Feb 2022
The description was changed
avatar idefax idefax - edited - 14 Feb 2022
avatar esedic
esedic - comment - 14 Feb 2022

I have tested this on Joomla 4.0.6. and I can't confirm this. You need to add URL schema (mailto:) to the field and email link is displayed correctly.

Although there are other issues, like mailto: schema displayed in email link.

avatar idefax
idefax - comment - 14 Feb 2022

Agree: If I add schema manually in front of email address, then email addresss (href) is build correctly but "mailto:" is visible in Frontend.

Since I select "mailto" from schema dropdown already, I would expect not to have to add it manually as well. And "mailto:" beeing visible in frontend is not good.

avatar brianteeman
brianteeman - comment - 14 Feb 2022

@idefax Its a multi-select box used to validate the type of link

avatar idefax
idefax - comment - 15 Feb 2022

@brianteeman But in the article, only one type of data will be entered into the field: either email, http URL, file etc. Why multi-select?
Besides this, adding schema "mailto:" as well in front of the email address might be no problem for experienced users, but it's not for not so experienced users. They would expect to enter email address only and link will be build corrrectly. My toughts.

And as mentioned in comments earlier: "mailto:" is visible in frontend.

avatar Vanshitasingh
Vanshitasingh - comment - 29 Mar 2022

Hey @idefax , could you elaborate a further more on how to reproduce this issue? I don't know if I did it correctly but I created a Url field and linked it with a valid email and it worked perfectly fine for me.

avatar idefax
idefax - comment - 29 Mar 2022

@Vanshitasingh

Step 1)
I open Articles > Fields. There I add a custom field of type "URL". In its settings I set parameter for schema to "Mailto":

Screenshot_1

Step 2)
After I edit an article and add email address into the new URL field. When saving, I get a warning message about missing schema, even if I have set it previously in step 1):

Screenshot_2

Step 3)
I add "mailto:" into email field:

Screenshot_3

Result:
Email link works in frontend, but schema is visible to user:

Screenshot_4

My thoughts:

  • why do I need to add schema into URL field even if I have set parameter for schema properly in the settings of custom field?
  • "mailto:" should not be visible to user in frontend
avatar Hackwar Hackwar - change - 17 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 17 Feb 2023

Add a Comment

Login with GitHub to post a comment