• Hi, we used the code provided in this support thread to create seasons: https://www.ads-software.com/support/topic/create-seasons/ – it worked until the last update of your plugin 3.4.0?. Now we get an error in our admin-ajax.php file (returning 0)

    This is the error message we get:

    Ein Fehler vom Typ E_ERROR wurde in der Zeile 33 der Datei /home/helveti3/public_html/wp/wp-content/themes/helvetiarockt/inc/taxonomies/season.php verursacht. Fehlermeldung: Uncaught Error: Call to a member function get_podcast_tax_capabilities() on null in /home/helveti3/public_html/wp/wp-content/themes/helvetiarockt/inc/taxonomies/season.php:33
    Stack trace: 0 /home/helveti3/public_html/wp/wp-includes/class-wp-hook.php(324): ssp_register_seasons(”) 1 /home/helveti3/public_html/wp/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) 2 /home/helveti3/public_html/wp/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 3 /home/helveti3/public_html/wp/wp-settings.php(695): do_action(‘init’) 4 /home/helveti3/public_html/wp/wp-config.php(84): require_once(‘/home/helveti3/…’) 5 /home/helveti3/public_html/wp/wp-load.php(50): require_once(‘/home/helveti3/…’) 6 /home/helveti3/public_html/wp/wp-admin/admin-ajax.php(22): require_once(‘/home/helveti3/…’) 7 {main}

    thrown

    The line 33 mentioned in the error message is:
    'capabilities' => ssp_app()->get_service( 'roles_handler' )->get_podcast_tax_capabilities(),

    Can you help us to update the code so it works with the newest plugin version?

    Thanks!

    Regards, Nina

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Serhiy Zakharchenko

    (@zahardoc)

    Hi @ninaregli,

    Sorry to hear you encontered this issue. Could you please confirm that rolling back to the previous plugin version fixes the issue? You can try doing it with WP Rollback plugin.

    Best regards,
    Serhiy.

    Thread Starter ninaregli

    (@ninaregli)

    Hi @zahardoc,

    Thanks for your reply. I tried to rollback, I tried to update unfortunately we still get daily the same error message than I sent you before. Is this something you could have a look again?

    As this code is referring to plugin code I don’t really know how to debug it otherwise.

    The code is

    'capabilities' => ssp_app()->get_service( 'roles_handler' )->get_podcast_tax_capabilities(),

    And the error message is Uncaught Error: Call to a member function get_podcast_tax_capabilities() on null in /home/helveti3/public_html/wp/wp-content/themes/helvetiarockt/inc/taxonomies/season.php:33

    Thanks again for your help, its appreciated.

    Nina

    Plugin Author Serhiy Zakharchenko

    (@zahardoc)

    Hi @ninaregli,

    It looks like the problem is not in the plugin itself, but in the theme you use (helvetiarockt). Did you try checking the season.php file? Did you try temporarily switching your theme?

    Thread Starter ninaregli

    (@ninaregli)

    Thanks @zahardoc for your reply.

    The season file only contains the code which you provided here https://www.ads-software.com/support/topic/create-seasons/


    <?php

    add_action( 'init', 'ssp_register_seasons', 12 );

    function ssp_register_seasons() {

    $season_labels = array(

    'name' => __( 'Seasons', 'seriously-simple-podcasting' ),

    'singular_name' => __( 'Season', 'seriously-simple-podcasting' ),

    'search_items' => __( 'Search Seasons', 'seriously-simple-podcasting' ),

    'all_items' => __( 'All Seasons', 'seriously-simple-podcasting' ),

    'parent_item' => __( 'Parent Season', 'seriously-simple-podcasting' ),

    'parent_item_colon' => __( 'Parent Season:', 'seriously-simple-podcasting' ),

    'edit_item' => __( 'Edit Season', 'seriously-simple-podcasting' ),

    'update_item' => __( 'Update Season', 'seriously-simple-podcasting' ),

    'add_new_item' => __( 'Add New Season', 'seriously-simple-podcasting' ),

    'new_item_name' => __( 'New Season Name', 'seriously-simple-podcasting' ),

    'menu_name' => __( 'All Seasons', 'seriously-simple-podcasting' ),

    'view_item' => __( 'View Season', 'seriously-simple-podcasting' ),

    'popular_items' => __( 'Popular Seasons', 'seriously-simple-podcasting' ),

    'separate_items_with_commas' => __( 'Separate podcasts with commas', 'seriously-simple-podcasting' ),

    'add_or_remove_items' => __( 'Add or remove Seasons', 'seriously-simple-podcasting' ),

    'choose_from_most_used' => __( 'Choose from the most used Seasons', 'seriously-simple-podcasting' ),

    'not_found' => __( 'No Seasons Found', 'seriously-simple-podcasting' ),

    'items_list_navigation' => __( 'Seasons list navigation', 'seriously-simple-podcasting' ),

    'items_list' => __( 'Seasons list', 'seriously-simple-podcasting' ),

    );

    $season_args = array(

    'public' => true,

    'hierarchical' => true,

    'labels' => $season_labels,

    'show_in_rest' => true,

    'show_admin_column' => true,

    'capabilities' => ssp_app()->get_service( 'roles_handler' )->get_podcast_tax_capabilities(),

    );

    register_taxonomy( 'season', ssp_post_types(), $season_args );

    }

    There is nothing else on this file. Any idea what is wrong with the code?

    Plugin Author Serhiy Zakharchenko

    (@zahardoc)

    Hi @ninaregli,

    You can try changing the 'capabilities' => ssp_app()->get_service( 'roles_handler' )->get_podcast_tax_capabilities() part of the code to the following:

    'capabilities' => array(
    'manage_terms' => 'manage_podcast_tax',
    'edit_terms' => 'manage_podcast_tax',
    'delete_terms' => 'manage_podcast_tax',
    'assign_terms' => 'edit_podcast',
    ),

    Hope this helps,
    Serhiy.

    Thread Starter ninaregli

    (@ninaregli)

    Thanks @zahardoc it looks liket that will hopefully fix it, thanks so much for your excellent support!

    Kind regards

    Nina

    Plugin Author Serhiy Zakharchenko

    (@zahardoc)

    @ninaregli

    Great, please let me know if that works as expected.

    Also, if you like our plugin and our support, we would greatly appreciate it if you could leave us review. Your feedback helps us continue to grow and also helps other users to discover SSP.

    Best regards,
    Serhiy.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.