maintenance page with warning

marta.oliveira's picture
marta.oliveira
Fri, 05/27/2016 - 11:14
#1
maintenance page with warning

Hi

my maintenance page is with this warning

Warning: array_chunk() expects parameter 1 to be array, null given in md_make_preprocess_maintenance_page() (line 478 of /home/artpt/public_html/beta2/sites/all/themes/md_make/theme_setting/front/page.preprocess.inc).

it is possible to disapears this warning?

thanks

Image title

phuonght's picture
phuonght
Sun, 05/29/2016 - 22:21

Hi,

Please go to sites\all\themes\md_make\theme_setting\front, file page.preprocess.inc, 
move 2 below lines:

$tabcontent_data = drupal_json_decode($tabcontent_data);
$tabcontent_data = array_chunk($tabcontent_data, 3);

into if (!empty($tabcontent_data)){ at line 482
then code will be

if (!empty($tabcontent_data)){
$tabcontent_data = drupal_json_decode($tabcontent_data);
$tabcontent_data = array_chunk($tabcontent_data, 3);
...............


marta.oliveira's picture
marta.oliveira
Mon, 05/30/2016 - 17:04

Hi

this is it???

 // Content Tab
  $tabcontent_data = theme_get_setting('tabcontent_data');
  if (!empty($tabcontent_data)){
    $tabcontent_data = drupal_json_decode($tabcontent_data);
    $tabcontent_data = array_chunk($tabcontent_data, 3);
  }

  $menu_content = '<nav class="main-nav"><ul>';
  $tab_content = '';
  foreach ($tabcontent_data as $key_content => $content_detail) {
    if ($content_detail[0]['value'] != '') {
      $list_active = ($key_content == 0) ? "active" : "";
      $menu_content .= '<li><a href="#tab_cotent_' . $key_content . '" class="' . $list_active . '">' . t($content_detail[0]['value']) . '</a></li>';

      $section_show = ($key_content == 0) ? "show" : "hide";
      $tab_content .='<section class="content ' . $section_show . '">                    <h1>' . t($content_detail[0]['value']) . '</h1>
                    <h5>' . t($content_detail[1]['value']) . '</h5>
                    <div class="maintenance_description">' . t($content_detail[2]['value']) . '</div>
            </section>';
    }
  }

because i still have one error

Warning: Invalid argument supplied for foreach() in md_make_preprocess_maintenance_page() (line 491 of /home/artpt/public_html/beta2/sites/all/themes/md_make/theme_setting/front/page.preprocess.inc).

thanks

cindy's picture
cindy
Mon, 05/30/2016 - 22:47

Hi,

Please give us your site url. admin account and FTP account so that we could check and fix your problem

phuonght's picture
phuonght
Mon, 05/30/2016 - 23:15

Marta.Oliveira,

We fixed. Check site please. 

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.