• Resolved alfredo49

    (@alfredo49)


    Hi:

    When you go to dashboard => new Post blank page is returned, this happens in all of my installations.

    When disable the plugin, all works OK

    regards

Viewing 15 replies - 1 through 15 (of 20 total)
  • Tom

    (@tom-van-m)

    I have exact the same issue. It happens with +post, but also special post types.
    I’m using Avada theme. You too?

    • This reply was modified 7 years, 4 months ago by Tom.
    Thread Starter alfredo49

    (@alfredo49)

    in my case it happens with all the pages where i have installed the plugin with different themes (generatepress, milkit, avada..)

    Tom

    (@tom-van-m)

    Oke, good to know.
    Recently I deleted this plugin on an other website I maintain because it was breaking every page which had star rating on it.

    Thread Starter alfredo49

    (@alfredo49)

    We need a fix ??

    Hi same issue here but this plugin has not been updated since a long time, the bug do not come from Yet Another Stars Rating.

    @all > Do you use like me YOAST SEO? Yes ? bingo! try to install an old version of YOS SEO like 5.6, and the bug do not occur anymore.

    Look at this, https://www.ads-software.com/support/topic/version-5-7-1-does-not-allow-me-to-create-posts-or-pages/ we are not the only one…

    Hope this help.

    Tom

    (@tom-van-m)

    Hello @pako69,

    Strange, I use Yoast, but I disabled it when trying to find the causes.
    With Yoast off and YASR on the bug is there. With Yoast on and YASR off the bug isn’t there.

    @tom-van-m

    yes, strange… because in my case: Yoast off and YASR on the bug is not there.

    Have you tried to rollback to an older version of Yoast and lease both Yoast and YASR on?

    Anyway YASR has not been changed or updated, only YOAST has been updated…

    EDIT: I’m also using AVADA

    • This reply was modified 7 years, 4 months ago by pako69.

    PS: I just tried with WordPress default theme Twenty sixteen + YOAST lastest version and YASR : the bus is there… so it’s not AVADA.

    same here!

    Tom

    (@tom-van-m)

    @pako69
    Oke, but I have plenty of installs with Yoast, and there are no problems.
    Only the install with Yoast AND YASR gives the bug. When I deinstall Yoast the bug is still there. Untill I deactivate YASR.

    Thread Starter alfredo49

    (@alfredo49)

    I have the same problem. Yoast is saying it’s a problem with this plugin. Someone needs to take responsibility lol.

    Plugin Contributor dudo

    (@dudo)

    Hello all.

    First of all, I want to apologize for my absence during these months, I’ve had a little health issue.
    YASR is not updated from some months, so it’s really hard that is YASR causing this issue.

    Hovewer, I’ll take a look to this monday and try to fix.

    Best,
    Dario

    • This reply was modified 7 years, 4 months ago by dudo.

    Thank you @dudo and good luck to try to find out what’s causing this issue even…

    Hi

    I managed some tests to try to see where when that issue occur.

    I setup a fresh WordPress with default theme and just install: YASR and YOAST

    I found that the bug only happen when the Auto Insert options is used.

    So I debug the file yasr-functions.php and the IF Statement :
    if (YASR_AUTO_INSERT_ENABLED == 1) {}

    I finaly found that by just encapsuling : add_filter('the_content', 'yasr_auto_insert_shortcode_callback');
    with:
    if ( ! is_admin() ) {}

    > make the bug disapear.

    Try to replace:

    
    /****** Auto insert overall rating and visitor rating  ******/
    
        if (YASR_AUTO_INSERT_ENABLED == 1) {
    
            add_filter('the_content', 'yasr_auto_insert_shortcode_callback');
    
            function yasr_auto_insert_shortcode_callback($content) {
    
    			$post_id = get_the_ID();
    
    			//check if for this post or page auto insert is off
    			$post_excluded = get_post_meta($post_id, 'yasr_auto_insert_disabled', TRUE);
    
    			if($post_excluded === 'yes') {
    
    				return $content;
    
    			}
    
                $auto_insert_shortcode=NULL; //To avoid undefined variable notice outside the loop (if (is_singular) )
    
                $overall_rating_code = '[yasr_overall_rating size="' . YASR_AUTO_INSERT_SIZE . '"]';
    
                $visitor_votes_code = '[yasr_visitor_votes size="' . YASR_AUTO_INSERT_SIZE . '"]';
    
                if (YASR_AUTO_INSERT_WHAT==='overall_rating') {
                    switch (YASR_AUTO_INSERT_WHERE) {
                        case 'top':
                            $content_and_stars = $overall_rating_code . $content;
                            break;
    
                        case 'bottom':
                            $content_and_stars = $content . $overall_rating_code;
                            break;
                    } //End Switch
                } //end YASR_AUTO_INSERT_WHAT overall rating
    
                elseif (YASR_AUTO_INSERT_WHAT==='visitor_rating') {
                    switch (YASR_AUTO_INSERT_WHERE) {
                        case 'top':
                            $content_and_stars = $visitor_votes_code . $content;
                            break;
    
                        case 'bottom':
                            $content_and_stars = $content . $visitor_votes_code;
                            break;
                    } //End Switch
                }
    
                elseif (YASR_AUTO_INSERT_WHAT==='both') {
                    switch (YASR_AUTO_INSERT_WHERE) {
                        case 'top':
                            $content_and_stars = $overall_rating_code . $visitor_votes_code . $content;
                            break;
    
                        case 'bottom':
                            $content_and_stars = $content . $overall_rating_code . $visitor_votes_code;
                            break;
                    } //End Switch
                }
    
                //IF auto insert must work only in custom post type
                if (YASR_AUTO_INSERT_CUSTOM_POST_ONLY === 'yes') {
    
                    $custom_post_types = yasr_get_custom_post_type();
    
                    //If is a post type return content and stars
                    if (is_singular($custom_post_types)) {
                        return $content_and_stars;
                    }
    
                    //else return just content
                    else {
                        return $content;
                    }
    
                }
    
                //If page are not excluded
                if (YASR_AUTO_INSERT_EXCLUDE_PAGES === 'no') {
                    return $content_and_stars;
                }
    
                //else return only if it is not a page
                elseif (YASR_AUTO_INSERT_EXCLUDE_PAGES === 'yes') {
                    if ( !is_page() ) {
    					// BUG HERE WITH YOAST
    					return $content_and_stars;
                    }
                    //If is a page return the content without stars
                    else {
    	                    return $content;
                    }
                }
    
            } //End function yasr_auto_insert_shortcode_callback
    
        } //End  if (YASR_AUTO_INSERT_ENABLED

    By:

    /****** Auto insert overall rating and visitor rating  ******/
    
        if (YASR_AUTO_INSERT_ENABLED == 1) {
    
        if ( ! is_admin() ) {
    
            add_filter('the_content', 'yasr_auto_insert_shortcode_callback');
    
            function yasr_auto_insert_shortcode_callback($content) {
    
    			$post_id = get_the_ID();
    
    			//check if for this post or page auto insert is off
    			$post_excluded = get_post_meta($post_id, 'yasr_auto_insert_disabled', TRUE);
    
    			if($post_excluded === 'yes') {
    
    				return $content;
    
    			}
    
                $auto_insert_shortcode=NULL; //To avoid undefined variable notice outside the loop (if (is_singular) )
    
                $overall_rating_code = '[yasr_overall_rating size="' . YASR_AUTO_INSERT_SIZE . '"]';
    
                $visitor_votes_code = '[yasr_visitor_votes size="' . YASR_AUTO_INSERT_SIZE . '"]';
    
                if (YASR_AUTO_INSERT_WHAT==='overall_rating') {
                    switch (YASR_AUTO_INSERT_WHERE) {
                        case 'top':
                            $content_and_stars = $overall_rating_code . $content;
                            break;
    
                        case 'bottom':
                            $content_and_stars = $content . $overall_rating_code;
                            break;
                    } //End Switch
                } //end YASR_AUTO_INSERT_WHAT overall rating
    
                elseif (YASR_AUTO_INSERT_WHAT==='visitor_rating') {
                    switch (YASR_AUTO_INSERT_WHERE) {
                        case 'top':
                            $content_and_stars = $visitor_votes_code . $content;
                            break;
    
                        case 'bottom':
                            $content_and_stars = $content . $visitor_votes_code;
                            break;
                    } //End Switch
                }
    
                elseif (YASR_AUTO_INSERT_WHAT==='both') {
                    switch (YASR_AUTO_INSERT_WHERE) {
                        case 'top':
                            $content_and_stars = $overall_rating_code . $visitor_votes_code . $content;
                            break;
    
                        case 'bottom':
                            $content_and_stars = $content . $overall_rating_code . $visitor_votes_code;
                            break;
                    } //End Switch
                }
    
                //IF auto insert must work only in custom post type
                if (YASR_AUTO_INSERT_CUSTOM_POST_ONLY === 'yes') {
    
                    $custom_post_types = yasr_get_custom_post_type();
    
                    //If is a post type return content and stars
                    if (is_singular($custom_post_types)) {
                        return $content_and_stars;
                    }
    
                    //else return just content
                    else {
                        return $content;
                    }
    
                }
    
                //If page are not excluded
                if (YASR_AUTO_INSERT_EXCLUDE_PAGES === 'no') {
                    return $content_and_stars;
                }
    
                //else return only if it is not a page
                elseif (YASR_AUTO_INSERT_EXCLUDE_PAGES === 'yes') {
                    if ( !is_page() ) {
    					// BUG HERE WITH YOAST
    					return $content_and_stars;
                    }
                    //If is a page return the content without stars
                    else {
    	                    return $content;
                    }
                }
    
            } //End function yasr_auto_insert_shortcode_callback
    
    	  }//   if ( ! is_admin() ) {
    
        } //End  if (YASR_AUTO_INSERT_ENABLED

    > THen clear you browser cache and it you are using php caching like OpCache you’ll have to clear it too.

    > Finaly try to create a new page or post, and It will work. It works for me on 5 websites

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Blank page when you create a post’ is closed to new replies.