1. Create new page of an interactive story.
2. Add several links leading to an unfinished page (so it displays as a red link indicating it leads to a blank/nonexistent page).
3. Edit the original page with the red links.
4. Change the text.
5. Click save.
6. Error appears.
- Code: Select all
Fatal error: Uncaught exception 'SqlException' in /home/aryion/public_html/iss/sql.php:28 Stack trace: #0 /home/aryion/public_html/iss/action.php(155): sql_query('UPDATE links SE...') #1 {main} Cannot add or update a child row: a foreign key constraint fails (`aryion_istory`.`links`, CONSTRAINT `links_ibfk_3` FOREIGN KEY (`story_id`, `to_page`) REFERENCES `pages` (`story_id`, `page_num`) ON UPDATE CASCADE) :: (UPDATE links SET title = 'Sit with Ava and Loki', to_page = 0 WHERE link_id = 42567) thrown in /home/aryion/public_html/iss/sql.php on line 28