You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AjaxUniqueTextField.php does not keep in mind its current page/object. If you want to change a value on a page or dataobject, it will return an error, even though the value is unique.
I've added the check on current ID, so it'll ignore itself. This way, the check is actually on if it is unique.
In this little change, the $this->ID needs to be in the AjaxUniqueTextField call at position 5.
Becoming:
new AjaxUniqueTextField($name, $title, $restrictedField, $restrictedTable, $id, $value, $maxLength, $validationURL, $restrictedRegex)
It could probably be done better, but it works.
The text was updated successfully, but these errors were encountered:
created by: Simon
created at: 2011-04-19
original ticket: http://open.silverstripe.org/ticket/6604
The AjaxUniqueTextField.php does not keep in mind its current page/object. If you want to change a value on a page or dataobject, it will return an error, even though the value is unique.
I've added the check on current ID, so it'll ignore itself. This way, the check is actually on if it is unique.
http://sspaste.com/paste/show/4dad640063ad0
In this little change, the $this->ID needs to be in the AjaxUniqueTextField call at position 5.
Becoming:
new AjaxUniqueTextField($name, $title, $restrictedField, $restrictedTable, $id, $value, $maxLength, $validationURL, $restrictedRegex)
It could probably be done better, but it works.
The text was updated successfully, but these errors were encountered: