Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#133 2006-12-29 17:31:52
- Andrew
- Plugin Author
- Registered: 2004-02-23
- Posts: 730
Re: gbp_permanent_links
You are quick, like ninja!
Offline
#134 2006-12-30 15:15:09
Re: gbp_permanent_links
graeme, <txp:php>echo $pg;</txp:php>
still not working.
Regards.
Offline
#135 2006-12-31 02:15:28
- Andrew
- Plugin Author
- Registered: 2004-02-23
- Posts: 730
Re: gbp_permanent_links
Ok, found another bug :)
Looks like this plugin is returning false positives for non-existent URLs. This is pretty critical for things such as Google Webmaster Tools, which requires 404s to return 404/Not Found, not 200/OK. I would classify this bug as critical, since Google (and other services of its kind) require proper header responses to ensure ownership and provide site diagnostics.
However, I’ve been unable to figure out what exact circumstances causes the bug. Here are a few example URLs, all of which should 404:
- Result: 200 OK (should be 404 Not Found)
- http://example.com/3204l2jhlk123lk123l4kj3465j345lk21
- http://example.com/3204
- http://example.com/leb9b4ab975fss23d4gsgf343323r.html
- http://example.com/1
- http://example.com/1234asdf
- http://example.com/1234asdf/123
I am using two rules:
- Primary rule:
/year/month/title
- Secondary Rule:
/section/id/title
-> destination -> redirect to -> Primary rule
Looks to me like a problem with regular expression matching. Perhaps the existing regular expression rules need more refinement? (that’s my best guess)
Offline
#136 2006-12-31 11:45:57
- marios
- Archived Plugin Author
- Registered: 2005-03-12
- Posts: 1,253
Re: gbp_permanent_links
Graeme, thanks again for this excellent work.
I just spent an hour to take a llook at it, trying some simple options. Works great.
However, one small thing:
On the help sections of the admin plugin page, I’m not seeing any documtation.
Do you have a list somewhere, with the tags, I can use, without having to go through all the plugin’s code ?
Happy new Year also, regards,
marios
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
#137 2007-01-02 18:42:36
- Andrew
- Plugin Author
- Registered: 2004-02-23
- Posts: 730
Re: gbp_permanent_links
Crap – I just found another major/critical bug.
Articles aren’t being parsed out with a custom {edit: turns out it’s related to sections not being set for date-based URLs}override_form
.
Last edited by Andrew (2007-01-02 23:48:22)
Offline
#138 2007-01-02 19:57:21
- Andrew
- Plugin Author
- Registered: 2004-02-23
- Posts: 730
Re: gbp_permanent_links
I think I know what’s going on. It looks like it has to do with if_section
and $pretext['s']
not getting set to the current article’s section when using date-based URLs. I switched my template to use if_individual_article
instead and it works fine now.
(still having those 404 issues tho)
Offline
#139 2007-01-05 15:21:13
- Andrew
- Plugin Author
- Registered: 2004-02-23
- Posts: 730
Re: gbp_permanent_links
graeme, can you release a quick update that sets $pretext['s']
? It appears to never get correctly set when using this plugin, which breaks many default Textpattern functions such as if_section
.
Currently when I load articles, I’m seeing thisarticle['section'] = 'article'
and $pretext['s'] = 'default'
. Not sure how/why, but that’s what it is.
Adding this seems to fix it for the short term:
global $pretext, $thisarticle;
if ( !empty($thisarticle['section']) )
$pretext['s'] = $thisarticle['section'];
Last edited by Andrew (2007-01-05 15:32:20)
Offline
#140 2007-01-05 18:43:56
Re: gbp_permanent_links
Rigel wrote:
graeme,
<txp:php>echo $pg;</txp:php>
still not working.
Try: <txp:php>echo $GLOBALS['pg'];</txp:php>
Offline
#141 2007-01-05 18:45:49
Re: gbp_permanent_links
Andrew wrote:
graeme, can you release a quick update that sets
$pretext['s']
? It appears to never get correctly set when using this plugin, which breaks many default Textpattern functions such asif_section
.
How about this: gbp_permanent_links v0.11.552. That should fix it. I shall look at the 404 issue soon. I’ve been busy catching up with work over the holidays this week.
Last edited by graeme (2007-01-05 18:46:08)
Offline
#142 2007-01-05 18:50:14
Re: gbp_permanent_links
marios wrote:
On the help sections of the admin plugin page, I’m not seeing any documtation.
Documentation is coming soon.
Do you have a list somewhere, with the tags, I can use, without having to go through all the plugin’s code ?
There are 4 tags provided by this plugin: gbp_if_regex
, gbp_if_text
, gbp_use_pagelink
and gbp_disable_permlinks
which have been described here. I will add more details and examples in the documentation.
Offline
#143 2007-01-05 18:57:14
- marios
- Archived Plugin Author
- Registered: 2005-03-12
- Posts: 1,253
Re: gbp_permanent_links
graeme wrote:
There are 4 tags provided by this plugin: @gbp_if_regex@, @gbp_if_text@, @gbp_use_pagelink@ and @gbp_disable_permlinks@ which have been described "here":http://forum.textpattern.com/viewtopic.php?pid=130031#p130031. I will add more details and examples in the documentation.
Thanks, graeme, I thought there was more of them.should be enough to get me going.
regards, marios
Last edited by marios (2007-01-05 18:57:39)
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
#144 2007-01-06 07:50:38
Re: gbp_permanent_links
graeme, thanks for the solution.
Thanks!
Offline