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)
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

Oreps - April 12, 2007 - 01:35

I get this warning when flagging an item.

#2

Oreps - April 12, 2007 - 01:35

I get this warning when flagging an item.

#3

kbahey - April 12, 2007 - 02:34

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

kbahey - April 12, 2007 - 02:36
Category:bug report» support request
Status:active» postponed (maintainer needs more info)

#5

Oreps - April 13, 2007 - 04:20

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

Oreps - April 13, 2007 - 04:25

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

#7

kbahey - April 13, 2007 - 14:35
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?

#8

majnoona - April 25, 2007 - 17:04

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

kbahey - April 25, 2007 - 17:10

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

chanifel - February 25, 2008 - 13:07

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?

 
 

Drupal is a registered trademark of Dries Buytaert.