WordPress.org

Support

Support » Plugins and Hacks » All in One SEO Pack » [Resolved] Undefined variable: description

[Resolved] Undefined variable: description

  • In file: aioseop_class.php
    Error: Notice: Undefined variable: description in /Users/…/wp-content/plugins/all-in-one-seo-pack/aioseop_class.php on line 1027

    Line: 1027: $description = apply_filters( ‘aioseop_description’, $description );

    Change to the following to fix:

    if ( isset($description) ) $description = apply_filters( ‘aioseop_description’, $description );

    Seen when accessing WooCommerce /shop page.

    http://wordpress.org/extend/plugins/all-in-one-seo-pack/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Awesome! Was just looking for this. Thanks!

    Plugin Contributor Peter Baylies

    @pbaylies

    What I would suggest doing, and what will be the fix in the next version, is to set $description to the empty string much earlier in the wp_head() function there; that’d look like this:

    $description = '';

    The issue with your fix is, it prevents the aioseop_description filter from running when there isn’t a description present.

    Thanks for weighing in on this!

    I’m getting the same warning. but it only happens in my custom post type archive pages.

    adding $description = ”; right above wp_head() didn’t work. any ideas?

    i misunderstood. I added $description = ”; in header.php – right above wp_head().

    adding it in all-in-one-seo-pack\aioseop_class.php wp_head() did the trick. per @peter Baylies – the fix will be in the next plugin release i hope.

    Plugin Contributor Peter Baylies

    @pbaylies

    michael,

    Glad you fixed it! Yes, as I said, this fix will be in the next release.

    There seems to have been several updates since this issue was resolved, still I get the same error.

    My message reads:
    Notice: Undefined variable: author in /storage/content/85/106985/bryntemedia.se/public_html/wp-content/plugins/all-in-one-seo-pack/aioseop_class.php on line 1378

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] Undefined variable: description’ is closed to new replies.
Skip to toolbar