fabianmichael / kirby-imagekit

Asynchronous thumbnail creation and optimization for Kirby 2
MIT License
101 stars 4 forks source link

Panel Widget Doesn't Show Image Counts #5

Closed azharc closed 7 years ago

azharc commented 7 years ago

Testing out ImageKit, which is an amazing plugin!

The panel widget is showing '...' for both items though, even though the plugin seems to be working properly. 

There is nothing in the error logs (or console). 

Kirby & Panel 2.3.2, PHP 7, Apache. 

Is there anything else I can do to help diagnose this issue? Enabling imagekit.debug doesn't seem to provide any useful information. 

screen shot 2016-11-25 at 8 42 48 pm

Thank you Fabian!

fabianmichael commented 7 years ago

Hey @azharc,

imagekit.debug is currently meant for development purposes of the plugin and it’s main function is to avoid the deletion of job files in your thumbs directory.

To chase your issue, the first step would be to open the web development tools and watch for an XHR (Ajax) request to plugins/imagekit/widget/api/status. Please check the response of that request and tell me, what the server responds. Which browser are us using?

Thanks for your help.

Cheers Fabian

azharc commented 7 years ago

Hi Fabian,

I found the issue. Seems like the JS file wasn't being loaded at all.

All I had to do was change line 45 in imagekit.html.php to: echo f::read(__DIR__ . '/assets/js/dist/widget.min.js');

Previously it was referencing 'widget.js' which doesn't exist.

fabianmichael commented 7 years ago

Thanks for your help, just pushed a commit (b8da0cab827138c5c1f4e95fc14f5844b45b0694) that fixes this.

Have a nice sunday :-)