Work-around seems to be to load the transporter file twice.
Debug log includes diff of transporter.php that corrected the issue. By processing the domainlist_by_group.json file LAST the group membership works properly.
root@photon-5 [ ~ ]# diff -Naur teleporter.orig teleporter.php
--- teleporter.orig 2024-05-08 20:07:55.000000000 +0000
+++ teleporter.php 2024-05-09 02:45:02.254828282 +0000
@@ -451,14 +451,6 @@
$importedsomething = true;
}
- if ((isset($_POST['whitelist']) || isset($_POST['regex_whitelist'])
- || isset($_POST['blacklist']) || isset($_POST['regex_blacklist']))
- && $file->getFilename() === 'domainlist_by_group.json') {
- $num = archive_restore_table($file, 'domainlist_by_group', $flushtables);
- echo 'Processed black-/whitelist group assignments ('.$num.noun($num).")<br>\n";
- $importedsomething = true;
- }
-
if (isset($_POST['adlist']) && $file->getFilename() === 'adlist_by_group.json') {
$num = archive_restore_table($file, 'adlist_by_group', $flushtables);
echo 'Processed adlist group assignments ('.$num.noun($num).")<br>\n";
@@ -550,6 +542,18 @@
}
}
+ foreach (new RecursiveIteratorIterator($archive) as $file) {
+
+ if ((isset($_POST['whitelist']) || isset($_POST['regex_whitelist'])
+ || isset($_POST['blacklist']) || isset($_POST['regex_blacklist']))
+ && $file->getFilename() === 'domainlist_by_group.json') {
+ $num = archive_restore_table($file, 'domainlist_by_group', $flushtables);
+ echo 'Processed black-/whitelist group assignments ('.$num.noun($num).")<br>\n";
+ $importedsomething = true;
+ }
+
+ }
+
// do we need a full restart of Pi-hole or reloading the lists?
if ($fullpiholerestart) {
pihole_execute('restartdns');
Versions
Platform
Expected behavior
Create new pihole docker instance and import teleporter file from existing instance. All black/white list domains should be assigned to proper groups.
Actual behavior / bug
Each whitelist domain is assigned to "Default" as well as the desired group.
See: Reddit thread
Steps to reproduce
Steps to reproduce the behavior:
Debug Token
Screenshots
Additional context
Work-around seems to be to load the transporter file twice.
Debug log includes diff of transporter.php that corrected the issue. By processing the domainlist_by_group.json file LAST the group membership works properly.