Sorry for the obtuse subject but, let's see if I can explain, and let's see if other people are seeing this: I've got this DTML page: <html><body> <h2><dtml-var title_or_id></h2> <a href="index_html">click here to refresh</a> </body> </html> OK looks fine, but the interesting bit is the anchor at the bottom. Depending on the URL typed into the browser address bar I get different results (but I think they should be the same results). If I put http://localhost:12380/test I get this result: <html><body> <h2>index_html</h2> <a href="index_html">click here to refresh</a> </body> </html> Notice the address in the anchor it looks ok, but If I put http://localhost:12380/test/ into the address bar I get: <html><body> <h2>index_html</h2> <a href="index_html">click here to refresh</a> </body> </html> Which I have to admit looks identical, *BUT* the anchor takes you to different addresses. The first one takes you to the index_html in the root, the second one takes you to the index_html in the test folder as it should. If anyone can understand what I'm going on about and if then any of you have any ideas, *please* let me know. I'm not sure if this is a Zope problem (I don't really see how it could be since the address is the same), or if it's a browser problem. However I'm dead confused here. I can't publish the real address for you top verify this, your going to have to believe me or test it yourself. tia Phil phil.harris@zweb.co.uk
Hi Phil, try <a href="<dtml-var absulute_url>">Click here to refresh</a> :-) Regards Tino PS: Browsers do not know which object is a folder and which is not. If you ommit the / the browser thinks of the last / as beeing the folder. Zope does not care for traling / to find the right object. Phil Harris wrote:
Sorry for the obtuse subject but, let's see if I can explain, and let's see if other people are seeing this:
I've got this DTML page:
<html><body> <h2><dtml-var title_or_id></h2> <a href="index_html">click here to refresh</a> </body> </html>
OK looks fine, but the interesting bit is the anchor at the bottom.
Depending on the URL typed into the browser address bar I get different results (but I think they should be the same results).
If I put http://localhost:12380/test I get this result:
<html><body> <h2>index_html</h2> <a href="index_html">click here to refresh</a> </body> </html>
Notice the address in the anchor it looks ok, but
If I put http://localhost:12380/test/ into the address bar I get:
<html><body> <h2>index_html</h2> <a href="index_html">click here to refresh</a> </body> </html>
Which I have to admit looks identical, *BUT* the anchor takes you to different addresses.
The first one takes you to the index_html in the root, the second one takes you to the index_html in the test folder as it should.
If anyone can understand what I'm going on about and if then any of you have any ideas, *please* let me know.
I'm not sure if this is a Zope problem (I don't really see how it could be since the address is the same), or if it's a browser problem. However I'm dead confused here.
I can't publish the real address for you top verify this, your going to have to believe me or test it yourself.
tia
Phil phil.harris@zweb.co.uk
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Tino, I'ts OK it was an abberation on my part, too much to do, too many people to see. Thanks ----- Original Message ----- From: "Tino Wildenhain" <tino@wildenhain.de> To: "Phil Harris" <phil.harris@zope.co.uk> Cc: <zope@zope.org> Sent: Sunday, March 18, 2001 3:26 PM Subject: Re: [Zope] Hmm weird!
Hi Phil,
try <a href="<dtml-var absulute_url>">Click here to refresh</a>
:-)
Regards Tino
PS: Browsers do not know which object is a folder and which is not. If you ommit the / the browser thinks of the last / as beeing the folder. Zope does not care for traling / to find the right object.
Phil Harris wrote:
Sorry for the obtuse subject but, let's see if I can explain, and let's
see
if other people are seeing this:
I've got this DTML page:
<html><body> <h2><dtml-var title_or_id></h2> <a href="index_html">click here to refresh</a> </body> </html>
OK looks fine, but the interesting bit is the anchor at the bottom.
Depending on the URL typed into the browser address bar I get different results (but I think they should be the same results).
If I put http://localhost:12380/test I get this result:
<html><body> <h2>index_html</h2> <a href="index_html">click here to refresh</a> </body> </html>
Notice the address in the anchor it looks ok, but
If I put http://localhost:12380/test/ into the address bar I get:
<html><body> <h2>index_html</h2> <a href="index_html">click here to refresh</a> </body> </html>
Which I have to admit looks identical, *BUT* the anchor takes you to different addresses.
The first one takes you to the index_html in the root, the second one takes you to the index_html in the test folder as it should.
If anyone can understand what I'm going on about and if then any of you have any ideas, *please* let me know.
I'm not sure if this is a Zope problem (I don't really see how it could be since the address is the same), or if it's a browser problem. However I'm dead confused here.
I can't publish the real address for you top verify this, your going to have to believe me or test it yourself.
tia
Phil phil.harris@zweb.co.uk
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Tino Wildenhain wrote:
Hi Phil,
try <a href="<dtml-var absulute_url>">Click here to refresh</a>
:-)
Regards Tino
PS: Browsers do not know which object is a folder and which is not. If you ommit the / the browser thinks of the last / as beeing the folder. Zope does not care for traling / to find the right object.
Phil Harris wrote:
Sorry for the obtuse subject but, let's see if I can explain, and let's see if other people are seeing this:
I've got this DTML page:
<html><body> <h2><dtml-var title_or_id></h2> <a href="index_html">click here to refresh</a> </body> </html>
OK looks fine, but the interesting bit is the anchor at the bottom.
Depending on the URL typed into the browser address bar I get different results (but I think they should be the same results).
If I put http://localhost:12380/test I get this result:
<html><body> <h2>index_html</h2> <a href="index_html">click here to refresh</a> </body> </html>
Notice the address in the anchor it looks ok, but
If I put http://localhost:12380/test/ into the address bar I get:
<html><body> <h2>index_html</h2> <a href="index_html">click here to refresh</a> </body> </html>
Which I have to admit looks identical, *BUT* the anchor takes you to different addresses.
The first one takes you to the index_html in the root, the second one takes you to the index_html in the test folder as it should.
When you use http://localhost:12380/test the method called is referred to the root because of the position of the last /. It is coerrected if you call it with http://localhost:12380/test/ The method zope calls is related to the last object with /, on the URL. You can notice the object to the left of the last / has changed. I can't explain it better but this is how it works.
If anyone can understand what I'm going on about and if then any of you have any ideas, *please* let me know.
I'm not sure if this is a Zope problem (I don't really see how it could be since the address is the same), or if it's a browser problem. However I'm dead confused here.
I can't publish the real address for you top verify this, your going to have to believe me or test it yourself.
tia
Phil phil.harris@zweb.co.uk
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- URL: http://www.terravista.pt/Enseada/1831 http://accosta.planetaclix.pt http://students.fct.unl.pt/~anjc PT is Portugal ####### # # # #" #" # Linux ##vvvvv## Rules! ## vvv ## # ## ## ## ### ### +++##### ##++ ++++++# #++++++ +++++++# #+++++++ +++++#######+++++ +++ +++ "Perfection is achieved, not when there's nothing else to add, but when there's nothing else to take away."
Hi, I created a news Z class with some attributes, hoping to find them in the Zcatalog. The news-class is Catalog aware, and if i create some new instances of news they automaticaly appear in the catalog! So far, so well. (Btw, I am using Zope 2.3.0). Ok, the new news appears in the catalog tab of my catalog. But if I click on this item in the catalog tab, i have to remark, that it has not been indexed yet!!! There are no value entries behind the keys. That's the reason why i am not able to find some news in my search at once. First I have to go in the Advanced tab and update the catalog. After that the news are indexed and all works fine. Perhabs someone could help me? Is it possibly a bug in 2.3.0 ??? Thank you, Marc
Phil Harris wrote:
If I put http://localhost:12380/test I get this result:
<a href="index_html">click here to refresh</a>
If I put http://localhost:12380/test/ into the address bar I get:
<a href="index_html">click here to refresh</a>
Which I have to admit looks identical, *BUT* the anchor takes you to different addresses.
This is a relative URL problem (the reason why Zope is known to put that BASE tag in some times ;-) I'm pretty sure browsers build relative URLs reltive to the last slash in the URL they're given, unless there's a base tag present. So, in your first example you get http://localhost:12380/index_html In the second, you get http://localhost:12380/test/index_html You get similar problems with cookies unless you specify a path of / ;-) Anyway, the way I usually get around this would be to do: <a href="&dtml.url-index_html;">click here to refresh</a> HTH, Chris
This one is simple. When a browser sees a relative URL (which is what you have in your href field in the dtml source, since it doesn't start with a '/' character), it has to construct a link based on the current URL. The first example, since the current URL does not end in a slash, is assumed to be the content of a FILE called 'test', in a directory called '/'. When it constructs the relatvie url, it appends the new filename to the end of the current DIRECTORY, removing the 'test' element. The second example has a slash at the end, so the current file is considered to be the default content in the directory called '/test/'. The relative url is then constructed within the '/test/' directory, so the new filename is appended to '/test/'. That is why you are getting two separate URLs. Use an absolute url in your link. On most webservers, this wouldn't work, since a single address can not usually be addressed as both a file and a directory. In your first example with apache, apache would redirect the browser to the correct form, with the final slash, if it was a directory. If it was a file, the second example would result in an error. With Zope, acquisition makes it possible for the thing to work either way, although not with correct results. --sam Phil Harris wrote:
Sorry for the obtuse subject but, let's see if I can explain, and let's see if other people are seeing this:
I've got this DTML page:
<html><body> <h2><dtml-var title_or_id></h2> <a href="index_html">click here to refresh</a> </body> </html>
OK looks fine, but the interesting bit is the anchor at the bottom.
Depending on the URL typed into the browser address bar I get different results (but I think they should be the same results).
If I put http://localhost:12380/test I get this result:
<html><body> <h2>index_html</h2> <a href="index_html">click here to refresh</a> </body> </html>
Notice the address in the anchor it looks ok, but
If I put http://localhost:12380/test/ into the address bar I get:
<html><body> <h2>index_html</h2> <a href="index_html">click here to refresh</a> </body> </html>
Which I have to admit looks identical, *BUT* the anchor takes you to different addresses.
The first one takes you to the index_html in the root, the second one takes you to the index_html in the test folder as it should.
If anyone can understand what I'm going on about and if then any of you have any ideas, *please* let me know.
I'm not sure if this is a Zope problem (I don't really see how it could be since the address is the same), or if it's a browser problem. However I'm dead confused here.
I can't publish the real address for you top verify this, your going to have to believe me or test it yourself.
tia
Phil phil.harris@zweb.co.uk
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (6)
-
Antonio Costa -
Chris Withers -
Marc Fischer -
Phil Harris -
Sam Gendler -
Tino Wildenhain