Welcome Guest, Not a member yet? Register   Sign In
url anchor producing strange output
#1

[eluser]boony[/eluser]
Hello

Just encountered very strange thing. I am doing a standard nav bar and have an anchor code like:
Code:
<?=anchor('welcome/index', 'home')?>

Seems straight forward. But the view is producing this...
Code:
home (http://localhost/bluewhale/index.php/welcome/index.html)
You can see that the link is ok but the actual url is also displayed.

This is happening for all links. But not on another test site on the same localhost server. What is going on???
#2

[eluser]wabu[/eluser]
Are your 'base_url' and 'index_page' config settings different for your test site?
#3

[eluser]boony[/eluser]
[quote author="wabu" date="1250096067"]Are your 'base_url' and 'index_page' config settings different for your test site?[/quote]

Well, this is very strange. :bug: I think I have all the appropriate settings:

correct base url
loaded the url helper
routes ok
correct syntax

basically, the same page works in another subdirectory.

Any other thoughts anyone?
#4

[eluser]garymardell[/eluser]
Style sheet maybe.
For some reason you may have something like this:

a:link:after, a:visited:after {content:" (" attr(href) ")"}

In your stylesheet, i know it comes part of the blueprint css framework in the print.css file. This would make what you are viewing. As it gets the url and appends it after the link in brackets.
#5

[eluser]boony[/eluser]
[quote author="garymardell" date="1250099418"]Style sheet maybe.
For some reason you may have something like this:

a:link:after, a:visited:after {content:" (" attr(href) ")"}

In your stylesheet, i know it comes part of the blueprint css framework in the print.css file. This would make what you are viewing. As it gets the url and appends it after the link in brackets.[/quote]

Ho ho, this is interesting. I haven't yet gone to check but yes, I am using the blueprint css framework, however funny enough I am using the exact same css files in both sites on the localhost (subdirectories) but the problem only appears in one. In fact most of the site is a direct copy of the older one and this has come up as a problem in the new test site.

This is truly weird...
#6

[eluser]garymardell[/eluser]
Somewhere down the line the print.css stylesheet may not be loaded as the print stylesheet but also as a media one which would explain the links. Try removing that line from the stylesheets.
#7

[eluser]boony[/eluser]
Whoa there, hold ya horses....Yep that was the sucker! I checked both and realise that I has placed the print.css file in the header of the new test site (don't really know why exactly) but I got rid of it and the damn links work perfectly well..just wish my brain would do the same... %-P
#8

[eluser]garymardell[/eluser]
Lol, well glad that i could help. You should be amazed by my ability to pick out the problem from no where. Not knowing you were using blueprint or anything :p
#9

[eluser]boony[/eluser]
Thanks Gary,

you are a genius! But this is what makes this forum the absolute best I have ever used. Amazing people who are prepared to give back to the community in some of the fastest turn around you can only dream of elsewhere. :-)
#10

[eluser]garymardell[/eluser]
This forum is pretty amazing for support, i think there must be some of the fastest response times to problems. There are some truly clever people on here and great programmers.




Theme © iAndrew 2016 - Forum software by © MyBB