I'm encountering an error when I try to create a new quote. The module installs successfully but when I go to create a new quote I get a error message even though it says the quote has been successfully created.

* user warning: Unknown column 'aid' in 'field list' query: INSERT INTO quotes (nid, vid, aid, citation, promote) VALUES (2, 2, '2', 'Quote Citation', 1) in /Users/jesse/Sites/drupal6/sites/all/modules/quotes/quotes.module on line 333.
* user warning: Unknown column 'aid' in 'from clause' query: SELECT a.aid AS quotes_aid, a.name AS quotes_author, a.bio AS quotes_bio, q.citation AS quotes_citation, q.promote AS quotes_promote FROM quotes q JOIN quotes_authors a USING (aid) WHERE q.vid = 2 in /Users/jesse/Sites/drupal6/sites/all/modules/quotes/quotes.module on line 277.
* user warning: Unknown column 'aid' in 'from clause' query: SELECT a.aid AS quotes_aid, a.name AS quotes_author, a.bio AS quotes_bio, q.citation AS quotes_citation, q.promote AS quotes_promote FROM quotes q JOIN quotes_authors a USING (aid) WHERE q.vid = 1 in /Users/jesse/Sites/drupal6/sites/all/modules/quotes/quotes.module on line 277.

When actually visiting the quote's node the quote body content appears but without the author or citation. I also get the the error message:

* user warning: Unknown column 'aid' in 'from clause' query: SELECT a.aid AS quotes_aid, a.name AS quotes_author, a.bio AS quotes_bio, q.citation AS quotes_citation, q.promote AS quotes_promote FROM quotes q JOIN quotes_authors a USING (aid) WHERE q.vid = 2 in /Users/jesse/Sites/drupal6/sites/all/modules/quotes/quotes.module on line 277.
* user warning: Unknown column 'aid' in 'from clause' query: SELECT a.aid AS quotes_aid, a.name AS quotes_author, a.bio AS quotes_bio, q.citation AS quotes_citation, q.promote AS quotes_promote FROM quotes q JOIN quotes_authors a USING (aid) WHERE q.vid = 1 in /Users/jesse/Sites/drupal6/sites/all/modules/quotes/quotes.module on line 277.

What is wrong with this 'aid' column? I'm using a fresh Drupal 6 and the latest alpha5 of the quotes module.

I've used the 5.x version of this module on lots of Drupal 5 sites and would really like to start using it in 6. Any help would be most appreciated.

Comments

nancydru’s picture

Did you run update.php like you're supposed to do every time you update a module? In this case it is critical.

waxstreet’s picture

I am having the same issue, and I did run the update.php

greta_drupal’s picture

Getting the same error on a fresh Drupal 6.2 install, first time install on module. When I looked in the QUOTES table (the error referenced table), there is no column "aid". There is a column "nid" and a "vid" but no "aid".

I added a new field "aid" (no quotes, of course) with same attributes as the other IDs and the error clears and the author text is stored.

marchanda’s picture

Thanks for the fix! Works great now.

nancydru’s picture

Assigned: Unassigned » nancydru
Status: Active » Fixed

There was an error in the install code; I have fixed it and committed it to -dev.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

cym0ej12’s picture

i created a new field as greta_drupal said above and it works well now, but i can't delete any quotes ?!?

nancydru’s picture

Putting a comment on a closed issue is a good way to be ignored. Please open a new issue referencing this one.

motivez’s picture

Version: 6.x-1.1-alpha5 » 6.x-1.x-dev
Status: Closed (fixed) » Active

I am updating this to active because I'm experiencing what I believe is the same issue with the 'dev' version.

I updated after reading that you had committed a patch, so I deleted the quote I had tried to add earlier, ran update.php, re-added the quote, but it still does not show up in the block I created, and I'm still getting this error:

Location quotes
Referrer /node/add/quotes
Message Unknown column 'DATABASENAME.q.aid' in 'on clause' query: SELECT a.aid AS quotes_aid, a.name AS quotes_author, a.bio AS quotes_bio, q.citation AS quotes_citation, q.promote AS quotes_promote FROM quotes q JOIN quotes_authors a USING (aid) WHERE q.vid = 12 in ../modules/quotes/quotes.module on line 277.

motivez’s picture

Status: Active » Closed (fixed)

After two uninstalls and reinstalls, this suddenly started working. I'm not sure why, but I'll go ahead and re-close this.