• Resolved zenkitty

    (@zenkitty)


    I upgraded a friend’s site to 5.6.1 (from 5.1.8) and it all seemed to go smoothly. Everything works fine on the front-end, but most of the plugin pages in the admin have their formatting messed up.

    For example, this is a screenshot of one the ACF field group pages: https://ibb.co/ck6B4SB

    I tried deactivating all plugins, and reinstalling 5.6.1, but the issue remains.

    Turning on debug, the following errors appear:

    Deprecated: Non-static method DropDown_Menu_Widget::init() should not be called statically in /public_html/cms/wp-includes/class-wp-hook.php on line 287

    Deprecated: get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead. in /public_html/cms/wp-includes/functions.php on line 4859

    Warning: Cannot modify header information – headers already sent by (output started at /public_html/cms/wp-includes/class-wp-hook.php:287) in /public_html/cms/wp-includes/functions.php on line 6360

    Warning: Cannot modify header information – headers already sent by (output started at /public_html/cms/wp-includes/class-wp-hook.php:287) in /public_html/cms/wp-admin/includes/misc.php on line 1310

    Warning: Cannot modify header information – headers already sent by (output started at /public_html/cms/wp-includes/class-wp-hook.php:287) in /public_html/cms/wp-admin/admin-header.php on line 9

    Notice: Undefined offset: 0 in /public_html/cms/wp-content/themes/xxxxxx/lib/cleanup.php on line 103

    Notice: Undefined offset: 0 in /public_html/cms/wp-content/themes/xxxxxx/lib/cleanup.php on line 104

    The first error comes from the DropDown Menu plugin, but I haven’t been able to find the source of the others.

    I have a backup from before the upgrade, but as this website has many GBs of images, the backup kept timing out, and I am concerned restoring it maybe problematic. So I’d prefer to do that only as a last resort.

    Does anyone have any ideas of what might be going on, or what else I can try?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • While the dropdown plugin you mentioned is the cause of the first error and the ‘headers already sent’ notices, it looks like the theme is more to blame for the other errors.

    Notice: Undefined offset: 0 in /public_html/cms/wp-content/themes/xxxxxx/lib/cleanup.php on line 103

    That’s a warning that something isn’t quite right in your theme.

    Once you get the dropdown plugin sorted, check the theme, and ask the themes author for help with this (we can’t do much as you haven’t mentioned which theme you’re using).

    Thread Starter zenkitty

    (@zenkitty)

    Thank you catacaustic!

    While I did see those errors indicating the theme, I didn’t think issues with the theme would impact the admin panel. But changing the theme did fix the admin issues.

    As I understand it, the theme was custom made based on an old bare bones theme, many years ago. There are no updates for it, and the developer is no longer around.

    The theme errors reference these two lines:

    $media = $matches[3][0] !== '' && $matches[3][0] !== 'all' ? ' media="' . $matches[3][0] . '"' : '';
      return '<link rel="stylesheet" href="' . $matches[2][0] . '"' . $media . '>' . "\n";

    Any pointers on where to begin fixing this?

    Thanks!

    The only way to fix that is to check that the index exiss befor trying to use it. Something like…

    if( isset ($value [3][0]) && $vlaue [3][0] == 'something'){

    If you’re not sure it might be worth hring a freelancer developer to help out with that little task.

    Thread Starter zenkitty

    (@zenkitty)

    Just in case its helpful to see the whole function:

    `/* Clean up output of stylesheet <link> tags*/
    function SS_clean_style_tag($input) {
    preg_match_all(“!<link rel=’stylesheet’\s?(id='[^’]+’)?\s+href='(.*)’ type=’text/css’ media='(.*)’ />!”, $input, $matches);
    // Only display media if it is meaningful
    $media = $matches[3][0] !== ” && $matches[3][0] !== ‘all’ ? ‘ media=”‘ . $matches[3][0] . ‘”‘ : ”;
    return ‘<link rel=”stylesheet” href=”‘ . $matches[2][0] . ‘”‘ . $media . ‘>’ . “\n”;
    }
    add_filter(‘style_loader_tag’, ‘SS_clean_style_tag’);’

    I don’t even know if this is needed or not?

    Thread Starter zenkitty

    (@zenkitty)

    Well, I deleted it, and it doesn’t seem to have had had any effect on the website itself, but it has resolved the admin issues.

    So hopefully that bit of code wasn’t important!

    Thanks for your help, catacaustic. Much appreciated!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Admin plugin pages messed up after upgrading to 5.6.1’ is closed to new replies.