Getting user warning: unknown column fid
Oreps - April 12, 2007 - 00:50
| Project: | Flag content |
| Version: | 5.x-2.1 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
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.

#1
I get this warning when flagging an item.
#2
I get this warning when flagging an item.
#3
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.
#4
#5
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
#6
i am thinking that because i did not follow your new releases that the update.php did not change everything that was needed.
#7
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?
#8
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'
#9
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.
#10
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?