KoolReport's Forum

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

Symfony move to prod #1835

Closed Salvatore Scalia opened this topic on on Jan 10, 2021 - 2 comments

S
Salvatore Scalia commented on Jan 10, 2021

hello, i have created chartjs reports on my dev workstation and when i move to my prod server i have the following error

all packages are installed and assets are also present in public folder

i'm using symfony 5.1

thanks in advance

S
Sebastian Morales commented on Jan 11, 2021

Salvatore, for Symphony in production users' client browsers can not access the js/css files in the vendor folder as it's private in contrast to the public folder. Therefore you would have to set each report's asset property to point to a folder (says, named "kool_assets") in the public folder like documented here:

https://www.koolreport.com/docs/architecture/assets_settings/

class MyReport extends \koolreport\KoolReport
{
    protected function settings()
    {
        return array(
            ...
            "assets"=>array(
                "path"=>"../public/kool_assets", //absolute path or relative one to public/kool_assets from the current report path
                "url"=>"/kool_assets" //url path to kool_assets so users' client browsers could access it https://server/<url-to-kool-assets>
            )
        );
    }
} 

Let us know if you need more details. Cheers,

S
Salvatore Scalia commented on Jan 11, 2021

yes it's work ...thanks a lot

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
solved

None