Page 1 of 1

The new categorytemplates plugin

Posted: Sun Jul 31, 2005 9:41 pm
by Col. Kurtz
After install (with ne latest nightly built) it screws up all templates. See here.

Re: The new categorytemplates plugin

Posted: Sun Jul 31, 2005 10:21 pm
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

Re: The new categorytemplates plugin

Posted: Sun Jul 31, 2005 10:24 pm
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

Posted: Sun Jul 31, 2005 10:27 pm
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.

Re: The new categorytemplates plugin

Posted: Sun Jul 31, 2005 10:39 pm
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.

Posted: Sun Jul 31, 2005 10:40 pm
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

Posted: Sun Jul 31, 2005 10:48 pm
by Col. Kurtz
Ah ok that did it! Hey my first found bug!