Skip to content

Fix category edit#14478

Merged
danielkerr merged 2 commits intoopencart:masterfrom
stalker780:master
Feb 14, 2025
Merged

Fix category edit#14478
danielkerr merged 2 commits intoopencart:masterfrom
stalker780:master

Conversation

@stalker780
Copy link
Copy Markdown
Contributor

@stalker780 stalker780 commented Feb 3, 2025

Editing category with childs destroys their seo_urls and paths

  1. Try saving category Components on latest master

  2. All child categories get broken paths

image

  1. All child categories get broken urls

image

Editing category with childs destroys their seo_urls and paths now
@opencartbot
Copy link
Copy Markdown
Contributor

Bad implementation from the beginning.
When we edit a category - all its parent and children categories get a new SEO URL.
If I want to make a category SEO URL without its parent categories, I can do it via Design > SEO URL. But as soon as I edit a category - all SEO URLs including parents will be rewritten and parents will be added back to the category SEO URL.

@stalker780
Copy link
Copy Markdown
Contributor Author

@opencartbot
At least my solution fixes the destructive behavior.
I understand that categories usually are not edited very often. But in my situation the content manager changed one line in the first level category description and saved it. As a result we got over 200 destroyed category seo_urls. And of course this was noticed much later, when we started getting 404 errors in Google Search console.

@opencartbot
Copy link
Copy Markdown
Contributor

Yes, I just noticed this issue today and your PR solves it.
Thanks!

@mhcwebdesign
Copy link
Copy Markdown
Contributor

@opencartbot At least my solution fixes the destructive behavior. I understand that categories usually are not edited very often. But in my situation the content manager changed one line in the first level category description and saved it. As a result we got over 200 destroyed category seo_urls. And of course this was noticed much later, when we started getting 404 errors in Google Search console.

I have created a pull-request for this which just uses the editCategory logic taken from OC 4.0.2.3 where this issue didn't exist, see #14501

@danielkerr danielkerr merged commit 819c112 into opencart:master Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants