@shahmayur001
Eliminate the risk that a Taxon, Product, Page or Taxonomy are available on more than one URL
Desired Outcome
Currently if a resource changes slug, the old slug remains available with identical information.
The desired outcome is the following:
- Removed slugs redirect to the new slug of the same resource it was previously associated to via a
301 redirect as defined here;
- If the removed slug is reoccupied again by a new or preexisting resource the 301 needs to be removed in favor of the (new) resource and return to a standard 200 response rendering the page.
- Deleted resources produce no redirect and return
404.
Considerations
- It was discussed in slack to use a polymorphic table
- this solution does not leverage rack but provides within the rails app legacy urls for resources
- the benefit is that it does not require additional gems (eg solidus_redirector or rack_redirect) to be loaded
- this solution can be overtaken to other gem imported resources such as a blog
- the solution has already been used by the maintainers in the past and was deemed acceptable by the maintainers of solidus
- the solution can be replicated within other content gems without requiring additional gems
- the current solution does not manage reoccupation of
legacy slugs
- a management interface needs to be defined on product (and maybe variant) level to remove redirects that are not needed anymore
Mockup Management Interface
Expected behavior
A 301 redirect from old slugs to new slug.
Conversation with maintainers:
Additional conversation with the maintainers:
Fabian:
Some additional thoughts would be to throw it into a polymorphic table to render the high level functionality also accessible to other ressources such as pages and blog articles. Would that work for you?
5:28
Thomas:
If a new product is made with the same slug as an old product it should win over the old product. It has most likely been replaced by it and shops can explain this in ie. the product description. Everything else is too complex and should be handled by cusotm business logic (product life cycles, etc.)
An interface would be nice but is optional (same for API)
Polymorphic is fine, as we already need it for products and taxons
@shahmayur001
Eliminate the risk that a Taxon, Product, Page or Taxonomy are available on more than one URL
Desired Outcome
Currently if a resource changes slug, the old slug remains available with identical information.
The desired outcome is the following:
301redirect as defined here;404.Considerations
legacy slugsMockup Management Interface
Expected behavior
A 301 redirect from old slugs to new slug.
Conversation with maintainers:
Additional conversation with the maintainers:
Fabian:
Thomas: