Skip to content
Permalink
Browse files

Fix issue processwire/processwire-issues#377 where install of non-nat…

…ive site profile with 3rd party Fieldtype modules could produce error messages at install time
  • Loading branch information
ryancramerdesign committed Sep 20, 2017
1 parent 2a3be72 commit 4560ed2997c3cc7e86778c61f1a8a676ec299f58
Showing with 5 additions and 4 deletions.
  1. +1 −0 install.php
  2. +4 −4 wire/modules/Fieldtype/FieldtypeRepeater/FieldtypeRepeater.module
@@ -109,6 +109,7 @@ public function execute() {

case 5: require("./index.php");
/** @var ProcessWire $wire */
$wire->modules->refresh();
$this->adminAccountSave($wire);
break;

@@ -145,7 +145,7 @@ class FieldtypeRepeater extends Fieldtype implements ConfigurableModule {

// make sure that all templates used by repeater pages enforce a Page type of RepeaterPage
foreach($fields as $field) {
if($field->type->className() != $className) continue;
if(!$field->type || $field->type->className() != $className) continue;
$template = $this->getRepeaterTemplate($field);
if(!$template) continue;
if(__NAMESPACE__) {
@@ -910,11 +910,11 @@ class FieldtypeRepeater extends Fieldtype implements ConfigurableModule {
foreach($changesByField as $fieldName => $count) {
$updateCounts[] = "$fieldName ($count)";
}
$messages[] = "$numUpdated '$fieldName' page(s) updated – " . implode(', ', $updateCounts);
$messages[] = "$numUpdated page(s) updated – " . implode(', ', $updateCounts);
}

if($numAdded) $messages[] = "$numAdded new '$fieldName' page(s) added";
if($numDeleted) $messages[] = "$numDeleted '$fieldName' page(s) DELETED";
if($numAdded) $messages[] = "$numAdded new page(s) added";
if($numDeleted) $messages[] = "$numDeleted page(s) DELETED";

foreach($messages as $message) {
$pageArray->message("$field->name: $message");

0 comments on commit 4560ed2

Please sign in to comment.
You can’t perform that action at this time.