• Resolved Mikko Siikaniemi

    (@mikrogramma)


    Hi there! Thanks for the great plugin 👍

    We found a compatibility issue with Permalink Manager Lite version 2.4.4.1 and later versus older versions of The SEO Framework, namely versions prior to 5.0.0.

    In v2.4.4.1 of Permalink Manager Lite, a check was introduced for existence of the function tsf() (in includes\core\permalink-manager-helper-functions.php line 61). The function tsf() is also defined in earlier versions of The SEO Framework, but does not implement the data() function to return the needed things.

    We’re running version 4.2.5 of the SEO Framework, and versions 2.4.4.1 and later of Permalink Manager Lite do not work, as those expect the tsf() to implement data(). This crashes the block editor for some of our post types.

    Warning: tsf()->data() is not accessible in tsf(). In /data/wordpress/htdocs/wp-content/plugins/permalink-manager-2.4.4.1/includes/core/permalink-manager-helper-functions.php on line 63
    in /data/wordpress/htdocs/wp-content/plugins/autodescription-4.2.5/inc/classes/internal/debug.class.php on line 258

    Fatal error: Uncaught Error: Call to a member function plugin() on null in /data/wordpress/htdocs/wp-content/plugins/permalink-manager-2.4.4.1/includes/core/permalink-manager-helper-functions.php:62 Stack trace: #0 /data/wordpress/htdocs/wp-content/plugins/permalink-manager-2.4.4.1/includes/core/permalink-manager-uri-functions-post.php(331): Permalink_Manager_Helper_Functions::get_primary_term(4745, 'product-cat', false) #1 /data/wordpress/htdocs/wp-content/plugins/permalink-manager-2.4.4.1/includes/views/permalink-manager-ui-elements.php(650): Permalink_Manager_URI_Functions_Post::get_default_post_uri(Object(WP_Post)) #2 /data/wordpress/htdocs/wp-content/plugins/permalink-manager-2.4.4.1/includes/core/permalink-manager-gutenberg.php(62): Permalink_Manager_UI_Elements::display_uri_box(Object(WP_Post), true) #3 /data/wordpress/htdocs/wordpress/wp-admin/includes/template.php(1395): Permalink_Manager_Gutenberg->get_uri_editor(Object(WP_Post), Array) #4 /data/wordpress/htdocs/wordpress/wp-admin/includes/post.php(2296): do_met in /data/wordpress/htdocs/wp-content/plugins/permalink-manager-2.4.4.1/includes/core/permalink-manager-helper-functions.php on line 62

    Any help to fix this issue would be greatly appreciated. Upgrading The SEO Framework to v5.0.0+ makes it work, but I’m afraid we cannot do that now.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Maciej Bis

    (@mbis)

    Hi Mikko,

    To address this issue and prevent the fatal error with older versions of TSF, in the next version of plugin I will add more strict check in includes\core\permalink-manager-helper-functions.php file:

    // B. The SEO Framework
    else if ( function_exists( 'the_seo_framework' ) || function_exists( 'tsf' ) ) {
    if ( class_exists( 'The_SEO_Framework\Data\Plugin\Post' ) ) {
    $primary_term = The_SEO_Framework\Data\Plugin\Post::get_primary_term( $post_id, $taxonomy );
    } elseif ( function_exists( 'the_seo_framework' ) && method_exists( the_seo_framework(), 'get_primary_term' ) ) {
    $primary_term = the_seo_framework()->get_primary_term( $post_id, $taxonomy );
    }
    }
    • This reply was modified 3 weeks, 4 days ago by Maciej Bis. Reason: Tab indent fix
    • This reply was modified 3 weeks, 4 days ago by Maciej Bis. Reason: Better solution
    Thread Starter Mikko Siikaniemi

    (@mikrogramma)

    Thanks Maciej for your quick reply and solution. Looking forward for the next version.

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