Recent Topics

1 Feb 05, 2007 17:12    

I cannot get the categories listing to display on any of my blog pages outside the admin section. I've spent 2 days looking for a solution for this problem, including searching these forums, but to no avail. I'm posting here in hopes of finding a solution before I have to resort with a clean install and piecing together my existing blog from the database backup.

My blog was originally created under version 0.9.* using fantastico as provided by my webhost. The problem began when I used fantastico again to automate the update process from 0.9.* to 1.8.6. The update process worked find and the only thing I lost was my custom CSS file. However, since the upgrade, the categories listing will not show up on any of the pages. I've tried different skins and they all share the same problem. Therefore, I know that isn't the issue. I'm convinced that the problem is either with the Categories Plugin module which I've overwritten to rule out any corrupted files (didn't help) or with the database which may not have been properly altered to work from a 0.9.* environment to a 1.8.6 environment.

Any solutions anyone can offer will be great. My next step, assuming I can't find a fix, is a clean install of a new version, which will just be a hassle considering the database work it will require.

FYI: I'm next to clueless when it comes to databases. I know enough to break them.

My Blog: http://www.millercommamatt.com/journal

2 Feb 05, 2007 17:41

Is the categories plugin installed?
Is there are block like


		<?php
			// -------------------------- CALENDAR INCLUDED HERE -----------------------------
			// Call the Calendar plugin:
			$Plugins->call_by_code( 'evo_Calr', array(	// Params follow:
					'block_start'=>'',
					'block_end'=>'',
					'title'=>'',			// No title.
				) );
			// -------------------------------- END OF CALENDAR ----------------------------------
		?>

in your skin's _main.php file?

3 Feb 05, 2007 18:18

That following section of code reads as follows:


<?php
		// -------------------------- CATEGORIES INCLUDED HERE -----------------------------
		// Call the Categories plugin:
		$Plugins->call_by_code( 'evo_Cats', array(	// Add parameters below:
			) );
		// -------------------------------- END OF CATEGORIES ----------------------------------
	?>

The categories plugin is installed and enabled to the best of my knowledge. It appears under the plugin tab and isn't marked as disabled.

4 Feb 05, 2007 19:02

The plugin seems to get called, yes - there's the "Categories" title on your blog.

So there seems to be a problem/bug with the code of the categories plugin.

You will have to look into the SkinTag function in /plugins/_categories.plugin.php and add debug output, e.g. "pre_dump($blog);" or "pre_dump($tmp_disp);" in the appropriate places.
You should add a "if( $_SERVER['REMOTE_ADDR'] == 'YO.UR.IP.ADDR' ) { ... }" around it, so only you see this.

This may be "too much" for you, so you might want to send me a ftp account (E-Mail or PM) and I will look at it.

5 Feb 05, 2007 19:17

I'll make the changes and take a look as soon as I get the chance. Thanks for the continuing assistance. I'll post again as soon as I can get the changes made and can look at the bedug output.

6 Feb 05, 2007 19:32

I'm unsure of where to add the "pre_dump(...)" code?

Also, just for my own edification, where is the $params variable(array?) set?

7 Feb 05, 2007 22:22

You would add e.g. pre_dump() at the beginning of the SkinTag function - after the "global $blog" line. To know what $blog is. $params get passed to SkinTag. It's the array ("...") in the skin's $Plugins->call_by_code( 'evo_Cats', ... ) call.

Still: if you have problems debugging this yourself, please just create an FTP account for me and I'll take a look.

8 Feb 05, 2007 22:36

I added pre_dump($blog); to the end of the line with "global $blog" as shown below:


function SkinTag( $params )
	{
	 	global $cache_categories;
		/**
		 * @todo get rid of these globals:
		 */
		global $blog, $cat_modifier; pre_dump($blog);

My blog page now has: "int(1)" just above the categories section. Does this mean anything to anyone?

Should I add "pre_dump($blog);" elsewhere?

9 Feb 05, 2007 22:52

$blog == 1 now means that it goes into the second if-block ("else { // We want to display cats for all blogs")

From looking into this, I now guess that you have unchecked the "display in public bloglist" option of your "Blog 1". So it gets skipped. You can change this in the blog settings.

To be sure, add "pre_dump($curr_blog_ID);" in a line just before "// run recursively through the cats" (~ line 192). My guess is that there will nothing get outputted, because of the "continue" before this.

If this should not be the case, I'm sorry and you will have to find the reason yourself.

10 Feb 05, 2007 23:00

I now guess that you have unchecked the "display in public bloglist" option of your "Blog 1".

This was the problem. Thanks for all the help.


Form is loading...