mirror of
https://github.com/processwire/processwire.git
synced 2025-08-10 00:37:02 +02:00
Fix issue processwire/processwire-issues#1278
This commit is contained in:
@@ -496,6 +496,13 @@ class ProcessPageAdd extends Process implements ConfigurableModule, WirePageEdit
|
||||
throw new WireException($this->errors('string'));
|
||||
}
|
||||
|
||||
if($this->parent->template->name === 'admin' && $this->wire()->page->id != $this->parent->id) {
|
||||
$process = $this->parent->process;
|
||||
if($process && wireInstanceOf($process, 'ProcessPageType')) {
|
||||
$this->wire()->session->location($this->parent->url . 'add/');
|
||||
}
|
||||
}
|
||||
|
||||
if(count($this->parent->template->childTemplates) == 1) {
|
||||
// only one type of template is allowed for the parent
|
||||
$childTemplates = $this->parent->template->childTemplates;
|
||||
|
Reference in New Issue
Block a user