KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Yii extention - Forbidden access to koolreport.js #721

Closed Rehan Anis opened this topic on on Mar 2, 2019 - 6 comments

Rehan Anis commented on Mar 2, 2019

Forbidden You don't have permission to access /protected/extensions/koolreport/src/clients/core/KoolReport.js?_=1551559509323 on this server.

How to resolve this error this occurs when I am trying to load the report via ajax.

Please note that this method worked in koolreport 2.0 earlier and I'm facing this problem only after upgrading to koolreport 3

KoolReport commented on Mar 3, 2019

You are using Yii1 or Yii2

Rehan Anis commented on Mar 3, 2019

Yii 1.1 Sorry for not mentioning it earlier

KoolReport commented on Mar 4, 2019

You do this on your report:

class MyReport extends \koolreport\KoolReport
{
    function settings()
    {
        return array(
            ...
            "assets"=>array(
                "path"=>"/full/path/to/your/yii/assets"
                "url"=>"/assets"
            )
        )
    }
}

What above settings does is that, it will copy the resources like css or js to the "assets" folder of yii, and then with the "url" settings, koolreport will know how to look for those copied resources. Hope that helps.

Rehan Anis commented on Mar 4, 2019

Thanks It resolves my problem

To be more clear what I did is

"assets" => array(
            "path" => Yii::getPathOfAlias('application') . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'assets',
            "url" => '/assets',
        ),
KoolReport commented on Mar 4, 2019

Awesome, we are planning to add a new package call yii too. It will work like our current laravel or codeigniter package so that you only need to add:

use \koolreport\yii\Friendship;

it will automatically configure the assets path and url for you.

KoolReport commented on Mar 2, 2020

Updated: We have release Yii2 package and also have tutorial of how to use KoolReport in Yii2.

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed
solved

None