Got these when I tried to install the 2.x-dev from April 20:

* warning: include_once(sites/default/modules/quicktabs/quicktabs.views.inc) [function.include-once]: failed to open stream: No such file or directory in /var/www/hmcpl.org/includes/theme.inc on line 286.

* warning: include_once() [function.include]: Failed opening 'sites/default/modules/quicktabs/quicktabs.views.inc' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/hmcpl.org/includes/theme.inc on line 286.
CommentFileSizeAuthor
#20 791918-quicktabs.patch585 bytesbohart

Comments

pasqualle’s picture

Status: Active » Postponed (maintainer needs more info)

I do not know how did you get this error message as the file reference is with the "includes" folder [quicktabs/includes/quicktabs.views.inc]
The file was added on April 21, please test the latest dev snapshot..

domesticat’s picture

Pasqualle - I'm pretty confused as well. I read over the code and it seemed straightforward, but I've confirmed that if I rm -rf the quicktabs module, tar -xvf the -dev version, and run update.php, the problem comes back immediately. I've run find . -exec grep -q "quicktabs" '{}' \; -print in my /sites directory to find any themes or modules that contained the string 'quicktabs.'

Outside of the quicktabs module directory, it's all .css files and one programmatic theme('quicktabs', $quicktabs) call. I'm zeroing in on that line to see if it's part of the problem. If not, I'm stumped.

Bewildered but still digging.

bendiy’s picture

Status: Postponed (maintainer needs more info) » Active

I got this same error right after installing the module on '/admin/build/modules'. It doesn't make any sense because the 'quicktabs_views_api()' function is setup fine, just like the Date module does it.

Notice that the error reports looking for 'quicktabs.views.inc' in the modules root folder, not in the 'includes' folder.

* warning: include_once(sites/default/modules/quicktabs/quicktabs.views.inc)

I'm running the Dev version dated May 9th 2010.

bendiy’s picture

Priority: Normal » Critical
Status: Active » Needs review

The problem appears to be that you have included 'function theme_quicktabs_views_render($view, $tabs, $qtid)' in 'quicktabs.views.inc'.

Theme functions should be in the main 'quicktabs.module' file, or in a theme folder under theme.inc (/quicktabs/theme/theme.inc).

By putting it in 'quicktabs.views.inc', 'quicktabs.views.inc' is included once by 'function quicktabs_theme()' and then again by 'function quicktabs_views_api()'. This violates the purpose of 'include_once()'.

I've moved all the theme functions to '/quicktabs/theme/theme.inc' and changed 'function quicktabs_theme()' to 'file' => 'theme/theme.inc'. This fixes the error.

Sorry, I don't have time to make a patch, but I think you will get the idea.

/**
 * Implementation of hook_theme().
 */
function quicktabs_theme() {
  return array(
    'quicktabs_settings' => array(
      'arguments' => array('form' => NULL),
      'file' => 'theme/theme.inc',
    ),
    'quicktabs_admin_form_tabs' => array(
      'arguments' => array('form' => NULL),
      'file' => 'theme/theme.inc',
    ),
    'quicktabs_views_render' => array(
      'arguments' => array('view' => NULL, 'tabs' => NULL, 'qtid' => NULL),
      'file' => 'theme/theme.inc',
    ),
    'quicktabs_tabs' => array(
      'arguments' => array('quicktabs', 'active_tab' => 'none'),
    ),
    'quicktabs' => array(
      'arguments' => array('quicktabs'),
    ),
    'quicktabs_tab_access_denied' => array(
      'arguments' => array('tab'),
    ),
  );
}

############################
/quicktabs/theme/theme.inc file:

// $Id$

/**
 * Theme Functions
 */

function theme_quicktabs_views_render($view, $tabs, $qtid) {
  foreach ($tabs as $index => $tab) {
    if (is_array($tab['content'])) {
      $text = '';
      foreach ($tabs[$index]['content'] as $content) {
        $text .= '<div class="quicktabs-views-group">' . $content . '</div>';
      }
      $tabs[$index]['text'] = $text;
    }
    else {
      $tabs[$index]['text'] = $tabs[$index]['content'];
    }
    $tabs[$index]['type'] = 'freetext';
    unset($tabs[$index]['content']);
  }

  $quicktabs = array(
    'qtid' => $qtid,
    'ajax' => '0', // TODO: Support AJAX, set this to $view->use_ajax.
    'hide_empty_tabs' => '0',
    'default_tab' => '0',
    'style' => $view->style_options['tab_style'],
    'tabs' => $tabs,
  );

  return theme('quicktabs', $quicktabs);
}

/**
 * Theme function for quicktabs settings page.
 *
 * @ingroup themeable
 */
function theme_quicktabs_settings($form) {
  drupal_add_css(drupal_get_path('module', 'quicktabs') .'/css/quicktabs-admin.css');

  $tabs['one'] = array('title' => t('One'), 'type' => 'freetext', 'text' => t('First tab'));
  $tabs['two'] = array('title' => t('Two'), 'type' => 'freetext', 'text' => t('Second tab'));
  $tabs['three'] = array('title' => t('Three'), 'type' => 'freetext', 'text' => t('Third tab'));
  $quicktabs['tabs'] = $tabs;
  $quicktabs['ajax'] = FALSE;
  $quicktabs['hide_empty_tabs'] = FALSE;

  // Preview for each style.
  foreach ($form['quicktabs_tabstyle']['#options'] as $style => $style_title) {
    $quicktabs['style'] = $style;
    $quicktabs['qtid'] = drupal_strtolower($style);
    $preview = '<div class="quicktabs-preview">'. theme('quicktabs', $quicktabs) .'</div>';
    $form['quicktabs_tabstyle'][$style]['#description'] = t('%style preview', array('%style' => $style_title)) .':<br />'. $preview;
  }
  return drupal_render($form);
}

/**
 * Theme function for quicktabs admin page.
 * Theme the form elements for the tabs as draggable table rows.
 *
 * @ingroup themeable
 */
function theme_quicktabs_admin_form_tabs($form) {
  drupal_add_tabledrag('qt-tablist-table', 'order', 'sibling', 'qt-tabs-weight');
  $rows = array();
  $headers = array(
    t('Tab title'),
    t('Tab weight'),
    t('Tab type'),
    t('Tab content'),
    t('Operations'),
  );

  foreach (element_children($form) as $key) {
    $form[$key]['weight']['#attributes']['class'] = 'qt-tabs-weight';
    // Build the table row.
    $row = array(
      'data' => array(
        array('data' => drupal_render($form[$key]['title']), 'class' => 'qt-tab-title'),
        array('data' => drupal_render($form[$key]['weight']), 'class' => 'qt-tab-weight'),
        array('data' => drupal_render($form[$key]['type']), 'class' => 'qt-tab-type'),
        // tab content (only 1 tab content (block, node or view) will be displayed. see: quicktabs_form.js)
        array('data' => drupal_render($form[$key]['block']), 'class' => 'qt-tab-content qt-tab-block-content'),
        array('data' => (module_exists('views') ? drupal_render($form[$key]['view']) : ''), 'class' => 'qt-tab-content qt-tab-view-content'),
        array('data' => drupal_render($form[$key]['node']), 'class' => 'qt-tab-content qt-tab-node-content'),
        array('data' => drupal_render($form[$key]['qtabs']), 'class' => 'qt-tab-content qt-tab-qtabs-content'),
        array('data' => drupal_render($form[$key]['remove']), 'class' => 'qt-tab-remove'),
      ),
      'class' => 'draggable',
    );

    // Add additional attributes to the row, such as a class for this row.
    if (isset($form[$key]['#attributes'])) {
      $row = array_merge($row, $form[$key]['#attributes']);
    }
    $rows[] = $row;
  }

  $output = theme('table', $headers, $rows, array('id' => 'qt-tablist-table'));
  $output .= drupal_render($form);

  // Add our JS file, which has some Drupal core JS overrides, and ensures ahah behaviours get re-attached
  drupal_add_js(drupal_get_path('module', 'quicktabs') .'/js/quicktabs_ahah.js', 'module', 'footer');
  drupal_add_js(drupal_get_path('module', 'quicktabs') .'/js/quicktabs_form.js');
  drupal_add_css(drupal_get_path('module', 'quicktabs') .'/css/quicktabs-admin.css');
  return $output;
}

Remove the theme functions from 'quicktabs.views.inc' and 'admin.inc'.

capellic’s picture

I have the same error. Would be great if these fixes could be rolled into the latest DEV version... thanks!

sethcohn’s picture

+1 for this... can someone roll a patch so we can get it into the dev version?

sethcohn’s picture

Title: Missing file: quicktabs.views.inc » Move theme functions to theme.inc

better issue title

ken hawkins’s picture

I was getting the same errors (using a quicktab that showed a view) the fix in #4 didn't seem to help me using the latest dev release, but simply moving the quicktabs.views.inc file to the module's root did.

Obviously this isn't the right place for it to be, but the module seems to be looking for quicktabs.views.inc in the wrong place.

jordanmagnuson’s picture

Same problem, using the latest version of the module.\ (6.x-2.x-rc5). The "fix" in #8 worked for me, but obviously something wrong here. Was getting the include error message on all admin pages of my site.

jordanmagnuson’s picture

Never mind--the fix in #8 didn't work. After clearing my site's cache I get this error message with wsod:

Fatal error: Cannot redeclare quicktabs_views_plugins() (previously declared in /srv/www/pixeledmemories.com/public_html/sites/all/modules/drupal-contrib/quicktabs/includes/quicktabs.views.inc:12) in /srv/www/pixeledmemories.com/public_html/sites/all/modules/drupal-contrib/quicktabs/quicktabs.views.inc on line 28

So I removed quicktabs.views.inc from the main quicktabs directory (so back to vanilla install). Of course, now my admin pages are back to giving me this error:

warning: include_once(sites/all/modules/drupal-contrib/quicktabs/quicktabs.views.inc) [function.include-once]: failed to open stream: No such file or directory in /srv/www/pixeledmemories.com/public_html/includes/theme.inc on line 286.

And also:

warning: include_once() [function.include]: Failed opening 'sites/all/modules/drupal-contrib/quicktabs/quicktabs.views.inc' for inclusion (include_path='.:/srv/www/pixeledmemories.com/public_html/sites/all/modules/drupal-contrib/luceneapi/lib:/usr/share/php:/usr/share/pear') in /srv/www/pixeledmemories.com/public_html/includes/theme.inc on line 286.
fletch11’s picture

+1

dillonm’s picture

Subscribing

hkovacs’s picture

i had the same errors of file not found in quicktabs root and i tried #8 solution, but moving the file gave me the new errors of file not found in includes.

so... i copied quicktabs.views.inc file into root and includes... yes, a copy in each location... two of the same, etc... this doesnt seem right, i know...

viola! the errors went away. thanks ken.

now to test the module...

jordanmagnuson’s picture

Howie: did you try clearing your site's cache? I tried copying the file, so I had the same in each location, and it worked until I cleared my cache, at which point I got this error:

Fatal error: Cannot redeclare quicktabs_views_plugins() (previously declared in /srv/www/pixeledmemories.com/public_html/sites/all/modules/drupal-contrib/quicktabs/includes/quicktabs.views.inc:12) in /srv/www/pixeledmemories.com/public_html/sites/all/modules/drupal-contrib/quicktabs/quicktabs.views.inc on line 28
MattBrigade’s picture

I was having a very similar issue with QTs version 6.x-2.0-rc5 (just released less than two weeks ago). I managed to find a work around. I've posted my fix at http://drupal.org/node/920982 (note that I didn't post in this thread because I was using a different version of Quick Tabs than the one this issue was listed under).

The fix is much like post #8 in this thread, with a couple tweaks to the module code.

Andrew Gorokhovets’s picture

I have the same error.

crifi’s picture

Title: Move theme functions to theme.inc » include_once failed with older drupal6 core
Status: Needs review » Active

I have analyzed the problem a little bit more:
1. The patch in #4 doesn't work on my system, so it's not the theme.inc problem
2. I have a debian system here with the package drupal6 (6.6-3lenny6). On this system the quicktabs module caused the include_once problem described about.
So I copied the database of the 6.6.-3lenny6 installation and moved the site files in a new 6.19 installation and made an update for the copied database. After this the include_once errors has been gone...
So for me this seems to be a problem with different drupal 6 core versions! What do you think?

MattBrigade’s picture

I also just tried upgrading my Drupal 6.15 installation to the most recent version (6.19). I can confirm that this fixes the same issue with QuickTabs (which means it probably wasn't an issue with QuickTabs itself all along).

bohart’s picture

Assigned: Unassigned » bohart
Status: Active » Needs review
StatusFileSize
new585 bytes

This patch will solve this problem.

drupalusering’s picture

same problem as orig poster. My problem resolved when i completely uninstalled lates DEV of views and installed stable 6x release. Quicktabs installed without errors with stable views release

franz’s picture

Looks like a good solution. If someone that downgraded views could test this to see if it works with any version of it. Should be.

It worked under Views 2.8 (it wasn't working before).

franz’s picture

bohart, there is something wrong with the patch, I couldn't cleanly apply it (had to do it manually)

nancydru’s picture

Worked on Drupal 6.11 and Views 6.x-2.11.

netw3rker’s picture

Issue summary: View changes
Status: Needs review » Closed (fixed)