The new categorytemplates plugin

Found a bug? Tell us!!
Post Reply
Col. Kurtz
Regular
Posts: 450
Joined: Thu May 26, 2005 10:43 am
Location: Bonn, Germany
Contact:

The new categorytemplates plugin

Post by Col. Kurtz »

After install (with ne latest nightly built) it screws up all templates. See here.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: The new categorytemplates plugin

Post by garvinhicking »

This is because you are using the new category-plugin and your CSS URL doesn't work:

http://www.die-partei-bonn.de/s9y/plugi ... te_default

Have you enabled mod_rewrite URL rewriting without having mod_rewrite available?

Because usually the URL should look like this:

http://www.die-partei-bonn.de/s9y/index ... te_default

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: The new categorytemplates plugin

Post by garvinhicking »

I just checked the code of the plugin:

Code: Select all

                    $serendipity['smarty_vars']['head_link_stylesheet'] = serendipity_rewriteURL('plugin/categorytemplate_' . $cid, 'baseURL', true);
This should always return a "index.php?/..." URL because of the last parameter. I don't see how it can happen that you get the URL like in your template.... :(

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Col. Kurtz
Regular
Posts: 450
Joined: Thu May 26, 2005 10:43 am
Location: Bonn, Germany
Contact:

Post by Col. Kurtz »

When I uninstall the plugin everything works fine. I just did. I didnt change anything else. And sorry, I dont have anything to say about mod_rewrite. I use the same configuration that works fine elsewhere.
Col. Kurtz
Regular
Posts: 450
Joined: Thu May 26, 2005 10:43 am
Location: Bonn, Germany
Contact:

Re: The new categorytemplates plugin

Post by Col. Kurtz »

garvinhicking wrote:This is because you are using the new category-plugin and your CSS URL doesn't work:

http://www.die-partei-bonn.de/s9y/plugi ... te_default

Have you enabled mod_rewrite URL rewriting without having mod_rewrite available?

Because usually the URL should look like this:

http://www.die-partei-bonn.de/s9y/index ... te_default
garvinhicking wrote: I just checked the code of the plugin:

Code:

$serendipity['smarty_vars']['head_link_stylesheet'] = serendipity_rewriteURL('plugin/categorytemplate_' . $cid, 'baseURL', true);


This should always return a "index.php?/..." URL because of the last parameter. I don't see how it can happen that you get the URL like in your template....
I admit I dont understand what you are trying to tell me. Stupid me.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Can you open your include/functions_permalink.inc.php file and check the serendipity_rewriteURL function.

It should look like this:

Code: Select all

function serendipity_rewriteURL($path, $key='baseURL', $forceNone = false) {
    global $serendipity;
    return $serendipity[$key] . (($serendipity['rewrite'] == 'none' && !$forceNone) || ($serendipity['rewrite'] != 'none' && $forceNone) ? $serendipity['indexFile'] . '?/' : '') . $path;
}
Now please remove that "&& !$forceNone" part in the first query, so that it looks like this:

Code: Select all

function serendipity_rewriteURL($path, $key='baseURL', $forceNone = false) {
    global $serendipity;
    return $serendipity[$key] . ($serendipity['rewrite'] == 'none'  || ($serendipity['rewrite'] != 'none' && $forceNone) ? $serendipity['indexFile'] . '?/' : '') . $path;
}
I also committed this to the snapshot now.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Col. Kurtz
Regular
Posts: 450
Joined: Thu May 26, 2005 10:43 am
Location: Bonn, Germany
Contact:

Post by Col. Kurtz »

Ah ok that did it! Hey my first found bug!
Post Reply