Error activating "add seo meta box" for tags

Hallo,

I get the following error message activating “add meta box” for tags:

Fatal error: Uncaught TypeError: filter_var(): Argument #3 ($options) must be of type array|int, string given in /homepages/23/d278325892/htdocs/sozialrecht/wp-content/plugins/classicpress-seo/includes/admin/class-param.php:56 Stack trace: #0 /homepages/23/d278325892/htdocs/sozialrecht/wp-content/plugins/classicpress-seo/includes/admin/class-param.php(56): filter_var(‘375’, 257, ‘’) #1 /homepages/23/d278325892/htdocs/sozialrecht/wp-content/plugins/classicpress-seo/includes/admin/class-metabox.php(104): Classic_SEO\Admin\Param::request(‘tag_ID’, 0, 257) #2 /homepages/23/d278325892/htdocs/sozialrecht/wp-includes/class-wp-hook.php(287): Classic_SEO\Admin\Metabox->enqueue() #3 /homepages/23/d278325892/htdocs/sozialrecht/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(‘’, Array) #4 /homepages/23/d278325892/htdocs/sozialrecht/wp-includes/plugin.php(524): WP_Hook->do_action(Array) #5 /homepages/23/d278325892/htdocs/sozialrecht/wp-content/plugins/classicpress-seo/includes/traits/class-hooker.php(89): do_action_ref_array(‘cpseo/admin/enq…’, Array) #6 /homepages/23/d278325892/htdocs/sozialrecht/wp-content/plugins/classicpress-seo/includes/admin/class-assets.php(107): Classic_SEO\Admin\Assets->do_action(‘admin/enqueue_s…’) #7 /homepages/23/d278325892/htdocs/sozialrecht/wp-includes/class-wp-hook.php(287): Classic_SEO\Admin\Assets->enqueue(‘term.php’) #8 /homepages/23/d278325892/htdocs/sozialrecht/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #9 /homepages/23/d278325892/htdocs/sozialrecht/wp-includes/plugin.php(458): WP_Hook->do_action(Array) #10 /homepages/23/d278325892/htdocs/sozialrecht/wp-admin/admin-header.php(99): do_action(‘admin_enqueue_s…’, ‘term.php’) #11 /homepages/23/d278325892/htdocs/sozialrecht/wp-admin/term.php(68): require_once(‘/homepages/23/d…’) #12 {main} thrown in /homepages/23/d278325892/htdocs/sozialrecht/wp-content/plugins/classicpress-seo/includes/admin/class-param.php on line 56

I would like to activate it, because I added content into meta box. Now I am not able to edit the meta box.

Thanks for help!

Sönke

p.s.: Probably the theme-seo-settings from genesis framework prevent the classic-seo-settings …

Hi, does the error happen when you save the option to activate the meta box for tags? Or on the tags page itself, where meta box should show up? Also, what PHP version are you using?

Solution found thanks to @viktor and @MattyRob during the 1.5.1 release.

go to wp-content/plugins/classicpress-seo/includes/admin/class-param.php

locate line 56 that reads:

`public static function request( $id, $default = false, $filter = FILTER_DEFAULT, $flag = '' ) {`
`		return isset( $_REQUEST[ $id ] ) ? filter_var( $_REQUEST[ $id ], $filter, $flag ) : $default;`
`	}`

and change it to

`public static function request( $id, $default = false, $filter = FILTER_DEFAULT, $flag = 0 ) {`
`		return isset( $_REQUEST[ $id ] ) ? filter_var( $_REQUEST[ $id ], $filter, $flag ) : $default;`
`	}`

That way the plugin works.

I think that a new version of it is going to be released to correct the bug so if you are not confident in changing the file you can wait for it and update the plugin normally.

We have released v2.1.1 to correct the issue. Please update. Thank you for reporting the issue.

You should see an update shortly, I’ve just pushed it. 2.1.1 will solve this.

:+1: :+1: :+1:
:+1: :+1: :+1:

wow … fast solution!

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.