View Issue Details

This bug affects 1 person(s).
 10
IDProjectCategoryView StatusLast Update
14786Bug reportsOtherpublic2021-11-02 09:06
ReporterDenisChenu Assigned Togabrieljenik  
PrioritylowSeveritypartial_block 
Status closedResolutionfixed 
Product Version3.17.x 
Summary14786: application warning : Failed to set unsafe attribute "settings" of "Tutorial".
Description

When activate logging for warning and error always have «Failed to set unsafe attribute "settings" of "Tutorial".»

Steps To Reproduce

Add this

        'log' => array(
            'routes' => array(
                'webError' => array(
                    'class' => 'CWebLogRoute',
                    'levels' => 'warning, error',
                ),
                'plugins' => array(
                    'class' => 'CWebLogRoute',
                    'levels' => 'trace, info, warning, error',
                    'categories'=>'application.plugins.*',
                ),
                'vardump' => array(
                    'class' => 'CWebLogRoute',
                    'categories' => 'vardump', // tracevar function
                ),
            )
        ),

in config (for example)

Look at bottom of page

Additional Information

Track warnings in log is always a good idea

TagsNo tags attached.
Bug heat10
Complete LimeSurvey version number (& build)3.25.19
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant

Users monitoring this issue

alorenc

Activities

alorenc

alorenc

2021-04-26 11:51

reporter   ~64153

I have the same warning
Limesurve: v3.25.19

config:

routes' => [
   'fileError' => [
      'class' => 'CFileLogRoute',
      'levels' => 'warning, error',
   ],
],

Please assign the task to someone else (currently working).

DenisChenu

DenisChenu

2021-04-26 12:14

developer   ~64154

Last edited: 2021-10-12 15:30

Thank you for reminder !

What fo severity for you ? partial_block ?

alorenc

alorenc

2021-04-26 12:49

reporter   ~64156

Last edited: 2021-10-12 15:30

Yes, you can call it a partial block as the warning is logged every time the page is refreshed. And unfortunately it generates large files as a result.

I have files set to "Errors_YYYY-MM-DD.log;" so limiting the size and number of files is not a solution for me.

DenisChenu

DenisChenu

2021-04-26 13:07

developer   ~64157

Last edited: 2021-10-12 15:30

You surely can have an except value to disable this error :)

Maybe 'except'=>'system.db.ar.*', ?
(but disable log on activerecord … it's really NOT a solution)

alorenc

alorenc

2021-05-17 13:24

reporter   ~64426

Last edited: 2021-10-12 15:30

Adding 'system.db.ar.*' to exclusions does not work. I still have this message in my logs.

uibklime1

uibklime1

2021-10-06 02:04

reporter   ~66759

Last edited: 2021-10-12 15:30

@alorenc I think maybe the the upgrade installation flubbed the Tutorials database entry.

Quick hack. change models/Tutorial.php so that setAttributes is passed with 'false'. This will suppress the error. I don't see any knock-ons from this, but I'm just a user.

public function getDefaultTutorials()
{
$aDefaultTutorials = LsDefaultDataSets::getTutorialData();
$result = [];
foreach ($aDefaultTutorials as $aDefaultTutorial) {
$oTutorial = new Tutorial();
$oTutorial->setAttributes($aDefaultTutorial, false);
$result[] = $oTutorial;
}
return $result;
}

gabrieljenik

gabrieljenik

2021-10-12 15:29

manager   ~66837

Last edited: 2021-10-12 15:30

PR: https://github.com/LimeSurvey/LimeSurvey/pull/2092

The most appropriate would be to add a rule for the 'settings' attribute of the Tutorial model (it's a json), but it seems to me that this functionality of the tutorials was not developed further, so I don't know if it makes sense.

gabrieljenik

gabrieljenik

2021-10-22 09:26

manager   ~66898

Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=32797

Related Changesets

LimeSurvey: 3.x-LTS 8b86524a

2021-10-22 09:25:58

gabrieljenik


Committer: GitHub Details Diff
Fixed issue 14786: application warning : Failed to set unsafe attribute "settings" of "Tutorial". (#2092) Affected Issues
14786
mod - application/models/Tutorial.php Diff File

Issue History

Date Modified Username Field Change
2019-04-17 17:15 DenisChenu New Issue
2019-04-18 13:39 c_schmitz Assigned To => markusfluer
2019-04-18 13:39 c_schmitz Status new => assigned
2021-04-26 11:38 alorenc Issue Monitored: alorenc
2021-04-26 11:51 alorenc Note Added: 64153
2021-04-26 12:14 DenisChenu Assigned To markusfluer =>
2021-04-26 12:14 DenisChenu Status assigned => new
2021-04-26 12:14 DenisChenu Complete LimeSurvey version number (& build) 3.17.2 github => 3.25.19
2021-04-26 12:14 DenisChenu Note Added: 64154
2021-04-26 12:49 alorenc Note Added: 64156
2021-04-26 13:07 DenisChenu Note Added: 64157
2021-04-26 13:07 DenisChenu Severity minor => partial_block
2021-05-17 13:24 alorenc Note Added: 64426
2021-07-13 13:25 galads Assigned To => galads
2021-07-13 13:25 galads Status new => ready for testing
2021-07-22 12:52 galads Status ready for testing => confirmed
2021-07-22 13:32 galads Priority none => low
2021-07-22 13:32 galads Sync to Zoho Project => |Yes|
2021-10-06 02:04 uibklime1 Note Added: 66759
2021-10-06 02:04 uibklime1 Bug heat 6 => 8
2021-10-06 11:47 galads Assigned To galads => gabrieljenik
2021-10-06 11:47 galads Status confirmed => assigned
2021-10-12 15:29 gabrieljenik Note Added: 66837
2021-10-12 15:29 gabrieljenik Bug heat 8 => 10
2021-10-12 15:30 gabrieljenik Status assigned => ready for testing
2021-10-22 09:25 c_schmitz Status ready for testing => resolved
2021-10-22 09:25 c_schmitz Resolution open => fixed
2021-10-22 09:26 gabrieljenik Changeset attached => LimeSurvey 3.x-LTS 8b86524a
2021-10-22 09:26 gabrieljenik Note Added: 66898
2021-11-02 09:06 c_schmitz Status resolved => closed