*

ishan

  • ****
  • 126 posts
ads cant delete from oc-admin
« on: March 01, 2022, 08:36:32 AM »
I am trying to delete ads buy listing cant delete.. Only title and description removed . see screenshot

When i try to delete ads from t_item in phpmyadmin then below error is showing

 #1451 - Cannot delete or update a parent row: a foreign key constraint fails (`****_oscl985`.`osj3_t_item_stats`, CONSTRAINT `osj3_t_item_stats_ibfk_1` FOREIGN KEY (`fk_i_item_id`) REFERENCES `osj3_t_item` (`pk_i_id`))

*

MB Themes

Re: ads cant delete from oc-admin
« Reply #1 on: March 01, 2022, 04:39:54 PM »
@ishan
Strange error, probably something is missing in database. Solution is to update this foreign key to have ON DELETE CASCADE ON UPDATE CASCADE
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

atba

  • ****
  • 193 posts
Re: ads cant delete from oc-admin
« Reply #2 on: March 02, 2022, 09:23:00 PM »
The Ghostbuster plugin will solve your problem)
osclass.by

*

MB Themes

Re: ads cant delete from oc-admin
« Reply #3 on: March 03, 2022, 05:03:19 PM »
@atba
I am not sure, I would say that this plugin will just cleanup like redundant data in dabase (without key pairing). Or am I wrong?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

atba

  • ****
  • 193 posts
Re: ads cant delete from oc-admin
« Reply #4 on: March 04, 2022, 05:46:11 PM »
I have not studied your question, but the fact that it will allow you to delete what is not deleted is no problem here
osclass.by