Properties/Templates of Categories Plugin not working

Creating and modifying plugins.
ILF
Regular
Posts: 15
Joined: Fri Jul 11, 2008 12:22 am
Contact:

Post by ILF »

Hi, so it was css not loaded, I suspected that something was not loaded but I thought it was javascript, anyway.

I wonder, however, am I the only one with such a problem, what I mean is could this be because of some combo of plugins or probably because I use postgre, cause no one else reported problems.
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Well, I'm glad you found it! Was it actually caused by the template plugin? What CSS was not getting loaded, and how did you fix it (or do you need me to fix it)?
Judebert
---
Website | Wishlist | PayPal
ILF
Regular
Posts: 15
Joined: Fri Jul 11, 2008 12:22 am
Contact:

Post by ILF »

Hi Judebert,

no, I haven't found it yet, but I'm still looking for it. I was just wondering in my previous post :o
ILF
Regular
Posts: 15
Joined: Fri Jul 11, 2008 12:22 am
Contact:

Post by ILF »

Hi Judebert,

I finally found the problem. It is in my current install. Here is the problem, and it is indeed css issue.


I took a closer look at all the css that are loaded in the side, with and without the plugin.

My approach was not the best of all, but hey, I'm a sysadmin, I like quick and dirty solutions ;), so I used diff:

1.php is the generated source with the plugin installed
2.php is the generated source with the plugin removed

Code: Select all

ilf@lightening:/home/ilf$ diff --normal 1.php 2.php 
23c23
<         <link rel="stylesheet" type="text/css" href="http://www.ilfsworld.com/index.php?/plugin/categorytemplate_default" />
---
>         <link rel="stylesheet" type="text/css" href="http://www.ilfsworld.com/serendipity.css" />
1183,1184c1183
<                   <div class="serendipitySideBarContent"><!-- fetching scrobbler feed -->
< <!-- cache written -->
---
>                   <div class="serendipitySideBarContent"><!-- cache read -->
1261d1259
< 
The difference besides the cache part is in the css, and here is what I have found:

without the plugin the source inserts the following css:

Code: Select all

http://www.ilfsworld.com/serendipity.css
which is totally valid, however remember that my test machine has different domain name, which really doesn't matter as long as the file we are looking at the original domain exist, however, the second one looks like this:

Code: Select all

http://www.ilfsworld.com/index.php?/plugin/categorytemplate_default
which is totally wrong, having in mind that on my production machine (the one that gets included in the css field) I don't have the plugin installed, so the request can not be executed, and I get a broken outlook of the page.

In other words, the problem is not in the plugin but in my test platform.

And again, here comes my other question. What sets the path to the css files? In other words how does s9y gets the hostname variable set? As I already mentioned in my pm to Judebert, my test environment is a rsync from the production, with the exception of the serendipity_config_local.inc.php which points to my test db. I did a simple recursive grep in the source tree and there was not a single mention of www.ilfsworld.com, so in the admin interface, which variable should I change so that it points to my test domain instead of the production one.

I hope I'm clear enough, because I tend to sometimes blabber a lot unintentionally :D.


Edit:

Don't answer the question. I'm just plain stupid and tired, I found it:

Under the administration/configuration:
URL to blog
Base URL to your serendipity installation
quite obvious :oops:
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

OMG. What a mess.

I like your sysadmin approach! I'm going to start using it on my home network.

Congratulations on finding this thorny problem. I suppose you could also have installed the plugin on the production machine, but not marked any categories for custom templates; of course, that would have at least partially defeated the purpose of having a testing machine.
Judebert
---
Website | Wishlist | PayPal
Post Reply