magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.51k stars 9.31k forks source link

Opinion: URL Rewrite management should be read only for users and not considered a redirect tool #30989

Closed aliomattux closed 3 years ago

aliomattux commented 3 years ago

Description: Magento 2 provides out of box a tool under Marketing > SEO & Search > URL Rewrites. This tool allows anyone with access to delete any URL, including system generated URL's. It also is intended to allow users to create custom redirects.

Opinion: this tool cannot be used as intended. This tool should become readonly and not changeable by users. Magento should introduce a new storage and delivery system for redirects.

Why? Several reasons

  1. There is a constraint that each URL be unique. This alone eliminates the ability to redirect a product from A to B. When you create a product, a URL is generated for the system in url_rewrite for the product and every combination of category. The format is request_url = url_key, and target = catalog/product/id, etc. Because the system generates this URL, it is impossible to redirect the url to any other location due to constraint. If you attempt to create a custom redirect, you will receive an error that the request path already exists. This forces users to either delete the system URL which is improper and should not be allowed, or to go around Magento and use a webserver redirect. Note that business process for redirects varies greatly depending on company practice. Some companies would leave the URL available and say not available for purchase, some companies would make the page 404, and others would redirect that request to either another product or a category/landing page. The greatest flexibility is to create a request url and target url.

  2. If a user deletes the system url, and saves either ANY category that the product is associated with or the product itself, the system will attempt to regenerate the URL and prevent the user from saving. The same problem can happen if the user creates a URL redirect and then later attempts to change the category or product url to match. Some of these are practice issues, however the system "allows" this behavior. The user is not aware they may have created a problem. This creates a "Nightmare" scenario for developers as users will repeatedly report problems and inability to save. Each URL issue must be investigated.

Preconditions (*)

Version: 2.3.3, probably all versions

Steps to reproduce (*)

  1. Create product A. Assign to category A. Save product

  2. Create redirect from A to B. Error is received and cannot create redirect

  3. Delete system url redirect

  4. Create custom url redirect

  5. Save category or product with no changes Error is received

Expected result (*)

Actual result (*)

  1. Allow users to create 301 redirects for products no longer sold
  2. Do not allow users to delete system urls arbitrarily

The tool is marketed as an SEO tool, but it is a critical part of the core program!


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

m2-assistant[bot] commented 3 years ago

Hi @aliomattux. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

m2-assistant[bot] commented 3 years ago

Hi @engcom-Delta. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Delta commented 3 years ago

Hi @aliomattux thank you for your report. Looks like it is not an issue as you could restrict access for URL Rewrites using User Roles Manual testing scenario:

Result: :heavy_check_mark: URL Rewrites is not shown image

Is User Roles functionality not enough for your purpose?

aliomattux commented 3 years ago

Hello,

You can go ahead and close the ticket, but to answer your question, no permissions do not solve the issue. My feedback was Magento rewrite system functionality is incompatible with how standard practice is carried out for redirects. I believe the feature of redirect is mislabeled. See my original post for details.

On Wed, Feb 3, 2021 at 7:49 AM Vasyl Shvorak notifications@github.com wrote:

Hi @aliomattux https://github.com/aliomattux thank you for your report. Looks like it is not an issue as you could restrict access for URL Rewrites using User Roles Manual testing scenario:

Result: ✔️ URL Rewrites is not shown [image: image] https://user-images.githubusercontent.com/51681379/106754880-2af68c00-6636-11eb-9712-9077bbce5396.png

Is User Roles functionality not enough for your purpose?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/30989#issuecomment-772519608, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIAVCNXKWPXERZR6HAABODS5FIADANCNFSM4T3YPRFA .

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions!