rmrevin / yii2-minify-view

Yii2 View component with minification css & js
MIT License
191 stars 67 forks source link

minify breaks pjax widget #34

Closed iadj closed 7 years ago

iadj commented 8 years ago

yii2-minify-view appears to break pjax widgets when minifyCss is enabled. The pjax loading functionality appears to get completely disabled.

rmrevin commented 8 years ago

We need a unit test case

iadj commented 8 years ago

@rmrevin How do I properly display a unit test case?

I'll also further explain the issue: Minify css with yii2-minify-view Put a list view with pagination in a PJax container The list view's pagination should load dynamically with PJax, but instead PJax has no effect and the pages load statically.

rmrevin commented 8 years ago

Then we need to demo app, where we can verify this behavior.

awodev commented 8 years ago

getting the same behavior in dev environment running version 1.10.2. Upon inspecting, this is the error I get:

<pre>PHP Warning &#039;yii\base\ErrorException&#039; with message &#039;Invalid argument supplied for
 foreach()&#039; 

in F:\www\test\yii\www\vendor\rmrevin\yii2-minify-view\components\CSS.php:28

So in CSS.php, right before line 28 added this:

if(empty($cssFiles)) $cssFiles = array();

Back to normal now.

rmrevin commented 8 years ago

@awodev #36

awodev commented 8 years ago

Ah yes, upgrading to the latest 1.11.0 also fixed the issue. Will try that first next time. :)

Thanks for the so very useful extension.

rmrevin commented 7 years ago

@iadj actual version works fine (clean install yii2-app-advanced + yii2-minify-view) http://playground.rmrevin.com/minify/test-34