? Success

User tests: Successful: Unsuccessful:

avatar xsability
xsability
22 Oct 2015

Solved issue from #7352

The issue:
When a user enters an internal link into the field link a, b or c on the tab images and links of the edit content page and presses save, an unexpected result will show up. Instead of an internal link of the same page, he gets a modified link, that links to the root of the Joomla instance. For instance, let's assume that the user enters #title . This will be modified to /#title. Or - if joomla is installed in an subfolder - it will be modifed to /subfolder/#title.

How to test:
2. Go to Content > Content Manager
3. Open a random content item
4. Go to tab "Images and Links"
5. Enter "#to-some-position-on-page" in field "Link A"
6. Click button "Save"
7. Go back to "Images and Links"

With the unsolved issue:
See that the content of field "Link A" has changed from "#to-some-position-on-page" to "/#to-some-position-on-page

After the Pull Request

See that the content of field "Link A" hasn’t changed. It’s shows still the internal link.

The solution:

To solve this issue, one has to distinguish between a usual link to another page and an internal link. For this reason I check with a regex pattern, if the entry is a valid internal link. If this is true, the link will not be modified. If the pattern doesn't match, the link is passed by the normal way.
The file is located at ./administrator/components/com_content/models/article.php.

Worked as a group on that issue: @icampus, @FPerisa, @flow87 and @kathastaden

avatar xsability xsability - open - 22 Oct 2015
avatar xsability xsability - change - 22 Oct 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Oct 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 22 Oct 2015
Title
Patch for issue_7352
Fix: Cannot add internal link to URL links in 'images and links'
avatar zero-24 zero-24 - change - 23 Oct 2015
Category Administration
avatar zero-24 zero-24 - change - 23 Oct 2015
Easy No Yes
avatar coolman01 coolman01 - test_item - 24 Oct 2015 - Tested successfully
avatar coolman01
coolman01 - comment - 24 Oct 2015

I have tested this item :white_check_mark: successfully on b64348f


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8125.

avatar balzercomp balzercomp - test_item - 24 Oct 2015 - Tested successfully
avatar balzercomp
balzercomp - comment - 24 Oct 2015

I have tested this item :white_check_mark: successfully on b64348f

Works as described. Without the patch, the whole path is added in front of the #-sign


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8125.

avatar zero-24 zero-24 - change - 24 Oct 2015
Status Pending Ready to Commit
avatar xsability
xsability - comment - 24 Oct 2015

Thank you for your Tests and collaboration @Zero-24, @koolman01 and @balzercomp.

avatar joomla-cms-bot joomla-cms-bot - change - 24 Oct 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 24 Oct 2015
Milestone Added:
avatar rdeutz rdeutz - change - 25 Oct 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-10-25 10:27:54
Closed_By rdeutz
avatar rdeutz rdeutz - close - 25 Oct 2015
avatar joomla-cms-bot joomla-cms-bot - close - 25 Oct 2015
avatar rdeutz rdeutz - reference | c409dce - 25 Oct 15
avatar rdeutz rdeutz - merge - 25 Oct 2015
avatar rdeutz rdeutz - close - 25 Oct 2015
avatar joomla-cms-bot joomla-cms-bot - change - 25 Oct 2015
Labels Removed: ?
avatar infograf768
infograf768 - comment - 25 Oct 2015

Don't we add an empty line before a foreach ?

avatar roland-d
roland-d - comment - 25 Oct 2015

@infograf768 We should according to codestyle.

avatar zero-24 zero-24 - reference | d73d291 - 25 Oct 15
avatar zero-24
zero-24 - comment - 25 Oct 2015

Done here: #8151 @infograf768 and @roland-d

Can you RTC / merge?

avatar rdeutz rdeutz - reference | d37965f - 25 Oct 15
avatar zero-24 zero-24 - change - 28 Oct 2015
Milestone
avatar zero-24 zero-24 - change - 28 Oct 2015
Milestone Added:
avatar zero-24 zero-24 - change - 28 Oct 2015
Milestone Added:
avatar zero-24 zero-24 - change - 28 Oct 2015
Milestone

Add a Comment

Login with GitHub to post a comment