Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#97 2006-12-24 01:49:47

Andrew
Plugin Author
Registered: 2004-02-23
Posts: 730

Re: gbp_permanent_links

You can force a trailing slash with .htaccess with this set of rules (must be placed before your default Textpattern rules):

# force trailing slash
  RewriteCond %{REQUEST_URI}      /+[^\.]+$
  RewriteRule ^(.+[^/])$          /$1/           [R=301,L]

Offline

#98 2006-12-24 01:58:39

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: gbp_permanent_links

Okay here is the next version gbp_permanent_links_0.11 c

This should fix all the issues currently listed on this thread.

  • Added a new redirection preference for mt style links #
  • Fixed the $pg #
  • Fixed bugs with the prefix and suffix output and suffix matching #
  • Removed nested functions to fix the Non-static method PermanentLinksBuildTabView errors #
  • Fixed permlinks, so they use the full url in RSS and ATOM feeds #
  • Fixed a bug where older, newer archive links weren’t being displayed correctly on the front page
  • And hopefully fixed the ‘random sections’ error #

Thanks to everyone who reported these bugs.

Offline

#99 2006-12-24 02:13:17

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: gbp_permanent_links

bisk wrote:

I’ve set omit_trailing_slash to no. But somehow google indexed some urls without the trailing slash.

My permanent links are built like this: section/title/

I noticed if I type in a section/title url in the adres bar it works as well.

So I want any faulty external section/title link to be either redirected with a 301 to section/title/ or given a 404. Is this possible, I’ve tried mod_rewrite but couldn’t get it to work.

The omit_trailing_slash preference value won’t effect whether a page is matched when the URL is with or without the trailing slash. It is only used when outputting links. I shall look into changing this for the future but for now Andrew’s solution looks sound.

Thanks Andrew.

Offline

#100 2006-12-24 02:29:26

Andrew
Plugin Author
Registered: 2004-02-23
Posts: 730

Re: gbp_permanent_links

Yep, no more error :)

Offline

#101 2006-12-24 02:31:35

Andrew
Plugin Author
Registered: 2004-02-23
Posts: 730

Re: gbp_permanent_links

Holy crap, this plugin rocks!

Offline

#102 2006-12-24 02:35:08

Andrew
Plugin Author
Registered: 2004-02-23
Posts: 730

Re: gbp_permanent_links

Hm… actually – I’m now getting an error on the public side:

Fatal error: Non-static method PermanentLinks::check_permlink_conditions() cannot be called statically … on line 711

(I don’t know if this would have been the case before the update, since I didn’t have the ability to create any permlink rules)

Offline

#103 2006-12-24 03:54:03

Andrew
Plugin Author
Registered: 2004-02-23
Posts: 730

Re: gbp_permanent_links

After browsing the source, my guess is that the same could also occur with PermanentLinksListTabView::nav_form() and PermanentLinksListTabView::pager()

(thanks for the help btw :)

Offline

#104 2006-12-24 08:16:49

minimal design
Member
Registered: 2006-10-15
Posts: 38

Re: gbp_permanent_links

hmmm… I finally get a chance to work on my site again and I just realized links to file downloads don’t work…

I get links like http://minimaldesign.net/file_download/projects#38;id=1 instead of http://minimaldesign.net/file_download/1

When I turn off the plugin, it works fine… I’m probably the one at fault but a pointer in the right direction would be appreciated ;)

my set up in the plugin prefs is pretty much the default, only one: section/category/title/

Thanks!

Offline

#105 2006-12-24 08:56:14

bisk
Member
From: The Netherlands
Registered: 2005-03-23
Posts: 12
Website

Re: gbp_permanent_links

Andrew wrote:

You can force a trailing slash with .htaccess with this set of rules (must be placed before your default Textpattern rules):

Thanks a lot. It’s working now :)

Offline

#106 2006-12-24 12:54:44

graeme
Plugin Author
Registered: 2004-06-21
Posts: 337
Website

Re: gbp_permanent_links

Right, gbp_permanent_links v0.11

It has all the improvements and fixes of 0.11a, 0.11b and 0.11c, aswell as fixes for broken file download links and the fatal Non-static method PermanentLinks errors (thanks Andrew!).

Offline

#107 2006-12-24 18:08:59

LeeUmm
Member
From: Hamilton, Ontario
Registered: 2005-04-22
Posts: 91
Website

Re: gbp_permanent_links

Does this last release fix the issue for section/section links?

Offline

#108 2006-12-24 18:34:44

Andrew
Plugin Author
Registered: 2004-02-23
Posts: 730

Re: gbp_permanent_links

Wow… hats off to you, graeme. One of the most powerful and flexible plugins I’ve seen to date.

I still have some testing to do to make sure everything’s kosher before using this on a live site, but my dream of /year/month/title URLs with 301-redirected old permlinks looks like it may just be possible!

Offline

Board footer

Powered by FluxBB