[Resolved] [Plugin: Similar Posts] Standard Theme Error: Missing argument 2
This has been discussed a couple of times, but I thought I should put it on this board to for other Similar Posts users.
When ‘Similar Posts’ users start using Standard Theme, the following error is displayed:
Warning: Missing argument 2 for standard_process_link_post_format_title()
The error also shows up on the ‘Most Commented Widget’ plugin, but whereas the error in that plugin was fixed by changing
$post_title = apply_filters( 'the_title', $post->post_title, $this); to this: $post_title = apply_filters( 'the_title', $post->post_title, $this->id );
I’m having a hard time figuring out what to change on Similar Posts.
I wrote an email to the plugin developer, but it’s unlikely that he will respond since he according to the plugin’s WP page, the plugin hasn’t been updated in over two years.
If anyone is willing to help out, a lot of people would appreciate it.
And before anyone says “it’s a problem with your theme.” It very well may be since the error doesn’t occur with the Twenty Ten and Twenty Eleven themes…
We have had a few users report issue with this function, so we thought we would create a FAQ explaining what is going on here.
This usually emanates from activating a new plugin where the new plugin is is adding a filter on the_title, like the “standard_process_link_post_format_title” function within Standard is too.
The error here is that the plugin is not passing in the second argument, the “id”, to the “the_title” filter. WordPress states, according to the Codex entry, that the second parameter, again the “id”, must be passed in as an argument and Standard enforces that.
If you are experiencing issues with this error / warning, you will need to contact the plugin developers and ask them to fix the issue in their plugin to properly include the second argument.
Of course we could “patch it” so that it “works”, but we have no plans to do that. We are not trying to be mean, but we are asking developers to code to a higher standard.
Pin-pointing who is at fault, is pointless. But unless someone comes up with a ‘Similar Posts’ plugin with as good results as this one, we should get together to fix this.
- The topic ‘[Resolved] [Plugin: Similar Posts] Standard Theme Error: Missing argument 2’ is closed to new replies.