Comments (8)
1.1.2 has 2 new variables: $trackErrorActions
and $ignoreErrorActions
. They work the same as the regular ones but for errors. Please note that due to how Yii works (logException functionality) there's no consistent ActionEvent
instance to verify (to obtain the route). To get around that, the error handler uses Yii::$app->requestedRoute
from yii2-audit.
The way things are implemented, *
as entry won't work for either situation, it was never meant to as that makes little sense.
Do you have an example of a situation where either */part
or part/*
doesn't do what it's supposed to?
from yii2-audit.
'ignoreActions' => ['audit/*', 'debug/*', '*/index'],
:
from yii2-audit.
It's weird. I ran it on a test project with just the ignoreActions defined like you specified them, and it's nicely ignoring the site/index
views (that's what I tested), as it should. Is there something else configured or do you something with the $uniqueId
of Yii's ActionEvent
?
from yii2-audit.
It's a clear yii2 app, although good, I'm using the advanced app and I have set this in backend's config for RBAC:
'as access' => [
'class' => backend\filters\AccessControl::class,
'allowActions' => ['site/login', 'site/logout', 'site/error', 'debug', 'gii']
]
from yii2-audit.
I have a similar problem:
'ignoreActions' => ['audit/*', 'debug/*', 'certificate/*'],
When the request_method is not GET the ignoreActions dont work as expected.
from yii2-audit.
Hello,
I've reproduce the same issue and it seems to be related to the error handler \bedezign\yii2\audit\components\web\ErrorHandler
creating the audit entry and not the Audit->onBeforeAction
method that use the ignoreActions
filter.
If I'm disabling error handler I don't have the audit entry anymore. Here is the stack trace I can see:
/app/vendor/lbn/yii2-config/src/db/mysql/Command.php:25
/app/vendor/lbn/yii2-config/src/db/mysql/Command.php:60
/app/vendor/bedezign/yii2-audit/src/models/AuditEntry.php:166
/app/vendor/bedezign/yii2-audit/src/models/AuditEntry.php:55
/app/vendor/bedezign/yii2-audit/src/Audit.php:321
/app/vendor/bedezign/yii2-audit/src/components/base/ErrorHandlerTrait.php:38
from yii2-audit.
Okay, got it.
Errors by default are always logged as it is assumed that that is exactly the information you want.
I can however see that you might not want specific entries so I'll see if I can add a second set of tracking-filters for error specifically.
from yii2-audit.
Related Issues (20)
- Exception with message "The table does not exist" HOT 2
- How to enable roll-back on the Trail view page? HOT 1
- Asset problem with yii2-debug 2.1.0 HOT 1
- Database Exception on group by with alias on SQL Server
- initial migration, postgresql doesn't have blob type HOT 2
- Hii.. im using this extension and im using bootstrap 4 HOT 1
- Getting unknown property: bedezign\yii2\audit\Audit::tracePathMappings HOT 4
- Namespaced migrations cause error HOT 5
- The css of the view pages are broken .Header menu is invisible . HOT 2
- blob datatype of fields so small for some requests - it needed mediumblob HOT 1
- Trying to get property 'uniqueId' of non-object in Audit.php on line 248 HOT 1
- migrate error when install: Cannot declare class m150626_000001_create_audit_entry, because the name is already in use HOT 3
- Handle error on backend HOT 3
- Trying to get property 'id' of non-object HOT 1
- I can't run migrations. HOT 6
- AuditTrailBehavior - reload oldAttributes after refresh HOT 2
- Getting unknown property: bedezign\yii2\audit\Audit::tracePathMappings HOT 1
- Breadcrumbs should support Bootstrap 4 HOT 2
- Getting unknown property: bedezign\yii2\audit\Audit::tracePathMappings HOT 1
- 2amigos/yii2-chartjs-widget is abandoned
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yii2-audit.