Can't Delete Interactive Story Pages?

News for this website will be posted here. Mostly Technical.
Forum rules
This forum is for technical discussion regarding the portal and vore itself.

Generally speaking, if you have something that needs moderator attention, you should simply Private message Eka. That includes any bug report, error report, violation report, outage report, suggestion, feature request. Etc.

Most topics will be locked as soon as they are acknowledged. Due to the nature that not many people can do anything regarding a technical issue. In that case, if you need something unlocked for any reason. Feel free to message Eka directly.

Can't Delete Interactive Story Pages?

Postby CuddleSlut » Wed Jan 09, 2019 3:45 am

So, I tried to deleted a couple of pages from my interactive story, and this happened:

"Fatal error: Uncaught exception 'SqlException' in /home/aryion/public_html/iss/sql.php:28 Stack trace: #0 /home/aryion/public_html/iss/action.php(304): sql_query('DELETE FROM pag...') #1 {main} Cannot delete or update a parent 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) :: (DELETE FROM pages WHERE story_id = 817 AND page_num = 10 LIMIT 1) thrown in /home/aryion/public_html/iss/sql.php on line 28"

Could someone help me with this, please?
I like eating, getting eaten, men, women and whole lot of other kinky stuff.

Wanna roleplay?
User avatar
CuddleSlut
New to the forum
 
Posts: 18
Joined: Sat Oct 06, 2018 2:16 pm

Re: Can't Delete Interactive Story Pages?

Postby Aces » Wed Jan 09, 2019 6:27 am

This has been an ongoing issue that I'm convinced will never be resolved. I know I've at least complained about it before.

Which sucks, because I get a lot of trash contributions to my stories that, combined with my inability to block users selectively, means either everyone can contribute to my story, or nobody can.

My only choice is to edit over other people's shit contributions, but their name stays on the credit for the page even if I delete everything and rewrite it.
Image
User avatar
Aces
Advanced Vorarephile
 
Posts: 770
Joined: Sun Sep 24, 2006 11:00 pm
Blog: View Blog (95)

Re: Can't Delete Interactive Story Pages?

Postby Eka » Wed Jan 09, 2019 8:02 pm

It is just a child relationship issue with the page. If you take the time to short out and make sure you don't leave orphan link and page you should have no problem deleting all the pages.

I do agree the display of Link and connected page are tedious and the relationship can be hard to miss. We will fix it when we can get around to it. For now, the best way to deal with that is either ignore the error. Just leave the page be. Or make sure you go through all your link and page relationship to clear everything out before attempting to delete a page.
User avatar
Eka
Administrator
 
Posts: 4206
Joined: Fri May 13, 2005 11:00 pm
Location: Canada
Blog: View Blog (6)

Re: Can't Delete Interactive Story Pages?

Postby Aces » Thu Jan 10, 2019 5:44 am

Eka wrote:It is just a child relationship issue with the page. If you take the time to short out and make sure you don't leave orphan link and page you should have no problem deleting all the pages.

I do agree the display of Link and connected page are tedious and the relationship can be hard to miss. We will fix it when we can get around to it. For now, the best way to deal with that is either ignore the error. Just leave the page be. Or make sure you go through all your link and page relationship to clear everything out before attempting to delete a page.


To do this is impossible.

Reason being that there's another error that occurs if you try to delete a link that still leads to a page.

For example, if I try to delete this page https://aryion.com/iss/page.php?story=727&page=145 this page is a dead end. Nothing else leads to it except for one and only one link, which is located on this page https://aryion.com/iss/page.php?story=727&page=14 that has become my de-facto trash bin.

But if I try to delete that link, it says, "Error: Cannot delete this link because it would make Page 145 unreachable."

So Page 145 has nothing going out, and only one thing going in. If I understand you correctly, I need to delete that one thing going in to delete the page. I cannot do that because I also can't delete that last link.
Image
User avatar
Aces
Advanced Vorarephile
 
Posts: 770
Joined: Sun Sep 24, 2006 11:00 pm
Blog: View Blog (95)

Re: Can't Delete Interactive Story Pages?

Postby Eka » Thu Jan 10, 2019 11:52 am

You can create a link that lead to the page first. Then delete the page before delete the link.
User avatar
Eka
Administrator
 
Posts: 4206
Joined: Fri May 13, 2005 11:00 pm
Location: Canada
Blog: View Blog (6)

Re: Can't Delete Interactive Story Pages?

Postby Aces » Thu Jan 10, 2019 12:28 pm

Eka wrote:You can create a link that lead to the page first. Then delete the page before delete the link.


Error: You cannot delete this page because other pages are linking to it:
Page 14 links to this page.


So you can't delete the page without deleting the link but you can't delete the link without deleting the page.
Image
User avatar
Aces
Advanced Vorarephile
 
Posts: 770
Joined: Sun Sep 24, 2006 11:00 pm
Blog: View Blog (95)

Re: Can't Delete Interactive Story Pages?

Postby Eka » Thu Jan 10, 2019 12:31 pm

Aces wrote:
Eka wrote:You can create a link that lead to the page first. Then delete the page before delete the link.


Error: You cannot delete this page because other pages are linking to it:
Page 14 links to this page.


So you can't delete the page without deleting the link but you can't delete the link without deleting the page.


Which page(s) in specific is it you are talking about? Let me take a look.
User avatar
Eka
Administrator
 
Posts: 4206
Joined: Fri May 13, 2005 11:00 pm
Location: Canada
Blog: View Blog (6)

Re: Can't Delete Interactive Story Pages?

Postby Aces » Thu Jan 10, 2019 5:12 pm

It's not specific to any page or any story. Every page of every interactive story I have created on this site has so far had the same problem.

I made a brand new page just to prove the point that pages can never be deleted.

https://aryion.com/iss/page.php?story=727&page=259 <- Deleting this page produces an SQL error as seen in OP's post.
Fatal error: Uncaught exception 'SqlException' in /home/aryion/public_html/iss/sql.php:28 Stack trace: #0 /home/aryion/public_html/iss/action.php(304): sql_query('DELETE FROM pag...') #1 {main} Cannot delete or update a parent 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) :: (DELETE FROM pages WHERE story_id = 727 AND page_num = 259 LIMIT 1) thrown in /home/aryion/public_html/iss/sql.php on line 28


https://aryion.com/iss/page.php?story=727&page=145 <- Deleting this page produces an error that you cannot delete pages because other pages link to it.
Error: You cannot delete this page because other pages are linking to it:
Page 14 links to this page.
Page 14 links to this page.


Note, the one complaining about page 14 lists it as doing so twice because there's two links on the same page. If I delete one of those links, but leave the other, I just end up with that SQL error instead.
Image
User avatar
Aces
Advanced Vorarephile
 
Posts: 770
Joined: Sun Sep 24, 2006 11:00 pm
Blog: View Blog (95)

Re: Can't Delete Interactive Story Pages?

Postby Eka » Thu Jan 10, 2019 5:24 pm

Aces wrote:It's not specific to any page or any story. Every page of every interactive story I have created on this site has so far had the same problem.

I made a brand new page just to prove the point that pages can never be deleted.

https://aryion.com/iss/page.php?story=727&page=259 <- Deleting this page produces an SQL error as seen in OP's post.
Fatal error: Uncaught exception 'SqlException' in /home/aryion/public_html/iss/sql.php:28 Stack trace: #0 /home/aryion/public_html/iss/action.php(304): sql_query('DELETE FROM pag...') #1 {main} Cannot delete or update a parent 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) :: (DELETE FROM pages WHERE story_id = 727 AND page_num = 259 LIMIT 1) thrown in /home/aryion/public_html/iss/sql.php on line 28


https://aryion.com/iss/page.php?story=727&page=145 <- Deleting this page produces an error that you cannot delete pages because other pages link to it.
Error: You cannot delete this page because other pages are linking to it:
Page 14 links to this page.
Page 14 links to this page.


Note, the one complaining about page 14 lists it as doing so twice because there's two links on the same page. If I delete one of those links, but leave the other, I just end up with that SQL error instead.


Looks like this is a problem with the constraint inherited from previously undeleted page. To avoid this you will have to avoid creating a constraint from the very beginning of the creation of a story.

We will get around to making safe guard against creating these problem in the first place when we have a chance.
User avatar
Eka
Administrator
 
Posts: 4206
Joined: Fri May 13, 2005 11:00 pm
Location: Canada
Blog: View Blog (6)


Return to Technical stuff

Who is online

Users browsing this forum: No registered users and 2 guests