Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot properly edit ban trigger #4867

Closed
Arantor opened this issue Jul 23, 2018 · 7 comments · Fixed by #7245
Closed

Cannot properly edit ban trigger #4867

Arantor opened this issue Jul 23, 2018 · 7 comments · Fixed by #7245
Milestone

Comments

@Arantor
Copy link
Contributor

Arantor commented Jul 23, 2018

Applies on 22bf54f, probably earlier too.

  1. Create a ban with a trigger (doesn't matter what)
  2. From the ban list, go to modify the ban you just made
  3. Select modify on any of the existing ban triggers
  4. Edit the value
  5. Save
  6. Note that the value has not updated

Type of error: General
2: Invalid argument supplied for foreach()
http://localhost/SMF2.1/index.php?action=admin;area=ban;sa=edittrigger
D:/xampp_php7/htdocs/SMF2.1/Sources/ManageBans.php (Line 930)

Backtrace:
#0: smf_error_handler()
Called from unknown on line -1
#1: saveTriggers()
Called from unknown on line -1
#2: BanEditTrigger()
Called from unknown on line -1
#3: call_helper()
Called from unknown on line -1
#4: Ban()
Called from unknown on line -1
#5: AdminMain()
Called from unknown on line -1

@albertlast
Copy link
Collaborator

Here a proper backtrace (after I fixed the backtrace):

#0: smf_error_handler()
Called from F:\github\SMF2.1\Sources\ManageBans.php on line 930
#1: saveTriggers()
Called from F:\github\SMF2.1\Sources\ManageBans.php on line 1619
#2: BanEditTrigger()
Called from F:\github\SMF2.1\Sources\Subs.php on line 4853
#3: call_helper()
Called from F:\github\SMF2.1\Sources\ManageBans.php on line 86
#4: Ban()
Called from F:\github\SMF2.1\Sources\Admin.php on line 496
#5: AdminMain()
Called from F:\github\SMF2.1\index.php on line 150

@sbulen
Copy link
Contributor

sbulen commented Feb 13, 2019

This one also needs the "has fix" label, PR identified above.

@live627 live627 modified the milestones: RC3, Final Mar 4, 2020
@live627 live627 removed the Has fix label Nov 24, 2020
@Hatshepsut71
Copy link

I'm using SMF 2.1 RC3+ (commit d248131) with PHP 8.0.
When I'm trying to edit an existing ban trigger, I get 'HTTP Error 500' message on the white screen, and I cannot edit the trigger at all.

Forum details:

Forum version: SMF 2.1 RC3 (more detailed)
Current SMF version: SMF 2.1 RC3
GD version: bundled (2.1.0 compatible)
MySQL engine: MariaDB
MySQL version: 10.3.27-MariaDB-log
SMF file based caching: 2.1 RC3
SQLite3 database based caching: 3.7.17
PHP: 8.0.0 (more detailed)
Server version: Apache

@albertlast
Copy link
Collaborator

did you try the fix?

@Hatshepsut71
Copy link

Yes, the error is the same.
But if I change PHP to 7.4, the error is gone.

@Hatshepsut71
Copy link

Maybe, it's needed to open new issue, especially for PHP 8.0 ?

@albertlast
Copy link
Collaborator

yea,
also check if this error happen with nightly version.

if you able to copy you board.

@MissAllSunday MissAllSunday modified the milestones: RC4, Final May 13, 2021
BrickOzp added a commit to BrickOzp/SMF2.1 that referenced this issue Jan 19, 2022
As only one trigger value is shown in the edit ban trigger view
it is unnecessary to show all fields. As this is causing errors
when the triggers is updated, hide the fields that it not part
of this trigger.

Fixes SimpleMachines#4867
Closes SimpleMachines#4875

Signed-off-by: Oscar Rydhé <oscar.rydhe@gmail.com>
sbulen pushed a commit that referenced this issue Jan 19, 2022
As only one trigger value is shown in the edit ban trigger view
it is unnecessary to show all fields. As this is causing errors
when the triggers is updated, hide the fields that it not part
of this trigger.

Fixes #4867
Closes #4875

Signed-off-by: Oscar Rydhé <oscar.rydhe@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants