I'm getting a v strange error having installed beauty tips as part of a feature:

Table .beautytips_manager doesn't exist query: SELECT * FROM beautytips_manager in beautytips_manager.module on line 391.

(NB I have replaced the actual site name with in the error message.

I'm installing the three BT modules as part of a feature with settings exported to the database via strongarm. For some reason when I install the custom feature, the beautytips_manager table is not created in the database.

I'm going to try stripping the site back to bare bones and install from there to see whether I can track this through. I'll post more if I find anything.

Cheers,
Crom

Comments

Crom’s picture

Just in case anyone runs into the same error, what I think is happening is that calendar_multiday (which I am activating from within the same feature as I'm activating beautytips from) is knackering the feature install which means that beautytips never gets properly installed. What also happens is that this problem with the way I was doing it is that you can never install beautytips manager - I tried uninstalling and re-installing etc.

The way to do it is to add calendar_multiday in it's own separate features if you want or just activate it manually. This is a known problem with the module (6.x-2.4), see: http://drupal.org/node/999708

Cheers,
Crom

kleinmp’s picture

Category: bug » support
Status: Active » Closed (fixed)
Crom’s picture

Status: Closed (fixed) » Active

Apologies kleinmp,

This bug still stands and disregard my explanation in #1. Additionally my original report was a symptom of the underlying problem rather than the problem itself. The problem arises when installing the beautytips manager module under windows and occurs because default values are set within the schema. See here for a better explanation of the issue: http://bugs.mysql.com/bug.php?id=25520

For a similar bug see here: http://drupal.org/node/143881

If you remove the default values for 'content' and 'pages' within the schema function the module installs correctly under windows.

Sorry, no patch but here is the adjusted function from beautytips_manager.install

function beautytips_manager_schema() {
  $schema = array();
  $schema['beautytips_manager'] = array(
   'description' => t('Store custom defined beautytips.'), 
    'fields' => array(
      'bid' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'description' => t('The unique id for the custom beautytip.'),
      ),
      'element' => array(
        'type' => 'varchar',
        'length' => 255, 
        'description' => t('The element to which this beautytips will be applied.'),
      ), 
      'content_type' => array(
        'type' => 'varchar',
        'length' => 64, 
        'description' => t('What kind of content will be grabbed for the display.'),
      ),
      'content' => array(
        'type' => 'text',
        'description' => t('The content that will be displayed. Depends on content type.'),
      ),
      'trigger_on' => array(
        'type' => 'varchar',
        'length' => 255, 
        'description' => t('The event that will turn the beautytips on.'),
      ),
      'trigger_off' => array(
        'type' => 'varchar',
        'length' => 255, 
        'description' => t('The event that will turn the beautytips off.'),
      ),
      'style' => array(
        'type' => 'varchar',
        'length' => 255, 
        'description' => t('The style of the beautytip.'),
      ),
      'shrink' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'size' => 'tiny',
        'decription' => t('Whether or to shrink to fit.'),
      ),
      'positions' => array(
        'type' => 'varchar',
        'length' => 64,
        'default' => '',
        'description' => t('The position order in which this beautytip should display.'),
      ),
      'animation_on' => array(
        'type' => 'varchar',
        'length' => 255, 
        'description' => t('The animation that will occurs when the beautytips turns on.'),
      ),
      'animation_off' => array(
        'type' => 'varchar',
        'length' => 255, 
        'description' => t('The animation that will occurs when the beautytips turns off.'),
      ),
      'visibility' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'size' => 'tiny',
        'description' => t('Flag to indicate how to show beautytips on pages. (0 = Show on all pages except listed pages, 1 = Show only on listed pages, 2 = Use custom PHP code to determine visibility)'),
      ),
      'pages' => array(
        'type' => 'text',
        'not null' => TRUE,
        'description' => t('Contains a list of paths on which to include/exclude the beautytip, depending on "visibility" setting.'),
      ),
    ),
    'primary key' => array('bid'),
  );
  return $schema;
}

Cheers,
Crom

kleinmp’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Category: support » bug

It looks like this is the same issue as #195169: NOT NULL fields need default value. MySQL running in strict mode will not take a default value for text fields.

The solution they used was to not set a default value in the table definition and to ensure that the value of that field was always set to '' if empty. So, that will have to be done with this module.

kleinmp’s picture

Title: Table beautytips_manager doesn't exist » Table won't install if MySQL is running in strict mode
drewish’s picture

Title: Table won't install if MySQL is running in strict mode » Mysql TEXT fields shouldn't have default values
Version: 7.x-2.x-dev » 6.x-2.x-dev

The 7.x-2.x branch had this fixed as part of #1060970: Update beautytips manager to use Drupal 7. Fixing the title to make it clearer.

kleinmp’s picture

Status: Active » Fixed

Fixed this in the 6.x-2.x-dev with this commit.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.