mirror of
https://github.com/processwire/processwire.git
synced 2025-08-12 01:34:31 +02:00
Add additional clarification to a couple of Page class exception error messages
This commit is contained in:
@@ -1982,7 +1982,7 @@ class Page extends WireData implements \Countable, WireMatchable {
|
||||
if(!$tpl instanceof Template) throw new WireException("Invalid value sent to Page::setTemplate");
|
||||
if($this->template && $this->template->id != $tpl->id && $this->isLoaded) {
|
||||
if($this->settings['status'] & Page::statusSystem) {
|
||||
throw new WireException("Template changes are disallowed on this page");
|
||||
throw new WireException("Template changes are disallowed on page $this->id because it has system status");
|
||||
}
|
||||
if(is_null($this->templatePrevious)) $this->templatePrevious = $this->template;
|
||||
$this->trackChange('template', $this->template, $tpl);
|
||||
@@ -2013,7 +2013,7 @@ class Page extends WireData implements \Countable, WireMatchable {
|
||||
$this->trackChange('parent', $this->_parent, $parent);
|
||||
if(($this->_parent && $this->_parent->id) && $this->_parent->id != $parent->id) {
|
||||
if($this->settings['status'] & Page::statusSystem) {
|
||||
throw new WireException("Parent changes are disallowed on this page");
|
||||
throw new WireException("Parent changes are disallowed on page $this->id because it has system status");
|
||||
}
|
||||
if(is_null($this->parentPrevious)) $this->parentPrevious = $this->_parent;
|
||||
}
|
||||
|
Reference in New Issue
Block a user