Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert homepage user of potential path conflicts with existing Site path #137

Closed
proofoftom opened this issue Mar 29, 2017 · 0 comments
Closed

Comments

@proofoftom
Copy link

@kreynen commented on Sun Feb 26 2017

Context

Because of the number of legacy patch still in the F5, we are often getting reports about errors when trying to create homepage content.

Not sure if this is something that we need in all Express sites or only in the express_homepage bundle. Check with @jwfuller

Process

  1. Login to homepage as a SO, CE, ADMIN or DEV
  2. Click Express > Content
  3. Add Content > Basic Page
  4. Under the URL path settings, uncheck Generate automatic URL alias
  5. Set the path to "test" or "123test"
  6. Click save

Expected result

You would see your node

Current result

Depending on the current legacy configuration you will see a white screen, legacy 404, of varnish 404

Possible Fix

Add validation hook that checks Atlas for potential F5 routing conflicts.


@TommyCox commented on Mon Feb 27 2017

@kreynen Does this only apply to prod? I installed a site on dev and created a TEST node which didn't seem to recreate the issue: http://www-dev.colorado.edu/p1aed93ac240/test


@jwfuller commented on Mon Feb 27 2017

It applies to all environments, the list of conflicts varies by env


@jwfuller commented on Mon Feb 27 2017

Atlas query is where={"pool":"WWWLegacy"}


@TommyCox commented on Tue Mar 28 2017

Something to be noted here: I've attempted to use hook_node_validate() to prevent a user from creating a node that conflicts with F5 routing but there's no way to get the pathauto generated path at that point. We may at best be able to emulate the behavior by copying and altering the pathauto_create_alias() function but that seems somewhat hacky. As an alternative, we can, however, check the path at hook_node_insert() and then set a warning message that the freshly created node path is a conflict.

One last thought is, using a hook_update_N(), we could populate the table of paths that are checked against for unique URLs (menu_router?) with the legacy paths so when a new node is created it'll either auto-create a unique URL or throw a message if manually attempting to enter the path.

proofoftom pushed a commit that referenced this issue Mar 29, 2017
…redirect the user to the node edit page and warn them of the conflict.
proofoftom pushed a commit that referenced this issue Mar 29, 2017
@kreynen kreynen changed the title Alert homepage user of potential path conflicts with F5 routing Alert homepage user of potential path conflicts with existing Site path Jan 24, 2018
@jwfuller jwfuller closed this as completed Jan 7, 2020
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

No branches or pull requests

2 participants