- Issue created by @cgmonroe
It is possible to create redirects with the same source url that point to different nodes. This leads to unexpected / confusing redirect results.
This happens because the language code values used in the hash are inconsistent between the code that handles adding redirects on alias changes and the Add Redirect form.
Redirects added by alias changes on a single language site (not tested on a multi lang site) use the language from the alias record. This is the default site language, e.g. 'en'. Done in the .module update alias code.
If you add a record via the add redirect form, the language code used is based on the form language which is 'und' on single language sites. This generates a different hash than the alias change hash. This bypasses the formValidate hash check and allows to Redirect entries to created with the same path.
Need to standardize how the default language is defined. Not sure of the best way to do this.
Possibly check for single language sites in the RedirectForm code and use the site language instead of und.
This will generate identical hashes.
Will need to have code to update the language and hash setting for existing redirects. Change only internal redirects?
An alternative might be:
Check for duplicate redirect_source_path field that have 'und' or the default language set and consider these duplicates in addition to the hash test.
This would keep from doing any updates to existing redirects.
Decide on best method.
What updates, if any, need to happen.
Write code
Decide
Active
1.11
Code