Bug #14013
closedPHP error when attempting to bulk import Alias content
100%
Description
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/firewall_aliases_import.php:88 Stack trace: #0 {main} thrown in /usr/local/www/firewall_aliases_import.php on line 88 PHP ERROR: Type: 1, File: /usr/local/www/firewall_aliases_import.php, Line: 88, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/firewall_aliases_import.php:88 Stack trace: #0 {main} thrown
Files
Updated by Jim Pingle almost 2 years ago
- Project changed from pfSense Plus to pfSense
- Category changed from Aliases / Tables to Aliases / Tables
- Status changed from New to Confirmed
- Assignee set to Jim Pingle
- Priority changed from High to Normal
- Target version set to 2.7.0
- Affected Plus Version deleted (
23.01) - Plus Target Version set to 23.05
Updated by Jim Pingle almost 2 years ago
- Subject changed from IP aliases Bulk import php error line 88 to PHP error when attempting to bulk import Alias content
Updated by Jim Pingle almost 2 years ago
- Status changed from Confirmed to Feedback
- % Done changed from 0 to 100
Applied in changeset 290b3461bb816e9fc161568e499d43b24542cb9f.
Updated by Danilo Zrenjanin over 1 year ago
I couldn't reproduce this issue.
I tried with bulk import, but I couldn't replicate that issue on a stock 23.01 install.
Can you please provide an export file with content that will break it upon import task?
Updated by Amin Sadeghi over 1 year ago
Danilo Zrenjanin wrote in #note-4:
I couldn't reproduce this issue.
I tried with bulk import, but I couldn't replicate that issue on a stock 23.01 install.
Can you please provide an export file with content that will break it upon import task?
Hello, thank you for your reply. I have a problem in the bulk import section, even when I enter only one IP address, the system shows me an error.
Of course, before your post, Jim Pingle about sent me a solution to this problem that I haven't tried yet.
my firewall_aliases_import.php is attached. thank you
Updated by Jim Pingle over 1 year ago
I was able to easily replicate it on an install that was very close to a default config. The error happened on a line processing interface groups, if none are present in the config then it would fail there.
Updated by Amin Sadeghi over 1 year ago
Jim Pingle wrote in #note-3:
Applied in changeset 290b3461bb816e9fc161568e499d43b24542cb9f.
i test your code. error fixed with your code change
god bless you Jim
Updated by Danilo Zrenjanin over 1 year ago
- Status changed from Feedback to Resolved
It works fine if I import a list under Firewall/Aliases/IP
I could replicate the issue only after choosing Firewall/Aliases/All, then importing.
However, the patch fixes it.
I am marking this ticket reslvoed.