Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-03-22 13:00:05

brain
Member
Registered: 2005-06-28
Posts: 15

sgb_ url_handler & error_document: permlink url acting not as expected

Hi,
on this site: http://www.photographicapress.net/blog/, i have problems with article title permlink urls, textpattern doesn’t create the permurl for the article, instead it create a permlink to te current page.

For example, on http://www.photographicapress.net/blog/ the article titles links points to “http://www.photographicapress.net/blog/”, and on http://www.photographicapress.net/blog/blog/mostre/ points ti “http://www.photographicapress.net/blog/blog/mostre/”.

I’ve installed and configured the sgb_url_handler and sgb_error_documents on the txp installation; i’ve another site on this host (but in another database) at www.photographicapress.net that with the same configuration and plugins and it work well.

Some suggestions ? thanks in advance

(Edit: updated title to more closely reflect the problem. :) -Mary)

Last edited by Mary (2006-03-24 09:47:47)

Offline

#2 2006-03-22 13:15:05

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: sgb_ url_handler & error_document: permlink url acting not as expected

Start here.

If you need more help, we’ll need more details.


Alex

Offline

#3 2006-03-22 14:05:02

brain
Member
Registered: 2005-06-28
Posts: 15

Re: sgb_ url_handler & error_document: permlink url acting not as expected

I’ve made all the diagnosis you suggested but without results.

<code>
<div id=“principale”>
<txp:if_section name=”“>
<txp:article_custom section=“blog” limit=“3” sortby=“Posted” sortdir=“desc” />
<txp:article_custom section=“blog” offset=“3” sortby=“Posted” sortdir=“desc” limit=“5” form=“estratto” />
</txp:if_category>
</txp:if_section>
</div>
</code>

this is the only code in the template (except for header footer etc., but they are all defaults).

The error appear when i use the permlink mode “/section/category/title” (added via the instruction by sgb for sgb_url_handlers); i’ve already used this modified mode with other installations of textpattern without problems; another txp installation on the same domain, www.photographicapress.net with the same settings works well, but this in www.photographicapress.net/blog not; the installations are in two different database (not one shared) but with the same code and settings.

I’ve noticed a thing: in the panel in admin/prefs in the NON-working installation the mode is displayed as “/section/category/title” (the way it should be displayed) in the dropdown menu; in the working is displayed as “section_category_title” (not the correct way but here it works).

Offline

#4 2006-03-22 14:14:48

brain
Member
Registered: 2005-06-28
Posts: 15

Re: sgb_ url_handler & error_document: permlink url acting not as expected

it seem like i resolved the problem

in the function: function permlinkurl($article_array) i’ve replaced the lines
<code>
if (isset($prefs[‘custom_url_func’]) and is_callable($prefs[‘custom_url_func’])) return call_user_func($prefs[‘custom_url_func’], $article_array);
</code>

with

<code>
if (isset($txpac[‘custom_url_func’]) and is_callable($txpac[‘custom_url_func’])) return call_user_func($txpac[‘custom_url_func’]);
</code>

and now it works.

thanks for the attention
bye

Offline

#5 2006-03-23 00:34:53

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: sgb_ url_handler & error_document: permlink url acting not as expected

That’s not a fix, that’s falling back on the old admin preferences file, which means you won’t be able to modify your preferences in the Txp admin panel. Obviously, you’ve got problems with your tables.

Offline

#6 2006-03-23 09:55:33

brain
Member
Registered: 2005-06-28
Posts: 15

Re: sgb_ url_handler & error_document: permlink url acting not as expected

I’ve tried all the admin panel options and they seem to work, it’s possible that modifyng only that part of the txp code doesn’t affect the functionality ? Or you mean i can’t change the urls options only ?
i changed the function also in other sites and they seem to work well, could this be dangerous? there’s another way to solve it ?
thanks

Offline

#7 2006-03-23 10:21:26

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: sgb_ url_handler & error_document: permlink url acting not as expected

It sounds like this is a problem with one of your plugins, not with Textpattern itself.


Alex

Offline

#8 2006-03-24 02:47:03

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: sgb_ url_handler & error_document: permlink url acting not as expected

What url plugin(s) are you using?

Offline

#9 2006-03-24 08:39:32

brain
Member
Registered: 2005-06-28
Posts: 15

Re: sgb_ url_handler & error_document: permlink url acting not as expected

sgb_url_handler (with sgb_error_documents), installed in the proper way as pointed in the recent posts in the plugin forum

Offline

#10 2006-03-24 09:46:11

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: sgb_ url_handler & error_document: permlink url acting not as expected

I’ve gone back and re-read all you’ve posted, and your problem is with the plugin, not Textpattern itself, so you’ll need to ask the plugin developer.

Offline

Board footer

Powered by FluxBB