Jump to content

Archived

This topic is now archived and is closed to further replies.

Joni Millar

A bunch of errors showing at the top of my site

Recommended Posts

Joni Millar

Hi, for one of my sites done a few years ago using Pagelines framework, I am getting a bunch of error codes showing at the top of my site. These appear to be from the pagelines code so I don't know how to fix it. Can you help?

 

Deprecated: Non-static method PageLinesTemplate::current_admin_post_type() should not be called statically, assuming $this from incompatible context in /misc/39/000/180/416/1/user/web/horizon-petroleum.com/wp-content/themes/pagelines/admin/class.options.metapanel.php on line 30

Deprecated: Non-static method PageLinesTemplate::current_admin_post_type() should not be called statically, assuming $this from incompatible context in /misc/39/000/180/416/1/user/web/horizon-petroleum.com/wp-content/themes/pagelines/admin/class.options.metapanel.php on line 30

Deprecated: Non-static method PageLinesTemplate::current_admin_post_type() should not be called statically, assuming $this from incompatible context in /misc/39/000/180/416/1/user/web/horizon-petroleum.com/wp-content/themes/pagelines/admin/class.options.metapanel.php on line 30

Deprecated: Non-static method PageLinesTemplate::current_admin_post_type() should not be called statically, assuming $this from incompatible context in /misc/39/000/180/416/1/user/web/horizon-petroleum.com/wp-content/themes/pagelines/admin/class.options.metapanel.php on line 30

Share this post


Link to post
Share on other sites
Simon

do you have WP_DEBUG set to true?

add this to wp-config 

error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE);

Share this post


Link to post
Share on other sites
Simon

add it below the WP_DEBUG line

Share this post


Link to post
Share on other sites
Simon

try this:

error_reporting(E_ALL ^ (E_NOTICE | E_WARNING | E_DEPRECATED));

Share this post


Link to post
Share on other sites
Joni Millar

Now I am getting way more error codes and can't see my admin stuff.

Share this post


Link to post
Share on other sites
Simon

Actually the following should work BUT you have to add it to theme functions file... adding to the config file is too early as WordPress changes the setting

error_reporting(0);

 

Share this post


Link to post
Share on other sites
Joni Millar

into functions.php?

That got rid of all the extra ones but the first four are still showing on every page.

Share this post


Link to post
Share on other sites
Simon

well that should turn them all off.. your host must be doing something special to still show the warnings.

Share this post


Link to post
Share on other sites
Joni Millar

So what do I do? redo it with a different theme?

I'm guessing this theme is not being updated any more so it might be best to change it to one that is more current?

 

Share this post


Link to post
Share on other sites
Simon

change the theme functions file to this..

<?php
/**
 * FUNCTIONS / THEME INITIALIZATION
 *
 * This file loads the core framework which handles everything.
 *
 * @package     PageLines Framework
 * @since       1.0
 *
 * @link        http://www.pagelines.com/
 * @link        http://www.pagelines.com/tour
 *
 * @author      PageLines   http://www.pagelines.com/
 * @copyright   Copyright (c) 2008-2012, PageLines  hello@pagelines.com
 *
 * @internal    last revised January 20, 2012
 * @version     ...
 *
 * @todo Define version
 */
if (version_compare(PHP_VERSION, '5.4.0') >= 0) {
	error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE & ~E_WARNING & ~E_DEPRECATED);
}
require_once(get_template_directory() . '/includes/init.php');

I have just tested this with PHP 5.6.10

Share this post


Link to post
Share on other sites
Joni Millar

Yay! It's gone. Thank you. 

So I assume this has happened because of a php upgrade my host has done at some point?

Share this post


Link to post
Share on other sites
Simon

Exactly.. I will update the legacy repos with this new snippet of code..

Share this post


Link to post
Share on other sites
Joni Millar

You are awesome. I appreciate your quick help on this very much.

Share this post


Link to post
Share on other sites

  • Similar Content

    • wphostmanaged
      By wphostmanaged
      I have a test site with only the Pagelines lite theme and the plugin Landing Pages installed
       
      When pagelines is active I get an error in the header and footer of every landing page.
       
      Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘Array’ was given in /home/setupabl/public_html/wp-includes/plugin.php on line 406
       
       
      Any suggestions on getting rid of this?
       
      Thanks…
×