View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
10199Bug reportsPluginspublic2016-01-06 13:32
ReporterDenisChenu Assigned Tomdekker  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.06+ 
Fixed in Version2.06+ 
Summary10199: Unable to use cron event
Description

Cron event don't work : error in console

Steps To Reproduce

1st : without any plugin :
$ php application/commands/console.php plugin cron
exception 'CException' with message 'Object configuration must be an array containing a "class" element.' in ./framework/YiiBase.php:193
Stack trace:
#0 /home/sondages.pro/htdocs/limesurvey_GIT/testing/limesurvey/framework/base/CModule.php(393): YiiBase::createComponent(Array)
#1 /home/sondages.pro/htdocs/limesurvey_GIT/testing/limesurvey/framework/base/CModule.php(530): CModule->getComponent('clientScript')
#2 /home/sondages.pro/htdocs/limesurvey_GIT/testing/limesurvey/framework/base/CApplication.php(167): CModule->preloadComponents()
#3 /home/sondages.pro/htdocs/limesurvey_GIT/testing/limesurvey/application/core/ConsoleApplication.php(24): CApplication->__construct(Array)
#4 /home/sondages.pro/htdocs/limesurvey_GIT/testing/limesurvey/framework/YiiBase.php(125): ConsoleApplication->__construct(Array)
#5 /home/sondages.pro/htdocs/limesurvey_GIT/testing/limesurvey/application/commands/console.php(48): YiiBase::createApplication('ConsoleApplicat...', Array)

2nd with included little plugin : same think ;)

Additional Information

Tested with config-sample too.

TagsNo tags attached.
Attached Files
cronTest.php (1,355 bytes)   
<?php
/**
 * cronTest : Test cron for bug report
 *
 * @author Denis Chenu <denis@sondages.pro>
 * @copyright 2015 Denis Chenu <http://www.sondages.pro>
 * @license GPL v3
 * @version 0.0.1
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

class cronTest extends PluginBase
{
    protected $storage = 'DbStorage';
    static protected $description = 'Test setting of cron';
    static protected $name = 'cronTest';

    private $sSessionKey;
    protected $settings = array(
        'testInt' => array(
            'type'=>'int',
            'htmlOptions'=>array(
                'min'=>0,
            ),
            'label'=>"Testing int.",
            'default'=>2,
        ),
    );
    /**
    * Add function to be used in cron event
    */
    public function init()
    {
        $this->subscribe('cron','testEcho');
    }

    public function testEcho()
    {
        echo "test";
    }
}
cronTest.php (1,355 bytes)   
Bug heat2
Complete LimeSurvey version number (& build)151215
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionmysql 5
Server OS (if known)debian7/linux
Webserver software & version (if known)apache
PHP VersionPHP Version 5.4

Relationships

duplicate of 10176 closedmdekker Error when running console application 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2016-01-06 13:28

developer   ~34155

Fixed with remove clientScript from preload internal

I look if we add it for "script extrension" removed now.

Not needed, but next time : remind of this ;)

DenisChenu

DenisChenu

2016-01-06 13:30

developer   ~34156

https://github.com/LimeSurvey/LimeSurvey/commit/5c4527584214dba8a1004b189cdf76fbce212cc6

Thanks Menno ;)

Related Changesets

LimeSurvey: master 5c452758

2015-12-22 07:58:11

mdekker

Details Diff
Update internal.php

Console was broken due to clientScript
Affected Issues
10176, 10199
mod - application/config/internal.php Diff File

Issue History

Date Modified Username Field Change
2016-01-06 13:17 DenisChenu New Issue
2016-01-06 13:17 DenisChenu File Added: cronTest.php
2016-01-06 13:23 DenisChenu Additional Information Updated
2016-01-06 13:28 DenisChenu Note Added: 34155
2016-01-06 13:30 DenisChenu Note Added: 34156
2016-01-06 13:30 DenisChenu Status new => resolved
2016-01-06 13:30 DenisChenu Fixed in Version => 2.06+
2016-01-06 13:30 DenisChenu Resolution open => fixed
2016-01-06 13:30 DenisChenu Assigned To => mdekker
2016-01-06 13:31 DenisChenu Changeset attached => LimeSurvey master 5c452758
2016-01-06 13:32 DenisChenu Relationship added duplicate of 10176
2016-01-06 13:32 DenisChenu Status resolved => closed