Joomla! Discussion Forums



It is currently Tue Nov 24, 2009 5:19 am (All times are UTC )

 


Forum rules

Forum Rules
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 13 posts ] 
Author Message
Posted: Fri Nov 02, 2007 9:32 am 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Fri Aug 12, 2005 10:06 am
Posts: 327
Fresh SVN install from yesterday 1-11-07

For links in content and custom html module:

When I do:
/index.php/services/professional-support

the link becomes:
http://localhost/index.php/services/pro ... al-support

while the site is in a sub directory:
htdocs/mysite/mysite_live

When I do:
index.php/services/professional-support

the link becomes:(double index)
http://localhost/mysite/mysite_live/ind ... al-support

Same thing counts for images:
images/books/image.jpg will show on the frontpage but on other pages they don't show.

There is no way to pinpoint what where works, I'm lost.

Could one of the devs be totally devoted to make the link/basehref etc etc problems go away because this really is a huge issue for people trying to build the first 1.5 sites and are great testers for the stable release, thanks.

I will run tests if needed, please let me know.

Arno

_________________
Joomla! professional services http://www.alvaana.com
http://moovum.com - Get Mollom Anti-Spam on your Joomla! website with Moovur
Follow twitter: @me_arno @jfoobar @moovum


Top
   
 
Posted: Fri Nov 02, 2007 10:14 am 
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Sun Jun 11, 2006 10:51 am
Posts: 262
Location: Finland
when it comes to rendering links few things might come handy to know.

First is if you have base -tag in your template (). Second isRewriteBase (/some_dir/)
.htaccess and maybe RewriteEngine ( On/Off ).

Then I thing it would be nice to be sure about how do you echo those url, if you are using JURI::base and/or JRoute::_() -method(s).

_________________
http://typicalprogrammer.com/programmin ... -oriented/


Top
  E-mail  
 
Posted: Fri Nov 02, 2007 10:48 am 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Fri Aug 12, 2005 10:06 am
Posts: 327
I was talking about putting just basic links in content items, no rewrite on just the standard sef on and I'm using no editor in the admin so it's all clean plain html.

test
test




Just to be clear.

Arno

_________________
Joomla! professional services http://www.alvaana.com
http://moovum.com - Get Mollom Anti-Spam on your Joomla! website with Moovur
Follow twitter: @me_arno @jfoobar @moovum


Top
   
 
Posted: Fri Nov 02, 2007 1:00 pm 
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Sun Jun 11, 2006 10:51 am
Posts: 262
Location: Finland
If the link in src tag, or any other link, does not start with / or http, then it is prefixed by the apache or web browser. Possible places where one can affect what is used before link is .htaccess and base tag. If those are not in use,it is just prefixed with http -address and whatever the path (from apache root) to file is.

So you can not use links without it starting with / or http, that is just plain wrong. Previously in templates there was base -tag that told browser to fill those links, but it is not there anymore.

So what you are saying is normal behaviour. Not starting links with http or / leads to unpredictable or at least unexpected results.

edit: but as you are talking about links in content items, there might be some things to look at if you feel that links without / should be somehow automatically prefixed.

_________________
http://typicalprogrammer.com/programmin ... -oriented/


Last edited by hannul on Fri Nov 02, 2007 1:25 pm, edited 1 time in total.

Top
  E-mail  
 
Posted: Fri Nov 02, 2007 1:12 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Fri Aug 12, 2005 10:06 am
Posts: 327
I know what you are saying but read carefully:

When I do:(saved in the db with the content item)
/index.php/services/professional-support

the link becomes:(on frontend from the db in content item)
http://localhost/index.php/services/pro ... al-support

while the site is in a sub directory:
htdocs/mysite/mysite_live

So it should become:
http://localhost/mysite/mysite_live/ind ... al-support

That doesn't happen and you can of course add the /mysite/mysite_live yourself to each link but that would mean it will be saved in the DB and moving a site from your local dev install to the production server will become a very annoying task.

That doesn't work so there must be something wrong me thinks.

Arno

_________________
Joomla! professional services http://www.alvaana.com
http://moovum.com - Get Mollom Anti-Spam on your Joomla! website with Moovur
Follow twitter: @me_arno @jfoobar @moovum


Top
   
 
Posted: Fri Nov 02, 2007 1:29 pm 
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Sun Jun 11, 2006 10:51 am
Posts: 262
Location: Finland
while you were posting I edited my previous post....

When I finally understood what you meant. Thats right, while developer can add the prefix to links using JURI:.base() of course with editor it is different...

Must see how this affects to image uploading and selecting too... and to portability, if whole path is saved with content.

_________________
http://typicalprogrammer.com/programmin ... -oriented/


Top
  E-mail  
 
Posted: Fri Nov 02, 2007 1:40 pm 
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Sun Jun 11, 2006 10:51 am
Posts: 262
Location: Finland
äsh, stupid me...

Of course those contents must be saved without any path, but when that content is used, then some replacement to uris not starting wtih http (or https or ftp or similar) must be done. That is: prefix should be added and that prefix is received by calling JURI::base.

This is actually problem that in short term could be solved by adding base tag, but as core deves have deprecated it it might not be used. However, it is just for these cases where that base tag is meant to be used...

But this issue is known, what the solution is going to be remains to be seen, good proposals are welcome I guess.

_________________
http://typicalprogrammer.com/programmin ... -oriented/


Top
  E-mail  
 
Posted: Fri Nov 09, 2007 11:59 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Sun Aug 21, 2005 11:41 pm
Posts: 131
Location: UK
Hi,
Whilst we await a final solution, does anyone know how we can add the base tag feature that was deprecated please?

many thanks,

- Vince

_________________
www.hostbaron.com - low price Joomla starter packages.

www.MySQLbackup.info - Automated MySQL Backup script.


Top
  E-mail  
 
Posted: Fri Nov 09, 2007 12:23 pm 
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Sun Jun 11, 2006 10:51 am
Posts: 262
Location: Finland
well,

if you really want to...

the base tag is html tag, that should be in head and it looks like this:
where href is your installation directory.

You can add this to your template directly after opening head -tag.

JURI::base(true) gives the correct value (I suppose, have not tested) or/and $this->baseurl

_________________
http://typicalprogrammer.com/programmin ... -oriented/


Top
  E-mail  
 
Posted: Mon Nov 12, 2007 7:04 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Wed Oct 05, 2005 7:25 am
Posts: 1012
Location: Amsterdam
hannul wrote:
JURI::base(true) gives the correct value (I suppose, have not tested) or/and $this->baseurl



When I last tested this, JURI::base(true) came up empty and $this->baseurl always comes up empty.

I use
Quote:
define('MY_BASE', JURI::base())
and that give me the base url.
This also using last Fridays svn.
Example:
Quote:
define("JURL_BASE", JURI::base());






_________________
Joomla Bug Squad

Note: Sending me private messages for personal support, without this been requested, would lead to ignoring any of your posts in future!


Top
   
 
Posted: Sun Nov 18, 2007 10:47 pm 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Thu Aug 18, 2005 8:55 pm
Posts: 12895
Location: Nijmegen, The Netherlands
[MOD note: topic split. Some other URL problem was moved to a new tread: http://forum.joomla.org/index.php/topic,234805.0.html ]

_________________
Kind Regards,
Peter Martin, Global Moderator - Community & Leadership Team
www.db8.nl - Joomla specialist, Nijmegen, Nederland
Joomla 1.5 Quick Reference Guide: www.db8.nl/en/downloads/misc-downloads/ ... glish.html


Top
   
 
Posted: Tue Nov 20, 2007 4:18 am 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 5759
Location: New York
Did you see this post about the double slash issue?

http://forum.joomla.org/index.php/topic,223987.0.html

_________________
Read your words before posting and think about how other people will read them.
Be polite. Be kind. Be constructive. Say thank you.
Freedom-Equality-Trust-Community-Collaboration-Usability
http://opensourcematters.org/index.php?Itemid=134


Top
   
 
Posted: Tue Nov 20, 2007 3:40 pm 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 6420
Location: Nebraska
Jick wrote:
Fresh SVN install from yesterday 1-11-07

For links in content and custom html module:

When I do:
/index.php/services/professional-support

the link becomes:
http://localhost/index.php/services/pro ... al-support

while the site is in a sub directory:
htdocs/mysite/mysite_live

When I do:
index.php/services/professional-support

the link becomes:(double index)
http://localhost/mysite/mysite_live/ind ... al-support

Same thing counts for images:
images/books/image.jpg will show on the frontpage but on other pages they don't show.

There is no way to pinpoint what where works, I'm lost.

Could one of the devs be totally devoted to make the link/basehref etc etc problems go away because this really is a huge issue for people trying to build the first 1.5 sites and are great testers for the stable release, thanks.

I will run tests if needed, please let me know.

Arno


Arno -

Do you see webstudent's proposed patch as helpful to this problem? If so, would you try it and see if it resolves your issue?

Just wanted to make this connection in case it was relevant,
Amy :)

_________________
http://Twitter.com/AmyStephen
Unofficial Joomla Developer and Site Builders Network http://AllTogetherAsAWhole.org


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group