Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8837121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:38:48+00:00 2026-06-14T09:38:48+00:00

I have a setup where we have categories, Each category has a title and

  • 0

I have a setup where we have categories,

Each category has a title and a parent_id.

When a category is created/edited we check to ensure that no category that has the same parent_id has the same name.

That is easy.
But now I am working on deleting the categories.

The categories can have unlimited levels. so, if we delete a category it’s child categories get moved up to the categories parent. which is working fine, but I don’t know what to do in that instance when a collision occurs.

Should I do a precheck on the delete page and disable the delete button and have something like:

This category cannot be deleted as it will create a collision between the parent_of_current->something category and then current->something category please either delete or rename one of these categories.

or should I have a warning:

This action will create a collision between the parent_of_current->something category and then current->something category continuing will also delete the current->something category!

or is there something else I could do?

To be honest I like the second option, but I think that is liable to run into the same issue further down the chain if it creates another collision.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T09:38:49+00:00Added an answer on June 14, 2026 at 9:38 am

    I would rename the offending category to show it needs attention. ie moving Sales, to where Sales already exists, it becomes Sales-1 or Sales-2, so the user would then need to rename it, and prevents loss of data. (like copying and pasting a file into the same directory) This way you can tell which was the original.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table for product category that has a hierarchical structure. Each Category_ID
I have three models that I'm trying to setup: Location/Venues, Categories, and Neighborhoods. A
I have a database table with categories for different products in it. Each category
Here's the setup - I have a view that lists products. On that same
I have two tables with the following setup: category: (id, name) item: (id, name,
I have a table structure for categories, Each category can have many children, but
I have made a website that has 2 WordPress installs one for English language
I have setup a form that allows a user to make selections from drop-down
I have the following setup for my Blog Data Model: Blog Articles Categories -----
I have typical parent and child categories setup as follows: Food potatoes corn beats

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.