• Resolved diggeridoo

    (@diggeridoo)


    Hi, I’ve found this plugin very helpful but I got this error message when activating the plugin:

    Warning: Missing argument 2 for sticky_the_title() in /var/www/vhost/mysite.com/home/html/essential/wp-content/plugins/wp-sticky/wp-sticky.php on line 199

    I have bbpress installed also, not sure if it has some relationship with this issue.

    Do you know how can I solve this warning?
    Thanks!

    https://www.ads-software.com/plugins/wp-sticky/

Viewing 7 replies - 1 through 7 (of 7 total)
  • I have the same error after upgrading to the latest version with WP4.

    I’ve amended the post that has the sticky and still no joy.

    Plugin Author Lester Chan

    (@gamerz)

    @diggeridoo, @mtgamberwesbitedesign: I suggest deactivating all plugins and switching to the default theme to see if it works.

    Because the_title (https://codex.www.ads-software.com/Plugin_API/Filter_Reference/the_title) has 2 arguments and hence the error doesn’t make sense.
    . I believe some plugin/theme conflict ins happening on your end.

    I realised that I didn’t need the plugin anyway since WordPress can make the post a sticky now (on the home page anyway) so I deleted the plugin.

    I’m using the plugin on other sites but I won’t upgrade until I have more time to look into it since those sites are live and very important to their business owners.

    Thread Starter diggeridoo

    (@diggeridoo)

    Yes, WP has this own sticky post feature but this plugin is still useful in some circumstances, i.e. when you have a weird conflict within a plugin/theme evolving wp native ‘sticky’ label (as in my case).
    This plugin adds a new category ‘Announce’ that helps to avoid that conflicts in a simple way and also allow to add a custom prefix to the highlighted post.

    Due the last version is giving this argument error, I’ve installed the former version and it seems to work fine.
    Maybe this might give a clue to Lester to figure out where the problem is..
    Anyway, although this plugin is deprecated, still is –as explained– useful and I encourage to the developer to keep it healthy if possible ??

    Thanks!

    Plugin Author Lester Chan

    (@gamerz)

    I think I might have found the problem

    Find On https://github.com/lesterchan/wp-sticky/blob/master/wp-sticky.php#L199: function sticky_the_title( $content, $id ) {
    Replace: function sticky_the_title( $content, $id = null ) {

    Let me know if it works and I will make the fix

    Thread Starter diggeridoo

    (@diggeridoo)

    Hi, I’ve tested this and the error message doesn’t appears anymore! ??
    It looks that change solves the problem!

    Thanks!

    Thread Starter diggeridoo

    (@diggeridoo)

    But before updating the plugin please check an issue I’m opening in another thread.
    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Warning: Missing argument 2 error :(’ is closed to new replies.