danieltj wrote: Sat Jan 04, 2025 5:56 pm
That extension is made for 3.1 and based on the OP, doesn’t work. Please add context in future rather than just pasting a link without any explanation.
EDIT
she gets this error when installing, Where can I find the extensions SQL so I can edit and correct this part?
I guess It was straightforward.
Although I doubt they ever looked into the files to make it at least compatible with the latest version. Should've recommended to do the workaround instead.
Try replacing
infractions/config/services.yml
with:
Code: Select all
imports:
- { resource: parameters.yml }
services:
infractions.listener:
class: rfd\infractions\Event\main_listener
arguments:
- '@auth'
- '%core.root_path%'
- '%core.php_ext%'
- '@user'
tags:
- { name: event.listener }
infractions.infraction_manager:
class: rfd\infractions\Service\InfractionManager
arguments:
- '@dbal.conn.driver'
- { infractions: %tables.infractions%, rules: %tables.infraction_rules% }
infractions.rules_manager:
class: rfd\infractions\Service\InfractionRulesManager
arguments:
- '@dbal.conn.driver'
- { rules: %tables.infraction_rules% }
infractions.user_infractions_manager:
class: rfd\infractions\Service\UserInfractionsManager
arguments:
- '@infractions.rules_manager'
- '@dbal.conn.driver'
- { inf_users: %tables.infractions_users%, group_applied: %tables.groups_applied% }
cron.task.core.prune_infractions:
class: rfd\infractions\cron\task\core\prune_infractions
arguments:
- '@infractions.user_infractions_manager'
- '@request'
- '@config'
- '@dbal.conn.driver'
calls:
- [set_name, [cron.task.core.prune_infractions]]
tags:
- { name: cron.task }
And
infraction/config/parameters.yml
with:
Code: Select all
parameters:
tables.infractions: '%core.table_prefix%infractions'
tables.infraction_rules: '%core.table_prefix%infraction_rules'
tables.infractions_users: '%core.table_prefix%infractions_users'
tables.groups_applied: '%core.table_prefix%infr_user_rules'