user warning: Unknown column 'fid' in 'field list' query: INSERT INTO flag_content (fid, eid, uid, type, timestamp) VALUES (0, 1, 1, 'node', 1176338951) in /includes/database.mysql.inc on line 172.

Comments

Oreps’s picture

I get this warning when flagging an item.

Oreps’s picture

I get this warning when flagging an item.

kbahey’s picture

Did you upgrade from an earlier version?

If you did, then you have to run update.php to get your database structure upgraded to the newest schema.

kbahey’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)
Oreps’s picture

yes, this occurred after upgrading from, i think the flag content first release to drupal 5. I did do the update.php and the updates applied. after posting the bug, i realized i received an email reporting the flagged item but its not showing up in the flagged items screen.

Thanks

Oreps’s picture

i am thinking that because i did not follow your new releases that the update.php did not change everything that was needed.

kbahey’s picture

Title: user warning: » Getting user warning: unknown column fid

I don't understand that last comment.

Did the update.php run successfully for flag_content? Did it even say there is an update number 1 for flag content to begin with? Can you check the log to see any messages relating to the update?

Here are my versions for each file. What is yours:

flag_content.info:; $Id: flag_content.info,v 1.1.2.1 2007/04/09 02:53:38 kbahey Exp $
flag_content.install:// $Id: flag_content.install,v 1.4.2.2 2007/04/11 13:40:48 kbahey Exp $
flag_content.module:// $Id: flag_content.module,v 1.6.2.4 2007/04/09 02:53:38 kbahey Exp $

Also, can you go into phpmyadmin or mysql and get me a description on how the flag_content table looks like?

micheleannj’s picture

I ran update.php and got the following errors that appear to relate to this bug.

Suggestions on how to proceed? Thanks

flag_content module
Update #1

* Failed: ALTER TABLE {flag_content} ADD fid INT NOT NULL AUTO_INCREMENT FIRST
* ALTER TABLE {flag_content} CHANGE nid eid INT NOT NULL
* ALTER TABLE {flag_content} ADD uid INT NOT NULL AFTER eid
* ALTER TABLE {flag_content} ADD type VARCHAR(10) NOT NULL AFTER uid
* ALTER TABLE {flag_content} DROP PRIMARY KEY
* Failed: ALTER TABLE {flag_content} ADD PRIMARY KEY (fid)
* ALTER TABLE {flag_content} ADD INDEX (eid)
* ALTER TABLE {flag_content} ADD INDEX (type)
* UPDATE {flag_content} SET type = 'node'

kbahey’s picture

Hi majnoona (what a nickname!)

Can you please see if the log has some more info (why exactly did the alters fail?) and paste that here.

chanifel’s picture

After I enabled this moduled, I tried to link to user by the block "Who's connected" and got this warning.
warning: Invalid argument supplied for foreach() in /home/httpd/html/snunit/drupal57/modules/user/user.module on line 1527.
what is the problem?

pomliane’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

This version of Flag content is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.