Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 25th)

Web Address Field type - Undesired behaviour

  • sabroso
  • sabroso
  • OFFLINE
  • Posts: 29
  • Thanks: 5
  • Karma: 1
9 years 7 months ago - 9 years 7 months ago #264184 by sabroso
Hello,

I'm using Joomla 3.4.1 and CB 2.0.8 and I'm seeing that when using a "Web Address" field type the following happens:

- 1) Even if I select "Any String (/.*/)" in Validation->Authorised Input, undercover validation is going on that spits "Please enter a valid URL" messages when this validation is not met. I think it should be clearer who is controlling the validation, the application (CB) or the administrator

- 2) This undercover validation accepts both strings starting with http:// and https://, however the value that is stored in the database does not include these prefixes. For example, if the user enter
Code:
http://miweb.com
the value stored in the database is miweb.com. Alternatively, if the user enters
Code:
https://miweb.com
the same value is stored in the database - miweb.com. Conclusion: looking at the database we don't know what the user entered and causes issues when using substitutions, using Cb Autoactions to import this value elsewhere or calling it from the Cb API

- 3) When displaying this field in the profile, CB assumes that http:// was used and builds the href link based on this assumption. Which might be wrong.

Do you see the same behaviour your end?

PS: I forgot to mention that I removed everything from "Forbidden words in user profile edits",
Code:
http:,https:,etc
Last edit: 9 years 7 months ago by sabroso.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48609
  • Thanks: 8300
  • Karma: 1446
9 years 7 months ago #264197 by krileon
Replied by krileon on topic Web Address Field type - Undesired behaviour

- 1) Even if I select "Any String (/.*/)" in Validation->Authorised Input, undercover validation is going on that spits "Please enter a valid URL" messages when this validation is not met. I think it should be clearer who is controlling the validation, the application (CB) or the administrator

Administrator validation parameters are in addition to the hardcoded validation. It still has to be a valid URL. There is no getting around that. If you want it to be whatever format you want then I recommend just using a text field.

Currently the schema is stripped and http is always used for user website urls. There's no changing this without altering the code or trying to replace the display using the layout parameters. I've added a feature ticket to change this behavior when we refactor the fieldtypes. There's not much reason to remove the schema anymore at this point.

forge.joomlapolis.com/issues/5279


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: sabroso

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum