Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › Blank admin page on updating
New Landing › How can we help? › Themeforest Theme Support › Dante › Blank admin page on updating
- This topic has 11 replies, 2 voices, and was last updated 10 years by Kyle – SUPPORT.
-
Posted in: Dante
-
June 9, 2014 at 2:44 pm #81160
Hi,
almost every time I update a page/post or some options, I get a blank page and have to start from the main admin page. The changes made before clicking the update button are applied.
This issue does not happen with a different template, it only happens with Dante.
What can be the problem?
Thanks
June 9, 2014 at 5:25 pm #81207Hi
Have you edited any of the theme files?
– Kyle
June 10, 2014 at 9:06 am #81393Well, yes, although in the Child theme folder.
Following your suggestion I have spotted the file that is causing my problem: it is a custom functions.php inside my child theme folder.
The content is just
<?php if (!function_exists('sf_custom_content')) { include_once('sf-header.php'); } ?>
Since I needed a small modification to sf-header.php
Is there a way to retain my modification while getting rid of the blank page issue?
Thanks
June 10, 2014 at 9:11 am #81395Not sure if this will work but try this:
if (!function_exists('sf_custom_content')) { function sf_custom_content() { require_once(SF_INCLUDES_PATH . '/sf-header.php'); } add_action('after_setup_theme', 'sf_custom_content', 0); }
– Kyle
June 10, 2014 at 9:37 am #81416Hi Kyle, thanks for your help, but unfortunately it does not work…
June 10, 2014 at 9:43 am #81422what part of the sd-header.php did you edit? You will just need to add the function to the child theme, rather than replacing the whole file
– Kyle
June 10, 2014 at 10:49 am #81445More than editing the file, what I had to do was only adding one link.
In line 230 I changed
$header_output .= '<div class="row">. "\n";
to
$header_output .= '<div class="row"><a href="#" class="bonfire-slideout-button">MENU</a>'. "\n";
Do you know of any other way to do the same modification?
Cheers
June 10, 2014 at 1:09 pm #81494You need to copy the whole function into your child theme functions.php file, so:
/* HEADER ================================================== */ if (!function_exists('sf_header')) { function sf_header($header_layout) { // VARIABLES $options = get_option('sf_dante_options'); $show_cart = $options['show_cart']; $show_wishlist = $options['show_wishlist']; $header_left_text = __($options['header_left_text'], 'swiftframework'); $header_output = $main_menu = ''; if ($header_layout == "header-1") { $header_output .= '<header id="header" class="clearfix">'. "\n"; $header_output .= '<div class="container">'. "\n"; $header_output .= '<div class="row">'. "\n"; $header_output .= '<div class="header-left col-sm-4">'.do_shortcode($header_left_text).'</div>'. "\n"; $header_output .= sf_logo('col-sm-4 logo-center'); $header_output .= '<div class="header-right col-sm-4">'.sf_aux_links('header-menu', TRUE, "header-1").'</div>'. "\n"; $header_output .= '</div> <!-- CLOSE .row -->'. "\n"; $header_output .= '</div> <!-- CLOSE .container -->'. "\n"; $header_output .= '</header>'. "\n"; $header_output .= '<div id="main-nav" class="sticky-header">'. "\n"; $header_output .= sf_main_menu('main-navigation', 'full'); $header_output .= '</div>'. "\n"; } else if ($header_layout == "header-2") { $header_output .= '<header id="header" class="clearfix">'. "\n"; $header_output .= '<div class="container">'. "\n"; $header_output .= '<div class="row">'. "\n"; $header_output .= sf_logo('col-sm-4 logo-left'); $header_output .= '<div class="header-right col-sm-8">'.sf_aux_links('header-menu', FALSE, "header-1").'</div>'. "\n"; $header_output .= '</div> <!-- CLOSE .row -->'. "\n"; $header_output .= '</div> <!-- CLOSE .container -->'. "\n"; $header_output .= '</header>'. "\n"; $header_output .= '<div id="main-nav" class="sticky-header">'. "\n"; $header_output .= sf_main_menu('main-navigation', 'full'); $header_output .= '</div>'. "\n"; } else if ($header_layout == "header-3") { $header_output .= '<header id="header" class="clearfix">'. "\n"; $header_output .= '<div class="container header-container sticky-header">'. "\n"; $header_output .= '<div class="row">'. "\n"; $header_output .= sf_logo('logo-left'); $header_output .= '<div class="header-right">'; $header_output .= sf_main_menu('main-navigation', 'with-search'); $header_output .= '</div>'. "\n"; $header_output .= '</div> <!-- CLOSE .row -->'. "\n"; $header_output .= '</div> <!-- CLOSE .container -->'. "\n"; $header_output .= '</header>'. "\n"; } else if ($header_layout == "header-4") { $header_output .= '<header id="header" class="clearfix">'. "\n"; $header_output .= sf_top_header(); $header_output .= '<div class="container header-container sticky-header">'. "\n"; $header_output .= '<div class="row">'. "\n"; $header_output .= sf_logo('logo-left'); $header_output .= '<div class="header-right">'; $header_output .= sf_main_menu('main-navigation', 'with-search'); $header_output .= '</div>'. "\n"; $header_output .= '</div> <!-- CLOSE .row -->'. "\n"; $header_output .= '</div> <!-- CLOSE .container -->'. "\n"; $header_output .= '</header>'. "\n"; } else if ($header_layout == "header-5") { $header_output .= '<header id="header" class="clearfix">'. "\n"; $header_output .= '<div class="container sticky-header">'. "\n"; $header_output .= '<div class="row">'. "\n"; $header_output .= sf_logo('logo-left'); $header_output .= '<div class="header-right">'; $header_output .= sf_main_menu('main-navigation', 'with-search'); $header_output .= '</div>'. "\n"; $header_output .= '</div> <!-- CLOSE .row -->'. "\n"; $header_output .= '</div> <!-- CLOSE .container -->'. "\n"; $header_output .= '</header>'. "\n"; } else if ($header_layout == "header-6") { $header_output .= '<header id="header" class="sticky-header clearfix">'. "\n"; $header_output .= '<div class="container">'. "\n"; $header_output .= '<div class="row">'. "\n"; $header_output .= sf_logo('logo-left'); $header_output .= '<div class="header-right">'.sf_main_menu('main-navigation', 'with-search').'</div>'. "\n"; $header_output .= '</div> <!-- CLOSE .row -->'. "\n"; $header_output .= '</div> <!-- CLOSE .container -->'. "\n"; $header_output .= '</header>'. "\n"; } else { $header_output .= '<header id="header" class="clearfix">'. "\n"; $header_output .= sf_top_header(); $header_output .= '<div class="sticky-header">'. "\n"; $header_output .= '<div class="container header-container">'. "\n"; $header_output .= '<div class="row">'. "\n"; $header_output .= sf_logo('logo-left'); $header_output .= '<div class="header-right">'.sf_main_menu('main-navigation', 'with-search').'</div>'. "\n"; $header_output .= '</div> <!-- CLOSE .row -->'. "\n"; $header_output .= '</div> <!-- CLOSE .container -->'. "\n"; $header_output .= '</div>'. "\n"; $header_output .= '</header>'. "\n"; } // HEADER RETURN return $header_output; } }
But with your change made
– Kyle
June 10, 2014 at 3:09 pm #81549Thanks again Kyle. I have made the change, but still with no luck. The problem is still there…
Maybe I have no other option than to modify the main sf-header file, uncheck the automatic theme updates and apply the modification each time I update the theme…
It appears strange to me that I am having this blank page problem only with the backend. The website is ok.
June 10, 2014 at 3:13 pm #81552Please let me know if it works when you add it to the parent theme file
– Kyle
June 10, 2014 at 4:38 pm #81585Yes, it works.
June 10, 2014 at 5:01 pm #81589Ok great! 🙂
– Kyle
-
Posted in: Dante
You must be logged in and have valid license to reply to this topic.