mirror of
https://github.com/processwire/processwire.git
synced 2025-08-08 15:57:01 +02:00
Update RepeaterPage class for secondary detection of 'forField' when page exists in unexpected location
This commit is contained in:
@@ -685,7 +685,10 @@ class PagesEditor extends Wire {
|
||||
try {
|
||||
$field->type->savePageField($page, $field);
|
||||
} catch(\Exception $e) {
|
||||
$error = sprintf($this->_('Error saving field "%s"'), $name) . ' - ' . $e->getMessage();
|
||||
$label = $field->getLabel();
|
||||
$message = $e->getMessage();
|
||||
if(strpos($message, $label) !== false) $label = $name;
|
||||
$error = sprintf($this->_('Error saving field "%s"'), $label) . ' — ' . $message;
|
||||
$this->trackException($e, true, $error);
|
||||
if($this->wire('database')->inTransaction()) throw $e;
|
||||
}
|
||||
|
Reference in New Issue
Block a user