Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-04-12 07:28:06

buggerr
New Member
Registered: 2010-04-12
Posts: 5

Fix Bad section links with clean urls?

Hi, I have a site (running txp 4.2) with gbp_permanent_links (v0.14.6) on. And everything works fine except for one thing. When I try to navigate my site using the main menu while browsing a section category, the links are all pointing to the section category that I am browsing and not to url that they should be pointing to.

For example, I have a “reviews” section on my site where I hold my book and movie reviews (both of which are categories). When I browse mysite.com/reviews/movies, the site navigation menu URLs all point to the page I am currently on (mysite.com/reviews/movies) and not to URLs they should be pointing to.

My gbp_permanent_links rules:
Precedence | URL Structure
10 section/id/
9 section/category/id/

How do I fix this so that the site navigation menu point to their proper url and not attach the category? Ive searched the forums but I can’t come up with anything. Thanks.

Offline

#2 2010-04-12 20:06:00

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Fix Bad section links with clean urls?

Can you provide a link to the site in question? And can you post your code that is generating the wrong links?
Also, did you check if the tag trace gives you any pointers? If it’s not clear to you, you can post it here.

Offline

#3 2010-04-12 20:40:58

buggerr
New Member
Registered: 2010-04-12
Posts: 5

Re: Fix Bad section links with clean urls?

The page in question
The same problem also occurs in any other section with a category the same problem in the articles section

Now look at the site navigation menu URLs… they are all pointing to the category you are currently browsing.

Tag Trace for http://ecko.byethost16.com/reviews/movies/
tag trace @ pasetbin

Here is the code for my site navigation menu. I don’t there is anything wrong with this because it works fine on every other page.

<ul id="navvy">
<txp:section_list default_title='<txp:text item="home" />' include_default="1" break="li" exclude="linklog">
<txp:section link="1" title="1" />
</txp:section_list>
</ul>
<!-- searchform -->
<div class="center"><txp:search_input label="" size="22" /></div>
<!-- searchform -->

Offline

#4 2010-04-12 22:34:39

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Fix Bad section links with clean urls?

Now that I see it on your site, I remember having exactly the same problem years ago. I just can’t find how (or if) I solved it… And there are more mentions of it in the plugin thread.

But try this: wrap <txp:gbp_disable_permlinks> ... </txp:gbp_disable_permlinks> around your section_list tags. It seems to work on my test site.

Offline

#5 2010-04-12 23:23:08

buggerr
New Member
Registered: 2010-04-12
Posts: 5

Re: Fix Bad section links with clean urls?

It worked! Thank you.

I am just curious though, is there another workaround instead of placing a pair of tags in each age?

Offline

#6 2010-04-13 17:51:04

buggerr
New Member
Registered: 2010-04-12
Posts: 5

Re: Fix Bad section links with clean urls?

As you can see in the link above, how do you get rid of that error?
Tag error: <txp:article /> -> Textpattern Notice: article_tag_illegal_body on line 556
What page or form is line 556 referring to?

Another question… I have set up search/ rule in gbp_permanent_links so that when someone searches, I would get clean URLs… but its not working. What do I change?

Offline

#7 2010-04-13 19:58:03

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Fix Bad section links with clean urls?

buggerr wrote:

As you can see in the link above, how do you get rid of that error?
Tag error: <txp:article /> -> Textpattern Notice: article_tag_illegal_body on line 556
What page or form is line 556 referring to?

This part of your tag trace:

		[article 1]
		[Form: single]
		<txp:if_individual_article>
			[<txp:if_individual_article>: false]
			<txp:permlink>
				<txp:title />
			</txp:permlink>
		</txp:if_individual_article>
		<txp:posted />
		<txp:gho_comments_invite showcount="yes" zero="No Comments" />
			[SQL (0.000514984130859): select Annotate, AnnotateInvite from textpattern where ID='1']
			[SQL (0.00031304359436): select count(*) from txp_discuss where parentid='1' and visible='1']
		<txp:category1 title="1" link="1" />
		<txp:category2 title="1" link="1" />
			[SQL (0.00366997718811): select title from txp_category where name='interesting' and type='article']
		<txp:body />
			<txp:article />
				Tag error:  <txp:article /> -> Textpattern Notice: article_tag_illegal_body  on line 556

makes me think that you have a <txp:article /> tag in the body of article #1. Can that be the case?

Another question… I have set up search/ rule in gbp_permanent_links so that when someone searches, I would get clean URLs… but its not working. What do I change?

I don’t know, it’s a long time ago that I played with this plugin. You have a better chance to get a decent reply if you post your question in the plugin thread.

I am just curious though, is there another workaround instead of placing a pair of tags in each age?

I don’t know, I just found out this works ;) You can also post this in the plugin thread, there are more people who reported the same problem, but I haven’t actually seen a solution. But it’s a long thread, so I may have missed it…

Offline

#8 2010-04-13 20:57:25

buggerr
New Member
Registered: 2010-04-12
Posts: 5

Re: Fix Bad section links with clean urls?

Oh, I see. Ok I fixed it. There was a article tag in the first (default) post that come with textpattern. Error came up because I changed the text formatting from textile to markdown.

I have already searched the thread (which took forever because there is no in-thread search) and only one post similar to mine came. Otherwise, no luck. :(

Anyway, thanks for your help and quick replies ;)

Offline

Board footer

Powered by FluxBB