[FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update

conum
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Sep 15, 2005 9:41 am
Location: Ahrensburg

[FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update

Post by conum » Tue Jun 06, 2006 7:08 pm

I have a lot of anchors () in my content (and static content) and much links (target1) to that anchors. Since updating to 1.0.9 these links don't work anymore. Instead of showing the "target1" the link is to the frontpage "www.xyz.de/index.php#target1"
What went wrong? In 1.0.7 and before everything worked as it should.
Last edited by stingrey on Fri Jun 16, 2006 5:20 pm, edited 1 time in total.

User avatar
Robin
Joomla! Master
Joomla! Master
Posts: 15753
Joined: Thu Aug 18, 2005 10:41 am

Re: Links to anchor don't work after 1.0.7 to 1.0.9 update

Post by Robin » Tue Jun 06, 2006 7:29 pm

Hi,

I have tested with a clean install of Joomla! 1.0.9. stable and can confirm the issue. Will mark the topic as CONFIRMED. Still need to trace what is causing this.

Regards Robin

tijs
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 106
Joined: Mon Aug 29, 2005 7:59 pm

Re: [CONFIRMED/UNDER REVIEW] Links to anchor don't work after 1.0.7 to 1.0.9 upd

Post by tijs » Thu Jun 08, 2006 11:26 am

Is there any work-around for this? I also have this issue and it is quite annoying!

User avatar
Robin
Joomla! Master
Joomla! Master
Posts: 15753
Joined: Thu Aug 18, 2005 10:41 am

Re: [CONFIRMED/UNDER REVIEW] Links to anchor don't work after 1.0.7 to 1.0.9 upd

Post by Robin » Thu Jun 08, 2006 12:27 pm

Hi Tijs,

Still need to investigate the problem, so can't give you a workaround yet.

Dredd9799
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Wed Mar 22, 2006 6:19 am
Contact:

Re: [CONFIRMED/UNDER REVIEW] Links to anchor don't work after 1.0.7 to 1.0.9 update

Post by Dredd9799 » Thu Jun 08, 2006 2:17 pm

As a workaround, I've gone into the mySQL database using PHPMyAdmin and inserted the relative URL for the page in front of the anchor.  So example becomes example.

The core code doesn't change it when you do it that way.  Not sure if this is the best workaround but from the viewpoint of my users, it's a fix.
Curiosity killed the cat, but for a while I was a suspect.

conum
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Sep 15, 2005 9:41 am
Location: Ahrensburg

Re: [CONFIRMED/UNDER REVIEW] Links to anchor don't work after 1.0.7 to 1.0.9 upd

Post by conum » Thu Jun 08, 2006 2:31 pm

Dredd9799 wrote: As a workaround, I've gone into the mySQL database using PHPMyAdmin and inserted the relative URL for the page in front of the anchor.  So example becomes example.
The core code doesn't change it when you do it that way.  Not sure if this is the best workaround but from the viewpoint of my users, it's a fix.
I have about 30 static content items and some content items too, which I would have to change. But I don't want it. The code has to be changed, so that it works like before!

tijs
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 106
Joined: Mon Aug 29, 2005 7:59 pm

Re: [CONFIRMED/UNDER REVIEW] Links to anchor don't work after 1.0.7 to 1.0.9 upd

Post by tijs » Thu Jun 08, 2006 2:51 pm

The point being, it is better practice to have relative links than absolute ones in case the URL changes later on. For now I just put the full absolute URL in front of the #link but obviously it would be better if we can keep using relative links.

t.

havshoei
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Thu Dec 29, 2005 2:01 pm

Re: [CONFIRMED/UNDER REVIEW] Links to anchor don't work after 1.0.7 to 1.0.9 upd

Post by havshoei » Thu Jun 08, 2006 4:29 pm

Hi

I have done some investigation with SEF on and it seems that the error is in ‘mambots/content/mossef.php’, the reason is that the call to sefRelToAbs() do not include information about the current page.

A possible solution could be:

Replace line 76

Code: Select all

	$link 		= sefRelToAbs( $matches[1] );
With:

Code: Select all

	if ( substr($matches[1],0,1) == '#' ) {
		// anchor
		$temp 	= split('index.php', $_SERVER['REQUEST_URI']);
		$link 	= sefRelToAbs( 'index.php' . @$temp[1]);
		$link	= $link .  $matches[1];
	} else {
		$link 	= sefRelToAbs( $matches[1] );
	}
This seems to solve the problem.
Last edited by havshoei on Thu Jun 08, 2006 4:38 pm, edited 1 time in total.

conum
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Sep 15, 2005 9:41 am
Location: Ahrensburg

Re: [CONFIRMED/UNDER REVIEW] Links to anchor don't work after 1.0.7 to 1.0.9 upd

Post by conum » Thu Jun 08, 2006 4:31 pm

I don't know, if that help in my case, as I don't use SEF  :(

havshoei
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Thu Dec 29, 2005 2:01 pm

Re: [CONFIRMED/UNDER REVIEW] Links to anchor don't work after 1.0.7 to 1.0.9 upd

Post by havshoei » Thu Jun 08, 2006 5:02 pm

Hi again

Try unpublish the SEF manbot, ther is a bug in it that do not stop it from running if SEF is disablet.

Or uncomment lines 34 to 36 in 'mambot/content/mossef.php'

Change lines 34 to 36 from

Code: Select all

	//if ( !$mosConfig_sef ) {
	//	return true;
	//}

to

Code: Select all

	if ( !$mosConfig_sef ) {
		return true;
	}

conum
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Sep 15, 2005 9:41 am
Location: Ahrensburg

Re: [CONFIRMED/UNDER REVIEW] Links to anchor don't work after 1.0.7 to 1.0.9 upd

Post by conum » Thu Jun 08, 2006 8:59 pm

I unpublished the sef-mambot and my jumps to anchors work again. Thanks a lot.
I don't know, what this means, as I never used SEF and I don't know, why it was published :o

danimal
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Mon Apr 03, 2006 12:52 am

Re: [CONFIRMED] Links to anchor don't work after 1.0.7 to 1.0.9 update

Post by danimal » Mon Jun 12, 2006 6:15 am

At first i thought it was Open-SEF, but after upgrading now, turning open sef off and just using standard Joomla SEF, I can see that Joomla is definitely the problem.

I have tried numerous fixes posted on here (including the ones above) and the open-sef forum.

anchors only seem to be working properly on the front page,
any other page it will just jump to the front page.

Anyone figure this out?

On this page, it uses a moo-fx nav, on the front page the nav panels slide open no problem. and the top button works
http://patrickmeuser.net/index.php

On this page if you try to use the nav it will just shoot you back to home.
http://patrickmeuser.net/content/view/1/2/

havshoei
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Thu Dec 29, 2005 2:01 pm

Re: [CONFIRMED] Links to anchor don't work after 1.0.7 to 1.0.9 update

Post by havshoei » Mon Jun 12, 2006 8:10 am

It seems to me that it is within a menu module you are using references to page anchors (e.g. href="#foo").

To do this you must create a "Links -- url" menu item (e.g. index.php?option=com_content&task=view&id=1&Itemid=2#foo).

The Joomla function resposible for the translation of internal links to SEF links requires the "index.php?option..." part, otherwise it wil just set the link to "#foo", and the html tag "" redirects you to the frontpage.

The problem in this thread, is page anchors within a single content item do not work, because the "index.php?option..." part do not get set by the sef-bot.

danimal
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Mon Apr 03, 2006 12:52 am

Re: [CONFIRMED] Links to anchor don't work after 1.0.7 to 1.0.9 update

Post by danimal » Mon Jun 12, 2006 8:40 am

havshoei wrote: It seems to me that it is within a menu module you are using references to page anchors (e.g. href="#foo").

To do this you must create a "Links -- url" menu item (e.g. index.php?option=com_content&task=view&id=1&Itemid=2#foo).

The Joomla function resposible for the translation of internal links to SEF links requires the "index.php?option..." part, otherwise it wil just set the link to "#foo", and the html tag "" redirects you to the frontpage.

The problem in this thread, is page anchors within a single content item do not work, because the "index.php?option..." part do not get set by the sef-bot.



thanks, but that is not a module, it is a menu hard coded into my template. and this IS an achor problem nothing more.
thanks for the help though.

matt
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Fri Sep 23, 2005 12:14 pm

Re: [CONFIRMED] Links to anchor don't work after 1.0.7 to 1.0.9 update

Post by matt » Mon Jun 12, 2006 11:12 am

havshoei's suggested fix didn't work for me with SEF on and 404SEF... A proper work around would be much appreciated.

Thanks

Matt

P.s: I mainly have issues with content pages with href links all over the place.

User avatar
sagemaniac
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Sun Sep 11, 2005 6:28 pm
Contact:

Re: [CONFIRMED/UNDER REVIEW] Links to anchor don't work after 1.0.7 to 1.0.9 upd

Post by sagemaniac » Tue Jun 13, 2006 8:45 am

havshoei wrote: ...
A possible solution could be:

Replace line 76
...
Thanks - fixed it for me...

matt
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Fri Sep 23, 2005 12:14 pm

Re: [ON TRACKER] Links to anchor don't work after 1.0.7 to 1.0.9 update

Post by matt » Wed Jun 14, 2006 9:21 am

After further testing on havshoei's hack, I can confirm that it works on content pages! The reason why I reported it not working is that JamboReport's hrefs still don't work. But that can be related to the component.

Thanks a lot havshoei for sharing with us your finding.

Matt

sural98
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 214
Joined: Fri Feb 17, 2006 5:32 pm

Hyperlinked Footnotes

Post by sural98 » Wed Jun 14, 2006 6:26 pm

Quote
I have added a text with hyperlinked footnotes into http://localhost/site. The hyperlinks are relative to the text. eg

[1]

The problem is that this hyperlink points to http://localhost/site/#_ftn1. The content related section of the address is stripped out.
What would be the problem?
Any help will strongly be appreciated because I was about to publish the site. It is postponed because of this problem now.
Thanks.

I had experienced this problem in 1.0.9 stable. I have replaced the current files with 1.0.8 and the problem is over now. That is the hyperlinked footnotes point to the correct paths now.
I do not know what in 1.0.9 caused this problem.

conum
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Thu Sep 15, 2005 9:41 am
Location: Ahrensburg

Re: Hyperlinked Footnotes

Post by conum » Wed Jun 14, 2006 7:12 pm


sural98
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 214
Joined: Fri Feb 17, 2006 5:32 pm

Re: [ON TRACKER] Links to anchor don't work after 1.0.7 to 1.0.9 update

Post by sural98 » Thu Jun 15, 2006 7:48 am

Better is to wait for a fix by the Joomla Team. Workarounds may cause other problems.

danimal
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Mon Apr 03, 2006 12:52 am

Re: [ON TRACKER] Links to anchor don't work after 1.0.7 to 1.0.9 update

Post by danimal » Thu Jun 15, 2006 7:54 am

sural98 wrote: Better is to wait for a fix by the Joomla Team. Workarounds may cause other problems.
I agree, I willl just sit patiently until this gets worked out.
Last edited by danimal on Thu Jun 15, 2006 8:03 am, edited 1 time in total.

User avatar
eric
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 107
Joined: Thu Aug 18, 2005 7:55 pm
Location: Maine
Contact:

Re: [ON TRACKER] Links to anchor don't work after 1.0.7 to 1.0.9 update

Post by eric » Thu Jun 15, 2006 11:35 pm

I'd be interested in hearing some type of response.. can't upgrade until there is a solution.  (and I'm running an old version)
Think for yourself, question authority.

User avatar
Robin
Joomla! Master
Joomla! Master
Posts: 15753
Joined: Thu Aug 18, 2005 10:41 am

Re: [ON TRACKER] Links to anchor don't work after 1.0.7 to 1.0.9 update

Post by Robin » Fri Jun 16, 2006 6:23 am

Hi All,

We are looking at it, but with a long list of reports it's taking some time for us to gather all info and get an overview. It's under our attention and as soon as we have found the real problem a possible fix will also be posted.

Thanks for your patience, regards Robin

User avatar
stingrey
Joomla! Hero
Joomla! Hero
Posts: 2756
Joined: Mon Aug 15, 2005 4:36 pm
Location: Marikina, Metro Manila, Philippines
Contact:

Re: [ON TRACKER] Links to anchor don't work after 1.0.7 to 1.0.9 update

Post by stingrey » Fri Jun 16, 2006 5:20 pm

Fixed in SVN
Rey Gigataras
http://www.wizmediateam.com <-- great team of talented Web Designers and Programmers!
http://about.me/reygigataras <-- About Me :)
Partner, Business Development & Project Manager, Event Manager, Sports Coach :D

User avatar
stingrey
Joomla! Hero
Joomla! Hero
Posts: 2756
Joined: Mon Aug 15, 2005 4:36 pm
Location: Marikina, Metro Manila, Philippines
Contact:

Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update

Post by stingrey » Fri Jun 16, 2006 5:23 pm

The modified /mambots/content/mossef.php file in SVN attached.

Please note that the actual file in SVN is subject to change at anytime and the attached file may differ from the final version in the next release.
Use with caution.
No official support is provided for its use
You do not have the required permissions to view the files attached to this post.
Last edited by stingrey on Fri Jun 16, 2006 5:31 pm, edited 1 time in total.
Rey Gigataras
http://www.wizmediateam.com <-- great team of talented Web Designers and Programmers!
http://about.me/reygigataras <-- About Me :)
Partner, Business Development & Project Manager, Event Manager, Sports Coach :D

User avatar
Cocoony
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Mar 18, 2006 11:18 pm
Location: Lier - Belgium

Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update

Post by Cocoony » Fri Jun 16, 2006 6:45 pm

:D Great! It works! Thanks for the efforts.

Regards,
Peter

danimal
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Mon Apr 03, 2006 12:52 am

Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update

Post by danimal » Sat Jun 17, 2006 1:26 pm

woooo!

thanks, downloading now!

danimal
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Mon Apr 03, 2006 12:52 am

Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update

Post by danimal » Sun Jun 18, 2006 3:07 pm

I installed the fix and it still doesn't work. with core joomla sef or open sef.
i believe this had to do with anchors within content items. my problem is all my anchors redirect me to the home page. they will work on the home page though.

User avatar
Robin
Joomla! Master
Joomla! Master
Posts: 15753
Joined: Thu Aug 18, 2005 10:41 am

Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update

Post by Robin » Sun Jun 18, 2006 6:21 pm

Hi danimal.

I just tested the fix myself, it restores anchors in content from redirecting to frontpage. The anchors are working for me again. You might try another ftp client, or at least check if the new file has been uploaded correctly. To make sure 100%, delete it first from your webserver, then upload the new, this will prevent any errors.

danimal
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Mon Apr 03, 2006 12:52 am

Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update

Post by danimal » Sun Jun 18, 2006 6:36 pm

RobInk wrote: Hi danimal.

I just tested the fix myself, it restores anchors in content from redirecting to frontpage. The anchors are working for me again. You might try another ftp client, or at least check if the new file has been uploaded correctly. To make sure 100%, delete it first from your webserver, then upload the new, this will prevent any errors.
I did it again just to humour myself and no,  it does not work.


Locked

Return to “Q&T 1.0.x Resolved - Archived”