Some tables are not built
| Project: | Advertisement |
| Version: | 6.x-2.1-rc1 |
| Component: | installation |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Hello, Jeremy.
I know that this is most probably not a problem with the ad module. I installed it in a shared host account (1and1) that first had PHP4, uninstalled, killed all ad tables left and installed again when PHP5 was activated.
Everything was apparently OK, until I began to create ads. Received messages that the ad_owners and ad_permissions tables didn't exist.
So I installed the very same DEV version (April 10th) in yet another server I use for testing and 19 tables were created.
Then checked the troubled database to find that the ad_external and ad_hosts tables were also absent.
Just to know what to ask/claim to 1and1, what could be happening? Do you have any idea? Or do I just switch hosting service?
Thank you in advance.
Warm regards from sunny México!
:-)
José

#1
Do you get any errors when you install the module?
#2
Thanks, Jeremy for your prompt reply. :-)
No, I had no error message whatsoever.
José
#3
Hm, I know of no reason why tables would not be created -- I would expect errors. I'm not sure what else to offer you. Perhaps try creating the tables manually? You'll have to figure out the correct schema from the ad.install file.
#4
Yep! I'll study ad.install plus the missing files (that did build in my testing site) tomorrow early [I'm at my day job, right now, ;-) ]..
Lots of thanks, Jeremy.
Regards
José :-)
#5
there is a some table which are not build during installation. Here are some patch i create:
just run usual SQL in phpmyadmin:
ALTER TABLE `ad_channel` ADD `no_channel_weight` TINYINT( 4 ) NOT NULL DEFAULT '0'#6
Regarding errors, I get one (6.x-2.0-beta6), when trying to add a new channel:
user warning: Unknown column 'no_channel_weight' in 'field list' query: INSERT INTO ad_channel (name, description, conid, weight, display, urls, groups, no_channel_weight) VALUES('Some name of channel', '', 0, -1, 0, 's:0:\"\";', 'a:1:{i:1;i:1;}', 100) in /...<path-to-site>.../sites/default/modules/ad/channel/ad_channel.module on line 1092.#7
After running parasolx's SQL query (
ALTER TABLE `ad_channel` ADD `no_channel_weight` TINYINT( 4 ) NOT NULL DEFAULT '0') I can successfully add channels.#8
Indeed, the no_channel_weight column is missing in the ad_channel definition if you are installing the module for the first time -- it only gets created if you're upgrading. Fix committed. Anyone that runs into this problem can simply visit update.php and force update 003 to run.
In any case, this is not what the original issue was referring to -- he was referring to entire tables being missing. Please, let's keep the issue on topic.
#9
Click filter module is not checking whether ad_owners module has been enabled, therefore resulting with errors stating that the table does not exist. When the module is not enabled that is.
#10
I'm not sure if I should submit a new issue or use this one.
I have exactly the same problem as the person starting this issue. The ad_owners and ad_permissions tables aren't being built. Completely uninstalling the module (including dbase tables) didn't help. All standard modules that come with advertisement are (and were) enabled and I'm using 6.x-2.0
I don't have enough MySQL knowledge to convert the install files to MYSQL commands, can someone give me the mysql install schema for both tables? That would be greatly appreciated.
Even if it does work after that this still seems to be a bug that appears is rare circumstances. I have a dedicated server with php5 and mysql5.
The errors look like this:
user warning: Table 'drupal.ad_owners' doesn't exist query: SELECT oid FROM ad_owners WHERE aid = 0 AND uid = 0 in *******/ad_notify.module on line 273.
#11
I am getting a similar error as a result of the the remnant table not being built. The error is thrown on line 666 of the ad_channel.module
user warning: Table 'cXXXX.drupal_ad_channel_remnant' doesn't exist query: SELECT remnant FROM drupal_ad_channel_remnant WHERE aid = 6 in /sites/all/modules/ad/channel/ad_channel.module on line 666.
#12
@celtictigger: that is a different bug and it is fixed in the latest development snapshot.
@Pixelstyle: did you enable the ad_owners module?
#13
@mehmeta: thanks, patch committed. Marking this bug as fixed, hopefully that was indeed the problem.
#14
Automatically closed -- issue fixed for 2 weeks with no activity.