Comments (9)
Hey @dkerzig,
at least you routing setup should be fine, as otherwise ImageKit could not display those red error images. These errors are mostly caused by:
- Insufficient permissions on the thumbs folder
- PHP does not have enough memory avalable for processing large images. This error usually only occurs when using the GD libary for thumbnail creation. (see you error log for messages like "PHP Fatal error: Allowed memory size of […] bytes exhausted". If you’re already on Kirby 2.4, my error images do not always show up, because ImageKit’s error-handling seems to interefere with the new implemented one of Kirby, I have to further investigate this. But if there are no errors, it should not cause any other problems.
- If you use ImageMagick, you might have to set the correct path to the executable in your config.php
Please check all of those 3 possibilities.
To provide you some help with the admin panel, if would be very helpful, if you could open the dev tools of you browser, catching all AJAX/XHR requests done by the widget. Please check the responses. If there’s something suspicious, please tell me.
If nothing of that works, I would be great, if you could give me temporary access to your panel, so I can have a look.
from kirby-imagekit.
Hi Fabian,
so one part of the problem is solved. It turned out that in my freshly installed php7-environment the gd-package was not installed by default and I had to do this manually. (If somebody stumbles into the same: sudo apt-get install php7.0-gd
.)
Now there are no longer these red warning thumbs an all seems to be properly generated if I open the specific page. Unfortunately the discovery & generation in the panel-widget still has the same problem :/
I will do some AJAX-debugging in the next days and will post my results here :)
Thanks for your help,
Dennis
from kirby-imagekit.
Hey Dennis, nice to hear that you could solve at least one part of the plugin. If anyway, if you’re able to install whatever you like on your server, I can only recomend to use ImageMagick instead of GD library. Image Quality, Speed and possibilities of optimization are far greater, that with the GD library (especially when combining it with the optimizers of the upcoming ImageKit 1.1).
I’m excited to hear about your AJAX-debugging results.
Cheers
Fabian
from kirby-imagekit.
Hey Fabian,
I installed ImageMagick via sudo apt-get install php-imagick
and set the following in my config: c::set('imagekit.driver', 'im')
. Still the same problem.
I made a screenshot of the console JS-error and XHR-requests when I click the generate-button. (The first XHR request in the list is made before that click).
I've also created a login for you to the server & panel and will send you a pm shortly :)
Dennis
from kirby-imagekit.
Hey Dennis,
using ImageMagick has nothing todo with the panel widget, as it is only another backend for Kirby to process thumbnails. ImageKit uses Kirby’s built-in Thumb class as well as the built-in driver. Also, Kirby does not use PHPs Imagick-extension, but the ImageMgick command-line utility. In order to activate ImageMagick, your have to install the CLI tools on your server, those are completely independent from PHP. And you have to activate it in your config.php like this:
c::set('thumbs.driver','im');
c::set('thumbs.bin', '/usr/local/bin/convert');
I trief to investigate into your wigdet issue, but I cannot solve it so far. there are several HTML errors in the page "kontakt", but when I copied the code into an empty template on my test server, it worked. Maybe I could have a look at your template code. Did you turn on debugging in your config file/could you find something in the PHP error log file?
BTW: Kirby 2.4 will introduce a new improved error handling interface as well as the content represenations. These changes are partially in conflict with the ImageKit widget. That means, error handling needs a few adaptions be further improved. But as your site uses Kirby 2.3.2, this should not be an issue.
from kirby-imagekit.
Hi Fabian,
it's so curious that everything works fine on both my local and the production apache. This is the error.log from the nginx-environment:
2016/10/19 09:21:06 [error] 20679#20679: *111 FastCGI sent in stderr: "PHP message: PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/beta.wottpal.com/normannenhaus/kirby/toolkit/lib/f.php:752) in /var/www/beta.wottpal.com/normannenhaus/site/plugins/imagekit/lib/complainingthumb.php on line 152
PHP message: PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/beta.wottpal.com/normannenhaus/kirby/toolkit/lib/f.php:752) in /var/www/beta.wottpal.com/normannenhaus/site/plugins/imagekit/lib/complainingthumb.php on line 153
PHP message: PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/beta.wottpal.com/normannenhaus/kirby/toolkit/lib/f.php:752) in /var/www/beta.wottpal.com/normannenhaus/site/plugins/imagekit/lib/complainingthumb.php on line 154
PHP message: PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/beta.wottpal.com/normannenhaus/kirby/toolkit/lib/f.php:752) in /var/www/beta.wottpal.com/normannenhaus/site/plugins/imagekit/lib/complainingthumb.php on line 163" while reading upstream, client: 178.62.248.166, server: beta.wottpal.com, request: "GET /normannenhaus/thumbs/veranstaltungen/voita-cd-release-party/dsc09959-400x266-47-26.jpg HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "beta.wottpal.com", referrer: "https://beta.wottpal.com/normannenhaus/"
2016/10/19 10:17:08 [error] 20679#20679: *124 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class 'DOMDocument' not found in /var/www/beta.wottpal.com/normannenhaus/site/plugins/imagekit/widgets/imagekit/lib/api.php:62
Stack trace:
#0 [internal function]: Kirby\Plugins\ImageKit\Widget\API->Kirby\Plugins\ImageKit\Widget\{closure}('<!DOCTYPE html>...', 9)
#1 {main}
thrown in /var/www/beta.wottpal.com/normannenhaus/site/plugins/imagekit/widgets/imagekit/lib/api.php on line 62" while reading response header from upstream, client: 94.219.203.145, server: beta.wottpal.com, request: "GET /normannenhaus/kontakt HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "beta.wottpal.com", referrer: "https://beta.wottpal.com/normannenhaus/panel/"
2016/10/19 10:17:26 [error] 20679#20679: *135 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class 'DOMDocument' not found in /var/www/beta.wottpal.com/normannenhaus/site/plugins/imagekit/widgets/imagekit/lib/api.php:62
Stack trace:
#0 [internal function]: Kirby\Plugins\ImageKit\Widget\API->Kirby\Plugins\ImageKit\Widget\{closure}('<!DOCTYPE html>...', 9)
#1 {main}
thrown in /var/www/beta.wottpal.com/normannenhaus/site/plugins/imagekit/widgets/imagekit/lib/api.php on line 62" while reading response header from upstream, client: 94.219.203.145, server: beta.wottpal.com, request: "GET /normannenhaus/kontakt HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "beta.wottpal.com", referrer: "https://beta.wottpal.com/normannenhaus/panel/"
2016/10/19 11:34:53 [error] 20679#20679: *160 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class 'DOMDocument' not found in /var/www/beta.wottpal.com/normannenhaus/site/plugins/imagekit/widgets/imagekit/lib/api.php:62
Stack trace:
#0 [internal function]: Kirby\Plugins\ImageKit\Widget\API->Kirby\Plugins\ImageKit\Widget\{closure}('<!DOCTYPE html>...', 9)
#1 {main}
thrown in /var/www/beta.wottpal.com/normannenhaus/site/plugins/imagekit/widgets/imagekit/lib/api.php on line 62" while reading response header from upstream, client: 94.219.203.145, server: beta.wottpal.com, request: "GET /normannenhaus/kontakt HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "beta.wottpal.com", referrer: "https://beta.wottpal.com/normannenhaus/panel/"
I have send you a bundle of my site via mail, if you want to investigate further. Templates and Snippets are in the /src/site/ folder and you can compile it easily via gulp dist
if you've done a npm install
. Then you obviously need an apache/nginx to test :)
Thank you,
Dennis
from kirby-imagekit.
And a note on the kontakt
, veranstaltungen
and buchen
-pages: They all go for the default template which results in an empty page. I only use them embedded in my home-page via snippets.
from kirby-imagekit.
PHP Fatal error: Uncaught Error: Class 'DOMDocument' not found in /var/www/beta.wottpal.com/normannenhaus/site/plugins/imagekit/widgets/imagekit/lib/api.php:62
Do you have the DOM module of PHP installed? ImageKit uses it to scan throught pages. This would explain a lot …
from kirby-imagekit.
I've installed the dom-module via sudo apt-get install php-xml
, restarted my server and now it works.
Is there a way to do any kind of feature-detection so you could display these kind of problems as a warning in the panel-widget? I really wonder why all these packages (php7.0-gd
and php-xml
) were not included by default in my php7 installation :/ Or just include it in the Troubleshooting-Section.
Thank you so much!
🎉🎉🎉🎉🎉🎉🎉
OT: Really looking forward to future updates and your responsive-plugin (currently I use a handcrafted solution like you can see in the bundle I've send. I particularly mean src/site/plugins/responsify
for cropping responsive versions via the focusCrop-plugin and src/js/lazy-img.js
for lazy-loading.
For example I use it to generate images in /src/site/snippets/components.event-card.php
just if you are curious. :)
Dennis
from kirby-imagekit.
Related Issues (20)
- source images get deleted HOT 5
- WebP support HOT 2
- Mozjpeg on osx HOT 1
- Use kirby build im image optimize HOT 4
- Allow exclusion of specific pages and/or templates
- Mac mozjpeg is in brew HOT 1
- ImageKit Crawler throws an error, when an empty document is searched for links
- Image-Discovery seems to not work when using specific routing HOT 4
- Create thumbnails in panel fails HOT 3
- Feature-Request: Imageset + Focus HOT 5
- Doesn't work with thumb presets
- Widget conflict HOT 2
- ImageSet + ImageKit HOT 5
- Scanning pages... but no progress HOT 1
- Allow caption from file metadata
- Discovery crawler libxml error on thumbnail Create HOT 2
- How to trigger thumbnail-generation with cronjob on VPS? HOT 1
- Support thumbnail generation via cronjob.
- JPNG.svg support
- Kirby 3 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kirby-imagekit.