I cannot add an internal link to field "Link A", "Link B" nor "Link C" on tab "Images and Links" of the edit content item page.
The latter is an internal link on the homepage. Not an internal link on the current content item.
Joomla should not add a slash to the contents of this field.
Status | New | ⇒ | Confirmed |
Labels |
Added:
?
|
Category | ⇒ | Administration |
https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/form/fields/url.php#L57
// Note that the input type "url" is suitable only for external URLs, so if internal URLs are allowed // we have to use the input type "text" instead.
So I assume that this needs to be changed. https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_content/models/forms/article.xml#L674
Hello all. I was playing around with this for a bit this morning and was able to successfully achieve the #
anchor links concept. However, I don't think it is the best solution because I could not figure out how/where to update the URL Validation portion to accept #my-anchor-link
as a valid entry into the Link fields on the edit Article view.
1.) Added the following code to the form.php file. Code was added in starting at line 1382: https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/form/form.php#L1382
// If it starts with a "#" assume an anchor link.
elseif (substr($value, 0, 1) == '#')
{
return $value;
}
2.) Please keep in mind this is the part I don't like... I removed validate="url"
from the article.xml file at lines 678, 710, and 742.
Ideally there is an adjustment we can make to the URL Validation file to allow #
to lead off what people enter into the fields, but I could not figure it out. I tried to add '#'
to the $scheme = array()
seen on the URL Rule File https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/form/rule/url.php#L54
Hopefully someone with better knowledge of the URL Validation can add some input here :)
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-10-22 15:59:15 |
Closed_By | ⇒ | zero-24 |
Actually it is adding more than a /
If Joomla is installed in a subdirectory it includes (eg test-cms) that as well (eg (/test-cms/#to-some-position-on-page
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7352.