Title: Update spits out code
Last modified: November 29, 2017

---

# Update spits out code

 *  Resolved [myblogisgreat](https://wordpress.org/support/users/myblogisgreat/)
 * (@myblogisgreat)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/update-spits-out-code/)
 * Hi,
    The latest update prints out lots of code in the top of the webpage. De-
   activating the plugin goes back to normal again.
 * Screen shot:
    [⌊2017-11-29_0748⌉](https://www.screencast.com/t/j3Xr7CMQ)
 * Kind regards
    Themis

Viewing 15 replies - 1 through 15 (of 29 total)

1 [2](https://wordpress.org/support/topic/update-spits-out-code/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/update-spits-out-code/page/2/?output_format=md)

 *  [pepman](https://wordpress.org/support/users/pepman/)
 * (@pepman)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/update-spits-out-code/#post-9732233)
 * Have the same problem
 *  [Workshopshed](https://wordpress.org/support/users/workshopshed/)
 * (@workshopshed)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/update-spits-out-code/#post-9732279)
 * Same here, code appears on the admin screen. Perhaps a character escape issue?
    -  This reply was modified 8 years, 6 months ago by [Workshopshed](https://wordpress.org/support/users/workshopshed/).
 *  Thread Starter [myblogisgreat](https://wordpress.org/support/users/myblogisgreat/)
 * (@myblogisgreat)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/update-spits-out-code/#post-9732300)
 * Here it shows both on admin screen and website (frontpage).
 *  [welje](https://wordpress.org/support/users/welje/)
 * (@welje)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/update-spits-out-code/#post-9732383)
 * Have the same problem for me
 *  [dijkenbouwer](https://wordpress.org/support/users/dijkenbouwer/)
 * (@dijkenbouwer)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/update-spits-out-code/#post-9732462)
 * Same problem here.
 *  Plugin Author [Fernando Briano](https://wordpress.org/support/users/fernandobt/)
 * (@fernandobt)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/update-spits-out-code/#post-9732471)
 * Can you please post the beginning of the code? It seems to be hidden under the
   admin bar in the first screenshot. I can’t see it on my testing blogs.
 *  [ideeregalouomo](https://wordpress.org/support/users/ideeregalouomo/)
 * (@ideeregalouomo)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/update-spits-out-code/#post-9732480)
 * Same problem here, on two blogs.
    Where i can download the previous release?
 *  [LordDunvegan](https://wordpress.org/support/users/lorddunvegan/)
 * (@lorddunvegan)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/update-spits-out-code/#post-9732484)
 * Error ·GET /hymns/
    Class ‘LcpPaginator’ not found Nov 29th 07:29:25 utc P | 
   Severity error.7c06aace6f78d0b2b949deead3cbefe1 /var/www/hymnswithoutwords/wp-
   content/plugins/list-category-posts/include/lcp-catlist.php:436 · CatList::get_pagination/
   var/www/hymnswithoutwords/wp-content/plugins/list-category-posts/include/lcp-
   catlistdisplayer.php:154 · CatListDisplayer::build_output /var/www/hymnswithoutwords/
   wp-content/plugins/list-category-posts/include/lcp-catlistdisplayer.php:49 · 
   CatListDisplayer::select_template /var/www/hymnswithoutwords/wp-content/plugins/
   list-category-posts/include/lcp-catlistdisplayer.php:30 · CatListDisplayer::display/
   var/www/hymnswithoutwords/wp-content/plugins/list-category-posts/list-category-
   posts.php:156 · ListCategoryPosts::catlist_func
 *  [newnw](https://wordpress.org/support/users/newnw/)
 * (@newnw)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/update-spits-out-code/#post-9732487)
 * show_pagination($params[‘pagination’])){ $lcp_paginator = ”; $pages_count = ceil(
   $params[‘posts_count’] / # Avoid dividing by 0 (pointed out by [@rhj4](https://wordpress.org/support/users/rhj4/))
   max( array( 1, $params[‘numberposts’] ) ) ); $pag_output = ”; if ($pages_count
   > 1){ for($i = 1; $i <= $pages_count; $i++){ $lcp_paginator .= $this->lcp_page_link(
   $i, $params[‘page’], $params[‘instance’]); } $pag_output .= ”
    “; // Add “Previous”
   link if ($params[‘page’] > 1){ $this->prev_page_num = intval(intval($params[‘
   page’]) – 1); $pag_output .= $this->lcp_page_link($this->prev_page_num , $params[‘
   page’], $params[‘instance’], $params[‘previous’] ); } $pag_output .= $lcp_paginator;//
   Add “Next” link if ($params[‘page’] < $pages_count){ $this->next_page_num = intval(
   $params[‘page’] + 1); $pag_output .= $this->lcp_page_link($this->next_page_num,
   $params[‘page’], $params[‘instance’], $params[‘next’]); } $pag_output .= ” “;}
   return $pag_output; } } // `char` is the string from pagination_prev/pagination_next
   private function lcp_page_link($page, $current_page, $lcp_instance, $char = null){
   $link = ”; if ($page == $current_page){ $link = ” $current_page “; } else { $
   server_vars = add_magic_quotes($_SERVER); $request_uri = $server_vars[‘REQUEST_URI’];
   $query = $server_vars[‘QUERY_STRING’]; $amp = ( strpos( $request_uri, “?”) ) ?“&”:“”;
   $pattern = “/[&|?]?lcp_page” . preg_quote($lcp_instance) . “=([0-9]+)/”; $query
   = preg_replace($pattern, ”, $query); $url = strtok($request_uri,’?’); $protocol
   = “http”; $port = $server_vars[‘SERVER_PORT’]; if ( (!empty($server_vars[‘HTTPS’])&&
   $server_vars[‘HTTPS’] !== ‘off’) || $port == 443){ $protocol = “https”; } $http_host
   = $server_vars[‘HTTP_HOST’]; $page_link = “$protocol://$http_host$url?$query”.
   $amp . “lcp_page” . $lcp_instance . “=”. $page . “#lcp_instance_” . $lcp_instance;
   $link .= ” prev_page_num) { $link .= “class=’lcp_prevlink'”; } elseif ($page 
   === $this->next_page_num) { $link .= “class=’lcp_nextlink'”; } $link .= “>”; (
   $char != null) ? ($link .= $char) : ($link .= $page); $link .= ” “; } // WA: 
   Replace ‘?&’ by ‘?’ to avoid potential redirection problems later on $link = 
   str_replace(‘?&’, ‘?’, $link ); return $link; } }
 *  [GDM57](https://wordpress.org/support/users/gdm57/)
 * (@gdm57)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/update-spits-out-code/#post-9732492)
 * Same problem also in my website:
 * pagination($params[‘pagination’])){ $lcp_paginator = ”; $pages_count = ceil (
   $params[‘posts_count’] / # Avoid dividing by 0 (pointed out by [@rhj4](https://wordpress.org/support/users/rhj4/))
   max( array( 1, $params[‘numberposts’] ) ) ); $pag_output = ”; if ($pages_count
   > 1){ for($i = 1; $i <= $pages_count; $i++){ $lcp_paginator .= $this->lcp_page_link(
   $i, $params[‘page’], $params[‘instance’]); } $pag_output .= ”
 *  “; // Add “Previous” link if ($params[‘page’] > 1){ $this->prev_page_num = intval(
   intval($params[‘page’]) – 1); $pag_output .= $this->lcp_page_link($this->prev_page_num,
   $params[‘page’], $params[‘instance’], $params[‘previous’] ); } $pag_output .=
   $lcp_paginator; // Add “Next” link if ($params[‘page’] < $pages_count){ $this-
   >next_page_num = intval($params[‘page’] + 1); $pag_output .= $this->lcp_page_link(
   $this->next_page_num, $params[‘page’], $params[‘instance’], $params[‘next’]);}
   $pag_output .= ”
 * “; } return $pag_output; } } // `char` is the string from pagination_prev/pagination_next
   private function lcp_page_link($page, $current_page, $lcp_instance, $char = null){
   $link = ”; if ($page == $current_page){ $link = ”
    $current_page “; } else { 
   $server_vars = add_magic_quotes($_SERVER); $request_uri = $server_vars[‘REQUEST_URI’];
   $query = $server_vars[‘QUERY_STRING’]; $amp = ( strpos( $request_uri, “?”) ) ?“&”:“”;
   $pattern = “/[&|?]?lcp_page” . preg_quote($lcp_instance) . “=([0-9]+)/”; $query
   = preg_replace($pattern, ”, $query); $url = strtok($request_uri,’?’); $protocol
   = “http”; $port = $server_vars[‘SERVER_PORT’]; if ( (!empty($server_vars[‘HTTPS’])&&
   $server_vars[‘HTTPS’] !== ‘off’) || $port == 443){ $protocol = “https”; } $http_host
   = $server_vars[‘HTTP_HOST’]; $page_link = “$protocol://$http_host$url?$query”.
   $amp . “lcp_page” . $lcp_instance . “=”. $page . “#lcp_instance_” . $lcp_instance;
   $link .= ” prev_page_num) { $link .= “class=’lcp_prevlink'”; } elseif ($page 
   === $this->next_page_num) { $link .= “class=’lcp_nextlink'”; } $link .= “>”; (
   $char != null) ? ($link .= $char) : ($link .= $page); $link .= ” “; } // WA: 
   Replace ‘?&’ by ‘?’ to avoid potential redirection problems later on $link = 
   str_replace(‘?&’, ‘?’, $link ); return $link; } }
 *  [GDM57](https://wordpress.org/support/users/gdm57/)
 * (@gdm57)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/update-spits-out-code/#post-9732511)
 * The error on log file:
    mod_fcgid: stderr: PHP Fatal error: Class ‘LcpPaginator’
   not found in /data/vhosts/xxx.it/mysite/wp-content/plugins/list-category-posts/
   include/lcp-catlist.php on line 436, referer: [http://mysite/](http://mysite/)
 *  [rogerhyam](https://wordpress.org/support/users/rogerhyam/)
 * (@rogerhyam)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/update-spits-out-code/#post-9732536)
 * Me too. I there a simple way to roll back?
 *  [GDM57](https://wordpress.org/support/users/gdm57/)
 * (@gdm57)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/update-spits-out-code/#post-9732556)
 * Waiting for a solution to the problem I solved by reloading the plugin backup
   to the previous version via ftp: the previous version works fine.
 *  [SPRINGSTOFF-Berlin](https://wordpress.org/support/users/springstoff-berlin/)
 * (@springstoff-berlin)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/update-spits-out-code/#post-9732563)
 * same here….
 *  [Jgrabowski1](https://wordpress.org/support/users/jgrabowski1/)
 * (@jgrabowski1)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/update-spits-out-code/#post-9732576)
 * Yeah I had the same problem as well this morning. Any ideas on the turn around
   time for the update…?

Viewing 15 replies - 1 through 15 (of 29 total)

1 [2](https://wordpress.org/support/topic/update-spits-out-code/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/update-spits-out-code/page/2/?output_format=md)

The topic ‘Update spits out code’ is closed to new replies.

 * ![](https://ps.w.org/list-category-posts/assets/icon-256x256.png?rev=2517221)
 * [List category posts](https://wordpress.org/plugins/list-category-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/list-category-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/list-category-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/list-category-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/list-category-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/list-category-posts/reviews/)

 * 29 replies
 * 16 participants
 * Last reply from: [suesutcliffe](https://wordpress.org/support/users/suesutcliffe/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/update-spits-out-code/page/2/#post-9781266)
 * Status: resolved