You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason is that the Slugs module assumes that the passed variable $post is a WP_Post object.
Of course, a page displaying metaboxes isn't necessarily a WP_Post.
A workaround would be to exit the qts_draw_meta_box() function early if the passed variable isn't a WP_Post.
For example, by adding at line 124: if( ! ( is_object( $post ) && ! empty( $post->ID ) ) ) { return; }
A better solution would be to not display the "Slugs per language" metabox at all on irrelevant pages (that is, on pages that are not WP_Post).
The text was updated successfully, but these errors were encountered:
Hello,
The Slugs module causes a PHP error on any admin pages using metaboxes if they are not a WP_Post:
qtranslate-xt\modules\slugs\admin\slugs-admin.php line 130
The reason is that the Slugs module assumes that the passed variable $post is a WP_Post object.
Of course, a page displaying metaboxes isn't necessarily a WP_Post.
A workaround would be to exit the qts_draw_meta_box() function early if the passed variable isn't a WP_Post.
For example, by adding at line 124:
if( ! ( is_object( $post ) && ! empty( $post->ID ) ) ) { return; }
A better solution would be to not display the "Slugs per language" metabox at all on irrelevant pages (that is, on pages that are not WP_Post).
The text was updated successfully, but these errors were encountered: