luyadev / luya

LUYA is a scalable web framework and content management system with the goal to please developers, clients and users alike.
https://luya.io
MIT License
811 stars 205 forks source link

loading empty css file #1968

Closed pironmind closed 4 years ago

pironmind commented 4 years ago

What steps will reproduce the problem?

maybe after composer install, but undefined why this stop to work. Data was not modified and written by yours documentation. Not loaded only css/fontello/css/fontello.css

What is the expected result?

loaded data

class LandingAsset extends \luya\web\Asset
{
    public $sourcePath = '@app/resources';
    public $css = [
        'css/hamburgers.min.css?v=1513163921',
        'css/bootstrap.min.css?v=1513163921',
        'css/owl.carousel.min.css?v=1513163921',
        'css/owl.theme.default.min.css?v=1513163921',
        'css/main.min.css?v=1513163921',
        'css/animate.min.css?v=1513163921',
        'css/form.css?v=1513163921',
        'css/fontello/css/fontello.css',
    ];
// view/layouts

use app\assets\LandingAsset;
use luya\helpers\Html;
use luya\web\View;

/* @var $this luya\web\View */
/* @var $content string */

LandingAsset::register($this);

What do you get instead? (A Screenshot can help us a lot!)

Any idea why this happened?

image

image

image

LUYA Check ouput (run this script and post the result: luyacheck.php)

Additional infos

Q A
LUYA Version 1.0.10.0
PHP Version 7.2.0
Platform Apache/Openserver (https://ospanel.io)
Operating system Windows10-stable
pironmind commented 4 years ago

And how the system select assets id, on diffrent servers I have new one?

nadar commented 4 years ago

hi @pironmind

  1. ?v=1513163921 is not needed in the asset file, yii will do this automatically. Remove it, maybe it makes the trouble.
  2. Please take a look at Yii Guide for general questions about Assets: https://www.yiiframework.com/doc/guide/2.0/en/structure-assets
  3. So the problem is that the assets are published, but empty?
pironmind commented 4 years ago

That asset is empty. I directly copy to the loaded id folder and this work (understand that this is crutch).

nadar commented 4 years ago

did you followed my advice to remove the version param in the assest file?

pironmind commented 4 years ago

did you followed my advice to remove the version param in the assest file?

remove, but did not help

nadar commented 4 years ago

I really would like to help you on this.

  1. have you setup that the asset manager should use symlinking instead of copy? cause you are working in windows, this might not work.

  2. have seen this folder, it looks like the foldername contains the slash, or is it your IDE?

Bildschirmfoto 2019-10-26 um 09 48 11
pironmind commented 4 years ago

I really would like to help you on this.

  1. have you setup that the asset manager should use symlinking instead of copy? cause you are working in windows, this might not work.
  2. have seen this folder, it looks like the foldername contains the slash, or is it your IDE?
Bildschirmfoto 2019-10-26 um 09 48 11

1) sourcePath is set class LandingAsset extends \luya\web\Asset { public $sourcePath = '@app/resources'; 2) it is folder inside the another one folder / -> resources -> css -> fontello -> css -> <main file>. Or 'css/fontello/css/fontello.css'. (just google chrome debugger)

nadar commented 4 years ago
  1. make sure linkAssets is disabled in the config.
  2. try to remove all folders public_html/assets.
nadar commented 4 years ago

If there is something i can help, please let me know (or reopen the issue). otherwise i will close the issue as there is no further activity since 27.10