Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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 override_form. {edit: turns out it’s related to sections not being set for date-based URLs}

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

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

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

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

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 as if_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

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

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

Rigel
Member
From: España
Registered: 2005-09-02
Posts: 99
Website

Re: gbp_permanent_links

graeme, thanks for the solution.

Thanks!

Offline

#145 2007-01-06 16:31:10

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

Re: gbp_permanent_links

Andrew wrote:

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.

<snip>

Looks to me like a problem with regular expression matching. Perhaps the existing regular expression rules need more refinement? (that’s my best guess)

You were correct that is was a regular expression problem. gbp_permanent_links v0.11.564 fixes the problem – apart from one example you gave; www.example.com/1 is actually page 1 of the front page article list.

Thanks.

Offline

#146 2007-01-06 16:44:08

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

Re: gbp_permanent_links

I’ll test it out, thanks :)

Offline

#147 2007-01-06 16:46:22

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

Re: gbp_permanent_links

Hm… now my article contents are entirely empty :-/ Title isn’t getting parsed out at all, etc. Homepage works, inner pages don’t. Rolling back to v0.11.552

Last edited by Andrew (2007-01-06 16:52:41)

Offline

#148 2007-01-06 17:04:36

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

Re: gbp_permanent_links

Andrew wrote:

Hm… now my article contents are entirely empty :-/ Title isn’t getting parsed out at all, etc. Homepage works, inner pages don’t. Rolling back to v0.11.552

Sorry! gbp_permanent_links v0.11.565

Offline

#149 2007-01-06 18:14:30

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

Re: gbp_permanent_links

Looking good!

Offline

#150 2007-01-06 20:45:43

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

Re: gbp_permanent_links

Andrew, here is v566 which improves the 404 handling even more. Now page numbers greater than the maximum number of pages from your <txp:article limit="4" /> tag will cause a 404 error. Textpattern never did this before. :)

Offline

Board footer

Powered by FluxBB