Support » Plugin: Network Latest Posts » Notice: Undefined variable: display formatting errors

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Jose Luis SAYAGO

    (@iluminatus)

    Hi, @magseoh I do not know if your website is in production mode, but I still recommend you to avoid keeping define('WP_DEBUG', true); because these warnings contain information regarding your hosting paths.

    However, this issue was related to a variable being used without it being previously declared. I have pushed into public repository version 3.7.1 which hopefully fixes this.

    Please let me know if it works for you.

    Best regards,
    Jose SAYAGO.

    Hi Jose,

    Thanks for the quick reply. The update got rid of the error message but the layout is still broken – do you have any idea why this might have happened?

    It used to look like this: http://grab.by/I8Ni
    But now it looks like this: http://grab.by/I8Ns

    The bootstrap classes & other formatting are no longer being applied.
    Thanks again 🙂

    Plugin Author Jose Luis SAYAGO

    (@iluminatus)

    Hello @megseoh,

    I just checked your site and it looks like the first screenshot you attached: Screenshot

    Maybe you’re seeing some locally cached version of your website?

    Try cleaning your browser’s cache and check again.

    Please let me know if it works.

    Best regards,
    Jose SAYAGO

    Hey Jose,

    The link that you checked is our live site which hasn’t been updated yet. I update WordPress & all plugins first on a development site to ensure that everything still works before updating on the live site. & the development site is in Maintenance Mode & is unfortunately not viewable by anyone who’s not logged in. That’s why I posted the screenshots instead of just links.

    Any ideas what the problem might be?

    Thanks 🙂

    Plugin Author Jose Luis SAYAGO

    (@iluminatus)

    Oh I get it, in the live site I see a custom HTML structure for posts. Have you or someone in your team created a custom HTML output for Network Latest Posts?

    <div class="row rowContainer">
    	<div class="col-md-4 col-sm-4 col-xs-12 newsItem nlposts-siteid-xx">
    		<a href="">
    			<img width="472" height="315" src="" class=" wp-post-image" alt="" title="">
    		</a>
    		<h3 class="news-article-title">
    			<a href="">
    				Post Title
    			</a>
    		</h3>
    		<div class="news-article-date">Date</div>
    	</div>
    </div>

    If so, once the plugin was updated, all custom HTML structures were erased.

    Please check your live’s website Network Latest Posts version, look for the function below:

    function nlp_display_type($display_type, $instance, $wrapper_list_css, $wrapper_block_css) {
        // Instances
        if( !empty($instance) ) { $nlp_instance = "nlp-instance-$instance"; }
        // Display Types
        switch($display_type) {
            // Unordered list
            case "ulist":
                    $html_tags = array(
                        'wrapper_o' => "<ul class='nlposts-wrapper nlposts-ulist $wrapper_list_css'>",
                        'wrapper_c' => "</ul>",
                        'wtitle_o' => "<h2 class='nlposts-ulist-wtitle'>",
                        'wtitle_c' => "</h2>",
                        'item_o' => "<li class='nlposts-ulist-litem'>",
                        'item_c' => "</li>",
                        'content_o' => "<div class='nlposts-container nlposts-ulist-container $nlp_instance'>",
                        'content_c' => "</div>",
                        'meta_o' => "<span class='nlposts-ulist-meta'>",
                        'meta_c' => "</span>",
                        'thumbnail_o' => "<ul class='nlposts-ulist-thumbnail thumbnails'>",
                        'thumbnail_c' => "</ul>",
                        'thumbnail_io' => "<li class='nlposts-ulist-thumbnail-litem span3'><div class='thumbnail'>",
                        'thumbnail_ic' => "</div></li>",
                        'pagination_o' => "<div class='nlposts-ulist-pagination pagination'>",
                        'pagination_c' => "</div>",
                        'title_o' => "<h3 class='nlposts-ulist-title'>",
                        'title_c' => "</h3>",
                        'excerpt_o' => "<ul class='nlposts-ulist-excerpt'><li>",
                        'excerpt_c' => "</li></ul>",
                        'caption_o' => "<div class='nlposts-caption'>",
                        'caption_c' => "</div>"
                    );
                    $html_tags = apply_filters( 'nlposts_ulist_output', $html_tags );
                    break;
                // Ordered list
                case "olist":
                    $html_tags = array(
                        'wrapper_o' => "<ol class='nlposts-wrapper nlposts-olist $wrapper_list_css'>",
                        'wrapper_c' => "</ol>",
                        'wtitle_o' => "<h2 class='nlposts-olist-wtitle'>",
                        'wtitle_c' => "</h2>",
                        'item_o' => "<li class='nlposts-olist-litem'>",
                        'item_c' => "</li>",
                        'content_o' => "<div class='nlposts-container nlposts-olist-container $nlp_instance'>",
                        'content_c' => "</div>",
                        'meta_o' => "<span class='nlposts-olist-meta'>",
                        'meta_c' => "</span>",
                        'thumbnail_o' => "<ul class='nlposts-olist-thumbnail thumbnails'>",
                        'thumbnail_c' => "</ul>",
                        'thumbnail_io' => "<li class='nlposts-olist-thumbnail-litem span3'>",
                        'thumbnail_ic' => "</li>",
                        'pagination_o' => "<div class='nlposts-olist-pagination pagination'>",
                        'pagination_c' => "</div>",
                        'title_o' => "<h3 class='nlposts-olist-title'>",
                        'title_c' => "</h3>",
                        'excerpt_o' => "<ul class='nlposts-olist-excerpt'><li>",
                        'excerpt_c' => "</li></ul>",
                        'caption_o' => "<div class='nlposts-caption'>",
                        'caption_c' => "</div>"
                    );
                    $html_tags = apply_filters( 'nlposts_olist_output', $html_tags );
                    break;
                // Block
                case "block":
                    $html_tags = array(
                        'wrapper_o' => "<div class='nlposts-wrapper nlposts-block $wrapper_block_css'>",
                        'wrapper_c' => "</div>",
                        'wtitle_o' => "<h2 class='nlposts-block-wtitle'>",
                        'wtitle_c' => "</h2>",
                        'item_o' => "<div class='nlposts-block-item'>",
                        'item_c' => "</div>",
                        'content_o' => "<div class='nlposts-container nlposts-block-container $nlp_instance'>",
                        'content_c' => "</div>",
                        'meta_o' => "<span class='nlposts-block-meta'>",
                        'meta_c' => "</span>",
                        'thumbnail_o' => "<ul class='nlposts-block-thumbnail thumbnails'>",
                        'thumbnail_c' => "</ul>",
                        'thumbnail_io' => "<li class='nlposts-block-thumbnail-litem span3'>",
                        'thumbnail_ic' => "</li>",
                        'pagination_o' => "<div class='nlposts-block-pagination pagination'>",
                        'pagination_c' => "</div>",
                        'title_o' => "<h3 class='nlposts-block-title'>",
                        'title_c' => "</h3>",
                        'excerpt_o' => "<div class='nlposts-block-excerpt'><p>",
                        'excerpt_c' => "</p></div>",
                        'caption_o' => "<div class='nlposts-caption'>",
                        'caption_c' => "</div>"
                    );
                    $html_tags = apply_filters( 'nlposts_block_output', $html_tags );
                    break;
                default:
                    // Unordered list
                    $html_tags = array(
                        'wrapper_o' => "<ul class='nlposts-wrapper nlposts-ulist $wrapper_list_css'>",
                        'wrapper_c' => "</ul>",
                        'wtitle_o' => "<h2 class='nlposts-ulist-wtitle'>",
                        'wtitle_c' => "</h2>",
                        'item_o' => "<li class='nlposts-ulist-litem'>",
                        'item_c' => "</li>",
                        'content_o' => "<div class='nlposts-container nlposts-ulist-container $nlp_instance'>",
                        'content_c' => "</div>",
                        'meta_o' => "<span class='nlposts-ulist-meta'>",
                        'meta_c' => "</span>",
                        'thumbnail_o' => "<ul class='nlposts-ulist-thumbnail thumbnails'>",
                        'thumbnail_c' => "</ul>",
                        'thumbnail_io' => "<li class='nlposts-ulist-thumbnail-litem span3'>",
                        'thumbnail_ic' => "</li>",
                        'pagination_o' => "<div class='nlposts-ulist-pagination pagination'>",
                        'pagination_c' => "</div>",
                        'title_o' => "<h3 class='nlposts-ulist-title'>",
                        'title_c' => "</h3>",
                        'excerpt_o' => "<ul class='nlposts-ulist-excerpt'><li>",
                        'excerpt_c' => "</li></ul>",
                        'caption_o' => "<div class='nlposts-caption'>",
                        'caption_c' => "</div>"
                    );
                    $html_tags = apply_filters( 'nlposts_default_output', $html_tags );
                    break;
        }
        // Return tags
        return $html_tags;
    }

    Check if there is a new one added, or the one for blocks was modified and replace it in the latest version.

    I know this is not ideal but the only way to keep customizations right now. I am working in a new version which will allow developers to create their own styles without losing them once the plugin gets updated.

    Please let me know if you need further assistance.

    Best regards,
    Jose SAYAGO.

    Hey Jose,

    You were bang on – in the older version the ‘case “block”:’ had been entirely commented out & replaced by custom code. I’m very close to formatting it as it was before thanks to your help. Now that I know where the problem is I can easily paste it into newer versions.

    One weird thing that has happened is it now says ‘network-latest-posts’ up in the top left corner under the <body> tag. Do you know where that would be coming from? http://grab.by/I9MU

    Thanks again!

    Plugin Author Jose Luis SAYAGO

    (@iluminatus)

    Hi, I checked my testing environment and there is nothing being printed under the body tag. Could you please send me a copy of your network-latest-posts.php to jose[at]wplatino.com so I can take a look and see if there’s an extra tag causing this?

    Kind regards,
    Jose SAYAGO.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Notice: Undefined variable: display formatting errors’ is closed to new replies.