sebduggan / muraURLTools

Mura plugin for managing alternative URLs and redirection
10 stars 11 forks source link

Don't allow duplicate Alternate URL #11

Closed kcits closed 11 years ago

kcits commented 12 years ago

It would be great if the system notified you when you have applied an Alternate URL more than once.

sebduggan commented 11 years ago

Could be tricky, because the values are saved as part of the general content save.

I will look into a beforeSave event hook which checks for duplicates; not quite sure how to handle it if a duplicate is found. I don't know if it's possible to cancel the save procedure and display a server-side error...

sebduggan commented 11 years ago

On investigation (and a pointer from Matt at BlueRiver), this shouldn't actually be too difficult.

On attempting to save content with alternate URLs which duplicate existing ones, the save will fail and an error will be displayed, showing which alternate URL has a conflict, and on which page the duplicate exists.

Expect to see it in the next release!

sebduggan commented 11 years ago

Checking for duplicate alternate URLs is now implemented, as well as checking to see if an alternate URL already exists as the main URL for a page.