• Resolved bigalownz

    (@bigalownz)


    when some one does a search on my wordpress site they get this

    Notice: Undefined variable: post_type in /var/www/wp-content/plugins/all-in-one-seo-pack/aioseop_class.php on line 3983

    any idea

    thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author arnaudbroes

    (@arnaudbroes)

    @bigalownz thank you for reporting this. We are aware of this notice and are working on a fix. This is only a notice and can therefore safely be ignored. In order to make sure that this notice isn’t displayed on the front-end of your website, please set “WP_DEBUG” in your wp-config.php file (root directory of your WordPress installation) to false.

    Hi Arnaud,

    I have the same error present on my sites, which I reported also
    I have made a fix for this issue, and it seems to fix the problem
    Within the file /www/wp-content/plugins/all-in-one-seo-pack/aioseop_class.php
    I added the following lines
    function get_robots_meta() {
    global $aioseop_options;
    $opts = $this->meta_opts;
    $page = $this->get_page_number();
    $robots_meta = $tax_noindex = ”;
    ————————————
    //PSS populate post type
    $post = $this->get_queried_object();
    $post_type = ”;
    if ( ! empty( $post ) && ! empty( $post->post_type ) ) {
    $post_type = $post->post_type;
    }
    ————————————-
    Now the error is no longer present.
    I logged what is presented here
    [30-Jun-2019 19:47:38 UTC] post type: page
    [30-Jun-2019 19:47:38 UTC] Pagina :
    [30-Jun-2019 19:49:44 UTC] post type: attachment
    [30-Jun-2019 19:49:44 UTC] Pagina :
    [30-Jun-2019 20:17:38 UTC] post type: page
    [30-Jun-2019 20:17:38 UTC] Pagina :

    In case that it is a page, you do not get a page number
    In case that it is a post, you do get a pagenumber
    I have not seen an empty post_type after this fix
    Regards,
    Peter

    Plugin Author arnaudbroes

    (@arnaudbroes)

    @psmits1567 the issue turned out to be more complex because we found additional bugs in that function. However, we’re working on a fix right now and it should be included in the upcoming 3.2 release.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘aioseop_class.php on line 3983’ is closed to new replies.