You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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');
The text was updated successfully, but these errors were encountered:
djadair
changed the title
Transporter import adds "default" to all domainlist_by_group.json entries.
Teleporter import adds "default" to all domainlist_by_group.json entries.
May 9, 2024
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.
The text was updated successfully, but these errors were encountered: