Can you outline your theme structure, and show me the code you have in functions.php and priorities.php
Hey Spencer,
Thanks for getting back to me.
Here’s my child theme structure:
/childtheme/
/images/
/inc/modules/priorities.php
functions.php
style.css
functions.php:
<?php
function quality_child_test() {
add_theme_support( 'ticket-priority' );
require_if_theme_supports( 'ticket-priority', locate_core_file( 'inc/modules/priorities.php' ) );
}
?>
priorities.php:
<?php
/**
* @package Quality_Control
* @subpackage Ticket Taxonomies
* @since Quality Control 0.2
*/
if ( ! class_exists( 'quality_ticket_priority' ) ) :
/**
* Create the status taxonomy. Nothing custom here.
*
* @since Quality Control 0.2
*/
class quality_ticket_priority extends quality_create_taxonomy
{
/**
* Just create the name, slug, and labels. The rest is
* done automagically.
*
* @since Quality Control 0.2
*/
function quality_ticket_priority() {
parent::quality_create_taxonomy(
'ticket_priority',
'priority',
array(
'name' => __( 'Priorities', 'quality' ),
'singular_name' => __( 'Priority', 'quality' ),
'search_items' => __( 'Search Priorities', 'quality' ),
'popular_items' => __( 'Popular Priorities', 'quality' ),
'all_items' => __( 'All Priorities', 'quality' ),
'update_item' => __( 'Update Priority', 'quality' ),
'add_new_item' => __( 'Add New Priority', 'quality' ),
'new_item_name' => __( 'New Priority Name', 'quality' ),
'edit_item' => __( 'Edit Priority', 'quality' )
)
);
$this->actions();
}
}
endif;
$ticket_priority = new quality_ticket_priority;
?>
Anything else I can get you to help clarify?
Thanks,
Mike
You’re sure you’ve properly setup/activated the child theme? All of that code looks fine.
Thats the only code you have in functions.php?
Spencer,
Yes, I de-activated & re-activated the child theme.
And yes, that’s the only code in functions.php…
Any recommended debug plugin I can use to see if the module is being loaded?
You can set WP_DEBUG to true in your wp-config.php to see if its giving an errors.
With WP_DEBUG set to true, this is what we have printing in place of the ticket content:
# Notice: Undefined variable: post in /HOME-DIRECTORY/public_html/bugs/wp-content/themes/quality-control/inc/classes/class-create-taxonomy.php on line 148
Notice: Trying to get property of non-object in /HOME-DIRECTORY/public_html/bugs/wp-content/themes/quality-control/inc/classes/class-create-taxonomy.php on line 148
Notice: Undefined variable: post in /HOME-DIRECTORY/public_html/bugs/wp-content/themes/quality-control/inc/classes/class-create-taxonomy.php on line 149
Notice: Trying to get property of non-object in /HOME-DIRECTORY/public_html/bugs/wp-content/themes/quality-control/inc/classes/class-create-taxonomy.php on line 149
0.3
# Tags
Notice: Undefined variable: post in /HOME-DIRECTORY/public_html/bugs/wp-content/themes/quality-control/inc/classes/class-create-taxonomy.php on line 148
Notice: Trying to get property of non-object in /HOME-DIRECTORY/public_html/bugs/wp-content/themes/quality-control/inc/classes/class-create-taxonomy.php on line 148
Notice: Undefined variable: post in /HOME-DIRECTORY/public_html/bugs/wp-content/themes/quality-control/inc/classes/class-create-taxonomy.php on line 149
Notice: Trying to get property of non-object in /HOME-DIRECTORY/public_html/bugs/wp-content/themes/quality-control/inc/classes/class-create-taxonomy.php on line 149
iva
# Category
Notice: Undefined variable: post in /HOME-DIRECTORY/public_html/bugs/wp-content/themes/quality-control/inc/classes/class-create-taxonomy.php on line 148
Notice: Trying to get property of non-object in /HOME-DIRECTORY/public_html/bugs/wp-content/themes/quality-control/inc/classes/class-create-taxonomy.php on line 148
Notice: Undefined variable: post in /HOME-DIRECTORY/public_html/bugs/wp-content/themes/quality-control/inc/classes/class-create-taxonomy.php on line 149
Notice: Trying to get property of non-object in /HOME-DIRECTORY/public_html/bugs/wp-content/themes/quality-control/inc/classes/class-create-taxonomy.php on line 149
Functionality
Anything else? That error is already fixed in an unreleased version. I don’t think it should be stopping the taxonomy from being created though. Speaking of, do you see Priority in the WP backend?
Hey Spencer,
Good to hear that that particular error has been fixed.
Rest assured, if the taxonomy had been created, and present in the admin, I would not have opened this ticket.
I just have the standard taxonomy options:
TICKETS
Add New
Categories
Tags
States
Milestones
Any other debugging I might be able to do?
Thanks,
Mike
Spencer
I think I’m going to export all tickets (WP – XML format), delete the existing WP installation, reinstall WP, re-download & install your theme, and then add and enable the child theme.
Then I’ll try to reimport back in the existing tickets.
Any other suggested protocol?
MG
Seems pretty standard. Go for it!
Spence –
A few kinks here.
After doing the export, I then deleted my install of WordPress.
After re-installing, I then had issues trying to re-download your original theme, so I re-uploaded my backup of your theme.
Once I re-imported the XML export, I’m getting this error on the “Recent Activities” tab:
Catchable fatal error: Object of class WP_Error could not be converted to string in /HOMOE-DIRECTORY/public_html/bugs/wp-content/themes/quality-control/inc/templates/loop.php on line 37.
Individual tickets throw this error:
Catchable fatal error: Object of class WP_Error could not be converted to string in /HOME-DIRECTORY/public_html/bugs/wp-content/themes/quality-control/single.php on line 41
I’m happy for you that you’ve been able to sell the theme – it’s certainly excellent work, and you deserve to be fairly compensated for your effort.
Any possibility of a fix, or am I FUBAR’d?
Thanks,
Mike
Spence,
Got it back up & running myself – had to delete most of the old tickets, and re-attribute taxonomies to the open ones to get things to work again.
MG