Jump to content

[SOLVED]Custom field data not saving


beerguts

Recommended Posts

Thanks Nabeel.

This is what I am getting....

Backtrace: DB::write_debug > DB::query > PilotData::SaveFields > PilotAdmin->viewpilots > call_user_func_array > MainController::RunAllActions

Query: INSERT INTO phpvms_fieldvalues (fieldid, pilotid, value) VALUES (2, 1, '1234567')

Error: (1452) - Cannot add or update a child row: a foreign key constraint fails (`mysite/phpvms_fieldvalues`, CONSTRAINT `phpvms_fieldvalues_ibfk_2` FOREIGN KEY (`pilotid`) REFERENCES `phpvms_zzzz` (`pilotid`) ON DELETE CASCADE)

=====

The thing is phpvms_zzzz doesn't exist. I believe it was a table used early on to replicate the pilots table but since has been deleted.

Link to comment
Share on other sites

  • Administrators

Try this - in the phpvms fieldvalues table, using phpMyAdmin, find this FOREIGN KEY:

phpvms_fieldvalues_ibfk_2

Delete that... Probably when the pilots table was duplicated, there was a second key added which didn't get removed. The error is coming from that field values action though, so that's a good thing

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...