Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter newcom1

    (@newcom1)

    I got the plugin update, and it works fine, although still producing the notices. I poked around a bit, and the problem seems to be that I have custom post types checked on the CPA options page, but not the default post types post, page, and attachment. My thinking was that I didn’t need the plugin for archives for those post types. In generally, I’d rather not use a plugin where I don’t need it.

    To kill the notices in any case, I changed config.php, line 107 from
    $setting['base'],
    to
    (isset($setting['base']))?$setting['base']:null,
    I also changed custom-post-archives.php from
    }else if($post_type){
    to
    }else if(isset($post_type)){

    I figure if I study your plugin code carefully I can learn a lot about using WordPress and object-oriented PHP. Still hoping to do that at some point.

    Thread Starter newcom1

    (@newcom1)

    I may have corrupted some meta-data for the notes custom post types. In particular, in the admin edit view, notes show up sorted by title by default. I try to hook into manage_edit-notes_sortable_columns and change ‘orderby’ => ‘date’, but that doesn’t work. That seems a little screwy to me. And definitely nothing to do with your plugin.

    Also, in functions.php, I’ve got this:
    add_action( ‘thematic_archiveloop’, ‘otx_date_order’, 5 );

    function otx_date_order() {
    if ( !is_tax( ‘detail’ ) ) {
    global $query_string;
    query_posts( $query_string . “&order=ASC” );
    }
    }

    I’d guess that isn’t causing problems for your plugin, but thought you might like to know.

    Thread Starter newcom1

    (@newcom1)

    You’ve been very helpful, and your plugin is great. Ignoring a few PHP notices from it is no problem.

    Just for coding interest:

    I updated those archives via the settings page. When I enable the archives via the settings page and save, I get:
    “Undefined index: base…line 107” six times
    “Undefined index: overloaded… line 288” / line 310 (pair six time)

    When I go to the archives.php template page, I get:
    “Undefined index: base…line 107” three times

    When I click on the wp_get_archives() link, I get:
    “Undefined index: base…line 107” three times
    “Undefined variable: post_type… line 775” twice
    “Undefined index: [no key]…line 777” once

    I’ve got three custom post types defined.

    If this isn’t of interest to you, please don’t worry about it.

    Thread Starter newcom1

    (@newcom1)

    Here’s the link generated from the archives.php template page which does the wp_get_archives() call:
    http://localhost/wordpress/notes/2010/01/05/

    ‘notes’ is the name of the custom post type

    Thread Starter newcom1

    (@newcom1)

    Great work! Made that change, and bam, there’s the options page.

    I’m still getting the PHP Notices “Undefined variable: post_type, line 775 (twice), Undefined index: [no key listed], line 777”. I get these notice when I access my archive page. This is a page I created in a child theme using the Thematic Theme’s archive template. While you probably know, in any case the Thematic theme is here:
    http://wordpress.org/extend/themes/thematic

    Here’s the relevant section I changed/added to Thematic’s archives.php:

    the_content();
    // action hook for the 404 content
    // thematic_archives();
    echo 'refs archive: <br />';
    $ga_args = array( 'post_type' => 'refs', 'type' => 'daily', 'show_post_count' => true);
    wp_get_archives( $ga_args );
    echo '<br/> notes archive: <br />';
    $ga_args = array( 'post_type' => 'notes', 'type' => 'daily', 'show_post_count' => true);
    wp_get_archives( $ga_args );
    edit_post_link(__('Edit', 'thematic'),'<span class="edit-link">','</span>');

    Thread Starter newcom1

    (@newcom1)

    I added the else return; on l. 764 and now I’m getting three warnings: Undefined variable: post_type, line 775 (twice), Undefined index: [no key listed], line 777

    Yup, I’m calling wp_get_archives. I still don’t see the options page. Maybe somehow I’m overlooking it. Where exactly should it be?

    By the way, I’m also running the Custom Post Type UI plugin:
    http://wordpress.org/extend/plugins/custom-post-type-ui/

    It creates a “Custom Post Types” top-level options page. Could there be some name space collision with that plugin?

    Thread Starter newcom1

    (@newcom1)

    Thanks for sharing your work on this plugin. I still got it installed, and it’s generating my custom-post-type archives quite handily.

    I’ve got the function get_bases on ll. 786-795:

    public function get_bases()
    	{
    		$bases = array();
    print_r($this->_rewrites);
    		foreach($this->_rewrites as $key => $rewrite){
    			if($rewrite["base"] == "") continue;
    			$bases[] = $rewrite["base"];
    		}
    		return $bases;
    	}

    When I press save on the permalinks page, the print_r generates:
    Array ( [post] => Array ( [externally_set] => [in_default] => 1 [in_rss] => 1 [base] => ) [page] => Array ( [externally_set] => [in_default] => [in_rss] => [base] => ) [attachment] => Array ( [externally_set] => [in_default] => [in_rss] => [base] => ) [notes] => Array ( [externally_set] => [in_default] => [in_rss] => [base] => notes ) [refs] => Array ( [externally_set] => [in_default] => [in_rss] => [base] => refs ) [headings] => Array ( [externally_set] => [in_default] => [in_rss] => [base] => headings ) )

    For additional reference, here’s my code line 766 that’s generating the error I mentioned above:
    if(!$path) return;
    That’s in private function set_queried_object($query)

    Thread Starter newcom1

    (@newcom1)

    I’m going to try installing WP version 3.0.4, i.e. downgrade to the last general-use release. From what I understand, you need to be careful moving to older WP versions because installing a newer version may make changes to the WP database. Always back up your current database (plus export your content via the WP export for extra protection) before changing anything.

    Here’s some forum discussion on downgrading.

    Having a graceful way to get off the development update track would be nice. Especially when the WP news that appears on everyone’s admin panel encourages users to be beta testers.

Viewing 8 replies - 1 through 8 (of 8 total)