Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2005-03-18 16:28:12

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

Do I have to change anything when I upgrade to 0.1.5? With 0.1.3 /section/title used to work but it doesn’t anymore after the upgrade. All I get is a blank page.

When I give the article a category all is well but that puts redundant info in the URL.

Any ideas?

Last edited by andreas (2005-03-18 16:32:59)

Offline

#38 2005-03-18 17:05:07

sungodbiff
Archived Plugin Author
Registered: 2004-03-23
Posts: 57
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

andreas -

Do you have any other plugins installed? Or did you update TxP?

You might also want to make sure you’ve grabbed the most recent version of 0.1.5 (I had a version posted for about an hour with a typo).

- sgb

Last edited by sungodbiff (2005-03-18 17:05:38)

Offline

#39 2005-03-18 18:35:16

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

I also use zem_rewrite for my URLs but, as I said, the two plugins got along well together in v0.1.3.

I’ve just downloaded the latest version of your plugin but it didn’t solve the problem. I use the latest revision of TXP (rev231).

There’s no way your plugin could replace zem_rewrite, is there? My most important concern are URLs without ID numbers and I need /section/title as well as /section/category/title.

Thanks for the help.

Offline

#40 2005-03-19 04:14:18

sungodbiff
Archived Plugin Author
Registered: 2004-03-23
Posts: 57
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

andreas -

Is the problem occurring for one URL or all URLs? Could you post a URL that isn’t working?

I’ve updated my install of TxP and installed zem_rewrite 0.6 so I’ll try to mirror your set-up as best I can.

- sgb

Offline

#41 2005-03-19 09:34:44

micampe
Archived Plugin Author
From: Treviso, Italy
Registered: 2005-03-07
Posts: 38
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

Well, I don’t use this plugin to fix broken/moved URLs (not just for that at least), but also to use different URL schemes in different sections. In my diary/log sections I want date based URLs, but for my articles I want /section/title, so I’d like for the HTTP status code to be configurable.

If it is not, I’ll fix it by myself, owever…

Offline

#42 2005-03-19 17:57:53

sungodbiff
Archived Plugin Author
Registered: 2004-03-23
Posts: 57
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

micampe -

That’s very interesting. How are you generating different permlinks for different sections?

With the alpha version (I’m testing now) the plugin compares the parsed URL format to the currently set URL (in the prefs). If they don’t match a 301/redirect is sent. This feature can be disabled, but it is a “global” disable, and not per section (although making it per section wouldn’t be difficult).

- sgb

Offline

#43 2005-03-19 18:56:02

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

sungodbiff,

the problem occurs for all articles that only have a section assigned to them. If an article also has a category it is loaded no problem. This might be because zem_rewrite works that way, before I used your plugin all articles had to have a category as well as a section. But when I installed the earlier version of your plugin this requirement was gone and I could have category-less articles.

I just read that your plugin checks for the URL mode chosen in the prefs. Could this be the problem? Because no matter which mode I choose, it will be different from the one I use with zem_rewrite.

By the way, I’d also be interested in how to use different schemes for different sections. I’d like to use a date-based one for my blog as well, the rest of the site should have /section/title or /section/category/title

Thanks for all your help!

Offline

#44 2005-03-19 19:10:10

sungodbiff
Archived Plugin Author
Registered: 2004-03-23
Posts: 57
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

Andreas -

Version 0.1.5 doesn’t compare the parsed URL to the currently set permlink mode, so that wouldn’t be the problem.

I’m wondering if perhaps zem_rewrite & sgb_url_handler are interferring with one another. On my site I have a few articles with no categories and I haven’t experienced any problems with them not displaying.

Can you try temporarily turning off zem_rewrite and seeing if the problem still exists?

- sgb

Offline

#45 2005-03-19 19:24:48

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

When I turn it off, I have to replace the zem_rewrite permlink tag with the original one. Tonight, I don’t have the time for that as I’m off in a minute.

I’ll look into it tomorrow.

Perhaps some more info on zem_rewrite. This is my scheme setup:

<code>

$uri_scheme[‘article_urltitle’] = ‘{section}/{category}/{url_title}’;
$uri_scheme[‘article_alt’] = ‘{section}/{article}/{url_title}’;
$uri_scheme[‘category’] = ‘{section}/{category}/’;
$uri_scheme[‘article’] = ‘{section}/{url_title}’;
$uri_scheme[‘section’] = ‘{section}/’;

</code>

Offline

#46 2005-03-19 20:40:28

sungodbiff
Archived Plugin Author
Registered: 2004-03-23
Posts: 57
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

Thanks Andreas, I’ll poke around with my setup and see if I can recreate any bugs.

- sgb

Offline

#47 2005-03-20 15:43:07

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

One more thing that occurred to me: I’m using conditional tags on this page to display an intro text (a form called “secIntroLesen”) when the section homepage is displayed.

With the latest version of your plugin, this intro text (and nothing else) is also displayed on what is supposed to be an article page.

Heres the chunk from my page template

<code>
<txp:if_article_list><txp:output_form form=“secIntroLesen” /></txp:if_article_list>

<txp:article form=“articleLesen” listform=“articleExcerpt” limit=“100” />
</code>

When on the section homepage, articles are being displayed correctly using the specified listform. When I change to an article page, nothing but the above-mentioned intro text shows up.

So it seems that TXP doesn’t realise it is on an article page.

As a sidenote: thanks for all your help so far. From tonight, I’ll be away for a week and a half and so I can’t test anything on my TXP install. I’ll keep watching this thread, though.

Offline

#48 2005-03-20 18:09:23

sungodbiff
Archived Plugin Author
Registered: 2004-03-23
Posts: 57
Website

Re: [plugin] [ORPHAN] sgb_url_handler - support all url variations at the same time

Andreas -

Hmm. I’ve got a similar setup on my site. I use the cnj_excerpt_logic to display excerpts whenever possible. Here the article/list output tag from my default page:

<pre><code><txp:article form=“default” limit=“5” /></code></pre>

My default article form looks like this:

<pre><code><txp:if_article_list> <txp:cnj_if_excerpt> <p><txp:excerpt /></p> </txp:cnj_if_excerpt> <txp:cnj_if_not_excerpt> <txp:body /> </txp:cnj_if_not_excerpt>
</txp:if_article_list>
<txp:if_individual_article> <txp:body />
</txp:if_individual_article>
</code></pre>

sgb_url_handler works by setting the section [‘s’], id [‘id’] and category [‘c’] to the super globals $_GET & $_POST. Have you tried rolling back to 0.1.3? (<a href=“http://mighthitgold.net/journal/txp/sgb_url_handler”>avaliable here</a>, see the downloads section).

- sgb

Last edited by sungodbiff (2005-03-20 18:16:01)

Offline

Board footer

Powered by FluxBB