This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Trouble re-installing Organic Groups - tables not created.

I had OG installed and running, but I wanted to update to the latest version (on a test site I am working on). So this is what I did:

1. Disabled OG and OG related modules.
2. Removed any OG tables in the database (there were 2)
3. Removed the og folder in modules folder.

Then I downloaded og-4.7.0.tar.gz and:

4. Uploaded the new og folder to the modules folder.
5. Enabled og and og_basic modules.

Problem is that the OG tables did not get created. I am getting this message:

variable_get strange behaviour

Hello All,

I am working on a module that will allow for the configuration of the advanced search form, i.e. which fields to show, which node types to to allow searching by etc.

In my settings function I am having a little trouble and can't seem to figure out why. variable_get is behaving strangely. I have the following code which works as expected:

$form['search_config_disable_all'] = array(
    '#type' => 'checkbox',
    '#title' => t('Disable \'Advanced search\''),
    '#default_value' => variable_get('search_config_disable_all', 0),
    '#description' => 'Disable the entire advanced search form'
  );

Now the following refuses to save the variable information:

 $form['search_config']['keywords']['or'] = array( 
    '#type' => 'checkbox',
    '#title' => t('Containing any of the words'),
    '#default_value' => variable_get('search_config_disable_or', 0)
  );

I have 3 other similar checkboxes that behave the same way.

If I do a form element with the following code:

 $form['search_config']['keywords']['blah'] = array( 
    '#type' => 'checkbox',
    '#title' => t('Just testing'),
    '#default_value' => variable_get('blah', 0)
  );

it works as expected.

This is not the first module I am developing but this is the first time I am encountering this issue. Am I just missing something very obvious? Maybe I've been looking at the code too long :).

installing new modules

I am using:
CivicSpace 0.8.5
MyPHPadmin through Yahoo

Everytime I install a new mod I get error messages that has to do with my db. All pre-installed mods work fine, so I know I am doing something wrong. Here is an example of my error messages:

user error: Table 'civicspace.new_legal_conditions' doesn't exist
query: SELECT * FROM new_legal_conditions ORDER BY tc_id DESC LIMIT 1 in /includes/database.mysql.inc on line 66.

phantom link showing up at end of "links" list when I enable custom module

I can't figure this out. I'm working with a guy on a custom module and somehow it affects all node's links. It creates a phantom link at the end of node links, like so: read more | add new comment | and that last blank is <a href=""></a>. Anyone else have a problem like this?

hook not called, don't understand why

I have module myauth.module, that implements the _auth hook as such:

Newbie Module Woes - Several Questions

Oh dear, this turned in to a longer post than I had planned. Forgive the multiple questions all together. It seemed easier than re-explaining my project over and over...

Alright, I readily admit I'm a newbie when it comes to Drupal, PhP, and MySQL. However, after reading through the example_node.module tutorial, and related material, I felt I was ready to tackle something simple. Here's the story:

I attempted to set up a simple module called 'newsletter'. Essentially, when a user creates 'newsletter' content, they provide a volume number, issue number, etc. and then supplies various article texts for the newsletter. Ideally, the submitted content is then displayed in a nice formatted newsletter-type node based on the supplied content.

Now, following the same guidelines as the example_node.module tutorial, I created my own database table using a mySQL statement like this:

   CREATE TABLE newsletter (
     vid        int(10) unsigned NOT NULL default '0',
     nid        int(10) unsigned NOT NULL default '0',
     vvolume    int(10) NOT NULL default '0',
     vissue     int(10) NOT NULL default '0',
     vt00      longtext,
     vs00      longtext,
     vb00      longtext,
...
     PRIMARY KEY (vid, nid),
     KEY `newsletter_nid` (nid)
   )

(It turns out there are over 40 fields.) My module can successfully create a newsletter node, except...

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions