View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
19248 | Bug reports | Plugins | public | 2023-11-17 21:20 | 2024-02-05 11:38 |
Reporter | gabrieljenik | Assigned To | tibor.pacalat | ||
Priority | none | Severity | crash | ||
Status | closed | Resolution | fixed | ||
Product Version | 5.6.x | ||||
Summary | 19248: When deleting a token through the model, the AuditLog beforeDeleteToken event fails | ||||
Description | The beforeDeleteToken event fails. | ||||
Tags | No tags attached. | ||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | 5.x | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | Mysql | ||||
Server OS (if known) | |||||
Webserver software & version (if known) | |||||
PHP Version | 7 | ||||
related to | 19325 | closed | tibor.pacalat | When deleting a token the participant_id is being logged while it should be the token_id |
CDbException
|
|
Issue in the plugin : https://manual.limesurvey.org/Dynamic_model_events PS : save as HTML the error is really more easy to read |
|
Yes, I know, I hadn't had this like that :) |
|
I believe the best is to just rename the event on dev. |
|
O no !
No ! it's an issue in the plugin, all ModelVeent receive model and not model->primaryKey The issue is here : https://github.com/LimeSurvey/LimeSurvey/blob/b647c39b3c1ccf9dfc7375c83f58f4293b570fbf/application/core/plugins/AuditLog/AuditLog.php#L385 And for BeforeDeleteMany See BeforeTokenSave |
|
As PDF as well. |
|
Arg … it's a specific one then … Unsure if both happen ? |
|
You know where this delete action is done ? |
|
OK, I think both can happen Maybe just fix
PS : you can fix it, don't really want to fix it … PS : with pdf : you can not click on + to show hide content |
|
That could work, but wouldn't be logging in case someone deletes the model from a plugin, for example. |
|
Unsure here |
|
https://forum.yiiframework.com/t/before-after-delete-strange-behavior/16050/4 Maybe on LSActiveRecord or on some classes we should overload deleteByPk() and deleteAll() as to make sure the events get triggered? |
|
New feature :) and add deleteAllByAttributes Else : we have same issue with updateAll or updateByPk or updateByAttributes |
|
Ok, this is what I believe happened.
So, my call would be to:
As this is used by security areas, I would add automated tests to the plugin. Thoughts? |
|
PR Master: https://github.com/LimeSurvey/LimeSurvey/pull/3676 When ready will also update v5. |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=35953 |
|
Fix committed to 5.x branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=36019 |
|
Fix committed to 5.x branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=36020 |
|
Fixed in Release 5.6.54+240206 |
|
LimeSurvey: master d59ca854 2024-01-08 19:57 Gabriel Jenik Committer: GitHub Details Diff |
Fixed issue 19248: When deleting a token through the model, the AuditLog beforeDeleteToken event fails (#3676) Co-authored-by: lapiudevgit <devgit@lapiu.biz> |
Affected Issues 19248 |
|
mod - application/core/plugins/AuditLog/AuditLog.php | Diff File | ||
LimeSurvey: 5.x 11b12409 2024-01-31 16:01 Gabriel Jenik Committer: GitHub Details Diff |
Fixed issue 19248: When deleting a token through the model, the Audi… …tLog beforeDeleteToken event fails (#3681) Co-authored-by: lapiudevgit <devgit@lapiu.biz> |
Affected Issues 19248 |
|
mod - application/core/plugins/AuditLog/AuditLog.php | Diff File | ||
LimeSurvey: 5.x 11b12409 2024-01-31 16:01 Gabriel Jenik Committer: GitHub Details Diff |
Fixed issue 19248: When deleting a token through the model, the Audi… …tLog beforeDeleteToken event fails (#3681) Co-authored-by: lapiudevgit <devgit@lapiu.biz> |
Affected Issues 19248 |
|
mod - application/core/plugins/AuditLog/AuditLog.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-11-17 21:20 | gabrieljenik | New Issue | |
2023-11-17 21:21 | gabrieljenik | Assigned To | => gabrieljenik |
2023-11-17 21:21 | gabrieljenik | Status | new => confirmed |
2023-11-17 21:21 | gabrieljenik | Category | Survey participants (Tokens) => Plugins |
2023-11-17 21:21 | gabrieljenik | Summary | When deleting a token through the model, the beforeDeleteToken event fails => When deleting a token through the model, the AuditLog beforeDeleteToken event fails |
2023-11-17 21:26 | gabrieljenik | Note Added: 78518 | |
2023-11-17 21:26 | gabrieljenik | Bug heat | 0 => 2 |
2023-11-18 10:24 | DenisChenu | Note Added: 78519 | |
2023-11-18 10:24 | DenisChenu | Bug heat | 2 => 4 |
2023-11-18 10:24 | DenisChenu | Note Edited: 78519 | |
2023-11-21 12:19 | gabrieljenik | Note Added: 78581 | |
2023-11-21 12:21 | gabrieljenik | Note Added: 78582 | |
2023-11-21 15:18 | DenisChenu | Note Added: 78593 | |
2023-11-21 15:18 | DenisChenu | Assigned To | gabrieljenik => DenisChenu |
2023-11-21 15:18 | DenisChenu | Status | confirmed => assigned |
2023-11-21 17:08 | gabrieljenik | Note Added: 78604 | |
2023-11-21 17:12 | DenisChenu | Note Added: 78605 | |
2023-11-21 17:21 | DenisChenu | Note Added: 78606 | |
2023-11-21 17:29 | DenisChenu | Status | assigned => confirmed |
2023-11-21 17:29 | DenisChenu | Note Added: 78607 | |
2023-11-21 17:29 | DenisChenu | Assigned To | DenisChenu => |
2023-11-21 17:30 | DenisChenu | Note Edited: 78607 | |
2023-11-21 17:38 | DenisChenu | Note Edited: 78607 | |
2023-11-21 17:54 | gabrieljenik | Note Added: 78610 | |
2023-11-21 18:20 | DenisChenu | Note Added: 78612 | |
2023-11-21 21:22 | gabrieljenik | Note Added: 78614 | |
2023-11-21 21:23 | gabrieljenik | Note Edited: 78614 | |
2023-11-22 08:49 | DenisChenu | Note Added: 78615 | |
2023-11-22 08:50 | DenisChenu | Note Edited: 78615 | |
2023-12-06 17:47 | gabrieljenik | Assigned To | => gabrieljenik |
2023-12-06 17:47 | gabrieljenik | Status | confirmed => assigned |
2023-12-11 21:32 | gabrieljenik | Note Added: 78950 | |
2023-12-23 14:47 | gabrieljenik | Note Added: 79065 | |
2023-12-23 14:47 | gabrieljenik | Assigned To | gabrieljenik => DenisChenu |
2023-12-23 14:47 | gabrieljenik | Status | assigned => ready for code review |
2023-12-23 18:59 | DenisChenu | Assigned To | DenisChenu => gabrieljenik |
2023-12-23 18:59 | DenisChenu | Status | ready for code review => ready for testing |
2023-12-26 18:19 | gabrieljenik | Issue cloned: 19325 | |
2023-12-26 18:19 | gabrieljenik | Relationship added | related to 19325 |
2023-12-26 18:20 | gabrieljenik | Assigned To | gabrieljenik => tibor.pacalat |
2023-12-29 20:43 | gabrieljenik | Note Added: 79076 | |
2024-01-08 18:57 | Changeset attached | => LimeSurvey master d59ca854 | |
2024-01-08 18:57 | guest | Note Added: 79107 | |
2024-01-08 18:57 | guest | Bug heat | 4 => 6 |
2024-01-31 15:01 | Changeset attached | => LimeSurvey 5.x 11b12409 | |
2024-01-31 15:01 | Changeset attached | => LimeSurvey 5.x 11b12409 | |
2024-01-31 15:01 | guest | Note Added: 79367 | |
2024-01-31 15:01 | guest | Note Added: 79368 | |
2024-01-31 15:01 | tibor.pacalat | Status | ready for testing => resolved |
2024-01-31 15:01 | tibor.pacalat | Resolution | open => fixed |
2024-02-05 11:38 | LimeBot | Note Added: 79417 | |
2024-02-05 11:38 | LimeBot | Status | resolved => closed |
2024-02-05 11:38 | LimeBot | Bug heat | 6 => 8 |