When attempting to view the /analytics page by clicking on the "Click here to view the analytics page" link on the Quant admin page (/admin/config/media/quant), I receive this nasty error:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dbnamehere.og' doesn't exist: SELECT n.created FROM {og} og INNER JOIN {node} n ON og.gid = n.nid WHERE n.created >= :period ORDER BY n.created DESC ; Array ( [:period] => 1343117098 ) in Quant->execute_query() (line 110 of /home/account/public_html/drupal/sites/all/modules/quant/plugins/Quant.inc).

Any ideas on how to fix this as it renders the module useless?

Is is the extension on the 'dbnamehere_db1.og" database name? Shouldn't that be .sql? (no idea, complete guess)

Comments

deanflory’s picture

Title: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ecudchi_db1.og' doesn't exist: » PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dbnamehere.og' doesn't exist:
mstef’s picture

Status: Active » Postponed (maintainer needs more info)

At first glance, I'd say there was something wrong with your settings.php, but I would think that you wouldn't even be able to get to the quant page with a mis-configured database...

Can you double check your database settings there and make sure it's right?

deanflory’s picture

Site's working fine off the db for months and other areas of the site have no issues, just that one page.

I just had reviewed my settings.php file when updating to D7.15 a few days ago, so it's all correct there.

mstef’s picture

I can't reproduce this... and the error you're getting is really strange to me..

Table 'dbnamehere.og' doesn't exist: SELECT n.created FROM {og} og INNER JOIN {node} n ON og.gid = n.nid WHERE n.created >= :period ORDER BY n.created DESC ; Array ( [:period] => 1343117098 )

Why would it be looking for dbnamehere.og, yet if you look at the query the tables are obviously og and node

Can you install quant and og on a clean Drupal 7 installation and see if you're still getting this?

deanflory’s picture

I just disabled, uninstalled and re-enabled Quant on my tons-of-modules D7.15 install and got this error when visiting /admin/reports/analytics:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dbnamehere.og' doesn't exist: SELECT n.created FROM {og} og INNER JOIN {node} n ON og.gid = n.nid WHERE n.created >= :period ORDER BY n.created DESC ; Array ( [:period] => 1343625873 ) in Quant->execute_query() (line 110 of /home/account/public_html/drupal/sites/all/modules/quant/plugins/Quant.inc).

I don't really have enough time right now to do a clean install in a clean account, but will do so if I end up having more free time when this project is over. Clearly there is some incompatibility with another module since I get errors on both the /analytics reports page and the /admin/reports/analytics page (destination deemed by another module that automatically redirects to a module's config page when a module is installed).

I am able to set and save the configs at /admin/config/media/quant.

I don't know much at all about Drupal programming of modules, but could it have to do with permissions related to content types allowed to be posted into groups? The only reason I say that is the mention of "og" and "og.gid" in the errors.

The Organic Groups modules I have installed that have anything to do with OG are:

og (Organic groups)
og_views (Organic groups Views integration)
og_book_inheritance (OG book inheritance)
og_email_blast (Organic groups e-mail blast )
og_notifications (Organic groups notifications)
og_access (Organic groups access control)
og_ui (Organic groups UI)
og_field_access (Organic groups field access)
og_register (Organic groups register)
context_admin_og (Organic groups context)
heartbeat_og (Heartbeat Organic Groups)
profile2og_access (Profile2 group access) <----- wondering if this is doing it? uninstalling that module as I don't need it, will report here if that made a difference.

chart (Google chart API "Chart API")
chart_views (Chart API Views Integration)
system_charts (Drupal System Charting)

mstef’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

I don't know much at all about Drupal programming of modules, but could it have to do with permissions related to content types allowed to be posted into groups? The only reason I say that is the mention of "og" and "og.gid" in the errors.

No, this doesn't have anything to do with permissions. Something is ruining the query. The "og.gid", means that we're using the "gid" field on the "og" table.

Table 'dbnamehere.og'

I'm sorry, but I'm marking this up to a conflict with another contributed module (no idea which). I'd say something is rewriting the query and screwing it up. For some reason, the query is looking for 'dbnamehere.og', which makes no sense to me. You can grep the entire Quant module and you won't find any mention of that. I just installed the latest Quant and OG on a clean D7, and it works fine.

There's really nothing more I can do from here. Please let me know if you find anything else out. I would strongly recommend disabling one module at a time until you're down to nothing but quant and og.

Feel free to reopen if you find any more info.

etron770’s picture

In My case two tables where missing an I run the following SQL commands with PHPmyadmin:

CREATE TABLE IF NOT EXISTS `search_node_links` (
`sid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'The search_dataset.sid of the searchable item containing the link to the node.',
`type` varchar(16) NOT NULL DEFAULT '' COMMENT 'The search_dataset.type of the searchable item containing the link to the node.',
`nid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'The node.nid that this item links to.',
`caption` longtext COMMENT 'The text used to link to the node.nid.',
PRIMARY KEY (`sid`,`type`,`nid`),
KEY `nid` (`nid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores items (like nodes) that link to other nodes, used...';

CREATE TABLE IF NOT EXISTS `search_total` (
`word` varchar(50) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique word in the search index.',
`count` float DEFAULT NULL COMMENT 'The count of the word in the index using Zipf’s law to equalize the probability distribution.',
PRIMARY KEY (`word`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores search totals for words.';

mstef’s picture

@etron770, does that have anything to do with this issue/module?

etron770’s picture

uups ... sorry I hit the wrong tab in the browser to post the answer ...

mstef’s picture

Status: Closed (cannot reproduce) » Closed (duplicate)

Conversation reopened at: #1818798: OG 7.x-2.x not supported

mstef’s picture

Issue summary: View changes

need to change db name in title