? ? Success

User tests: Successful: Unsuccessful:

avatar jo-sf
jo-sf
19 Sep 2014

Suppose you have a Joomla website that is reachable via different domain names or via HTTP and HTTPS. If you want to use the links A/B/C in your articles (I assume that your template knows what to do with these, which is the case e.g. with the Protostar template) you currently have to decide which of your domain names you want to use resp. whether you want to use HTTP or HTTPS as protocol if you want to assign links to other pages within your website to the links A/B/C.

This PR proposes changes which allow to assign internal links to the links A/B/C.

About testing these changes:

  • it is possible to assign to the links A/B/C both in the backend and in the frontend, but for the frontend it must be enabled first in the options menu of the article manager
  • there are four cases to be considered in testing:
    • Joomla is installed in the document root of your webserver
      • SEO URL rewriting is not active (means: all server relative paths start with "index.php")
      • SEO URL rewriting is active
    • Joomla is installed in a subdirectory of the document root of your webserver
      • SEO URL rewriting is not active (means: all server relative paths start with the subdirectory followed by "index.php")
      • SEO URL rewriting is active

For testing I used the fruit shop welcome page from the example installation but any other pages should work as well. I added links to the "Apples", "Bananas" and "Tamarind" pages to the "Welcome" page of the fruit shop.

What should work with these changes (and what not) - examples based upon the fruit shop pages:

  • document root installation, no URL rewriting
    • index.php/fruit-encyclopedia/38-a => /index.php/fruit-encyclopedia/38-a
    • /index.php/fruit-encyclopedia/38-a => will not be changed
    • http://<ServerName>/index.php/fruit-encyclopedia/38-a => will not be changed
  • document root installation, URL rewriting
    • fruit-encyclopedia/38-a.html => /fruit-encyclopedia/38-a.html
    • /fruit-encyclopedia/38-a.html => will not be changed
    • http://<ServerName>/fruit-encyclopedia/38-a.html => will not be changed
  • subdirectory installation (j3/), no URL rewriting
    • index.php/fruit-encyclopedia/38-a => /j3/index.php/fruit-encyclopedia/38-a
    • j3/index.php/fruit-encyclopedia/38-a => /j3/j3/index.php/fruit-encyclopedia/38-a (wrong!)
    • /j3/index.php/fruit-encyclopedia/38-a => will not be changed
    • http://<ServerName>/j3/index.php/fruit-encyclopedia/38-a => will not be changed
  • subdirectory installation (j3/), URL rewriting
    • fruit-encyclopedia/38-a.html => /j3/fruit-encyclopedia/38-a.html
    • j3/fruit-encyclopedia/38-a.html => /j3/j3/fruit-encyclopedia/38-a.html (wrong!)
    • /j3/fruit-encyclopedia/38-a.html => will not be changed
    • http://<ServerName>/j3/fruit-encyclopedia/38-a.html => will not be changed

I know that there are other components in Joomla which also allow to enter URLs, e.g. the contact manager. It is probably also in those components of interest to allow internal URLs beside the external URLs currently only allowed there. If you enter a relative URL (means: URL without protocol etc.) the library routines do their best to convert this URL into an external URL (see libraries/joomla/form/form.php for details) but by principle it cannot work well always though I found an error in this part and corrected it as part of my changes.

If you now have a sort of deja-vu this is no wonder! The above PR description is nearly identical to PR #4309 since it covers the same topic but for the Joomla 2.5.x branch. There are some differences though which are caused by the punycode support introduced with Joomla 3 and the support of some HTML 5 attributes, especially the type="url" attribute for input fields.

avatar jo-sf jo-sf - open - 19 Sep 2014
avatar jissues-bot jissues-bot - change - 19 Sep 2014
Labels Added: ?
avatar infograf768 infograf768 - change - 20 Sep 2014
Labels Added: ?
avatar infograf768
infograf768 - comment - 20 Sep 2014

Travis fails. I see one closing brace too much (among other code style issues ) in url.php around line 82

avatar jo-sf
jo-sf - comment - 20 Sep 2014

@infograf768 I removed the superfluous brace at line 82 in url.php (the web interface added this brace automatically when I entered the code before this line - presumably it was set when I opened the brace at line 75).

Can you give me some examples regarding code style issues? When I made my changes in these files I tried to mimic the code style of these files, especially around the lines I added or changed.

This comment was created with the J!Tracker Application at http://issues.joomla.org/.

avatar infograf768
infograf768 - comment - 22 Sep 2014

FILE: /home/travis/build/joomla/joomla-cms/libraries/joomla/form/form.php


FOUND 1 ERROR(S) AFFECTING 1 LINE(S)


1318 | ERROR | Please consider the /* */ style for comments that span over

| | multiple lines.

avatar infograf768
infograf768 - comment - 22 Sep 2014

Launched Travis again

avatar jo-sf
jo-sf - comment - 23 Sep 2014

I changed the comment in the file form.php according to the code style and I hope that Travis won't complain any longer about it.

avatar infograf768
infograf768 - comment - 23 Sep 2014

Travis OK now. Patch works for me. One more tester.

avatar zero-24 zero-24 - alter_testresult - 26 Sep 2014 - infograf768: Tested successfully
avatar zero-24 zero-24 - change - 26 Sep 2014
Category Administration Components Front End Language & Strings Libraries
avatar infograf768
infograf768 - comment - 27 Sep 2014

This has been merged into 3.4.dev. Closing

avatar infograf768 infograf768 - close - 27 Sep 2014
avatar infograf768 infograf768 - change - 27 Sep 2014
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2014-09-27 06:35:06

Add a Comment

Login with GitHub to post a comment