Closed dyrer closed 1 year ago
Hey partida! 👋 😄...if you navigate to Reports >> Status report, what does it say for "GD library rotate and desaturate effects" and "PHP extensions" I think that if gd
is not listed in the extensions, then that might be your issue:
Hi Greg, No gd is enabled.
Hmmm. Seems that we'll need to fire up a setup using OpenLiteSpeed to troubleshoot this further. Sorry patrida, but I don't have time for this right now.
Both Backdrop and Drupal do not officially support OpenLiteSpeed as it seems:
https://backdropcms.org/requirements https://www.drupal.org/docs/7/system-requirements/web-server https://www.drupal.org/docs/8/system-requirements/web-server
...and I have found quite a few issues already reported in d.org:
https://www.drupal.org/project/drupal/issues/1176508 https://www.drupal.org/forum/support/post-installation/2015-01-21/htaccess-problem-in-litespeed-not-working
@dyrer if you are still interested in pursuing this, these might be of help (noting them here for my own benefit too, for future reference):
https://openlitespeed.org/mediawiki/index.php/Help:Install:Drupal (although that one goes back to D6)
https://forum.backdropcms.org/forum/no-thumbnails-library Another guy in forums reports the same problem
Thanks for pointing that forum topic out @dyrer 👍
...some people there report that thumbnail conversion works with apache and nginx but not with LiteSpeed and Lighttpd, but at the time of writing there is also one person reporting the issue with nginx.
Others mention noticing that thumbnails aren't being generated when uploading via CKEditor, but are being generated when uploaded as an image field on a content type. I have tested this on my local with Apache (Mac OS 10.13.6 host - Ubuntu 16.04 VM, Apache 2.4.33, php 7.1.24), but I could not reproduce it, as both methods resulted in properly-generated thumbnails.
Note for people reporting the problem here in the future, please also report your server and its version, and also php version being used. Might also help to indicate if you are noticing the problem on shared hosting or VPS, or your local + what is the operating system and its version.
@dyrer in your admin list of views can you see the view 'Image Library'? If you select 'configure' for this view and then 'update preview' are you seeing any thumbnails in the preview on this admin page?
I am just wondering at what stage Backdrop is losing the correct href for the images.
I also do not see thumbnails in library. When I select 'Image Library' view, thumbnails are broken there as well.
I use shared hosting. My server: Apache/2.2.33-dev (Unix) mod_ssl/2.2.33-dev OpenSSL/1.0.1e-fips Phusion_Passenger/5.1.12 PHP/7.2.11 mod_wsgi/4.5.2 Python/2.7.5 GD library: bundled (2.1.0 compatible).
@korontari thank you for trying the 'Image Library' view. Please can you now look at the files on your server to see whether Backdrop has created the thumbnail image files which you should see in the folder /files/styles/thumbnail/public
If the thumbnail files are there we must have a problem with Views referencing them properly.
I found that there are no /thumbnails directory in /files/styles.
Here are a few observations that might be important for the issue:
Thank you and I hope this is helpful.
@korontari thank you, yes that is helpful. It seems that if the public file system path is changed from the default value 'files', Views is not generating the correct file path for the thumbnails. This is at the setting for the field 'File: Path (thumbnail)' 'Use full URL instead of file storage URI'. I will have a look at the code and see if I can provide a fix.
PR https://github.com/backdrop/backdrop/pull/2408 now available.
@Graham-72 I have left a comment in the PR re the use of strlen()
to count number of characters. It might be related to the problem here, or at least should be taken into account.
@dyrer, @korontari did any of you guys use a path that had non-latin characters for storing files?
No, I have only latin characters in the path.
@klonos I have responded to your comment in the PR and done a test which would seem to indicate that the proposed fix is OK with multi-byte characters.
Thanks @Graham-72 👍
@korontari, @dyrer do you guys have the time to test the fix and confirm if it fixes the problem for you?
I probably could try a quick test but I don't know how to apply a fix - I am not a coder. May be you could explain me how to do this?
@korontari Let's see if these instructions will work:
1) Download a patch version of the PR from https://patch-diff.githubusercontent.com/raw/backdrop/backdrop/pull/2408.patch (I got this URL by adding .patch onto the end of the PR link above)
2) Save this file into into the Backdrop site root, right next to index.php
3) Navigate into the Backdrop site root via command line
4) from the Backdrop site root type patch -p1 < 2408.patch
5) if there are no errors, try the image library again to see if the problem is fixed
@jenlampton Well, that was quite a hardcore task to me. :smile: I do not get how you got the link, just used yours to download the patch file. And it took me a while to guess where I should put this "patch" command. Somehow I pressed the SSH thing in my host provider panel and it worked!
@klonos It looks like patch fixes the problem. I now see all thumbnails in "select from library" area and they can be located in /my_custom_files_folder/styles/thumbnail/public directory. I also added a new image file via custom content type and then removed it - thumbnail was created and deleted accordingly. So it seem to work properly in my setup.
Thank you guys, but I will wait for next patched release.
@korontari Congratulations on applying your first patch :) And best of all -- it worked for you!
I also had the same issue. The patch worked for me as well although no shell access with my host so manual editing. Good thing that .patch file is plain text.
Thanks for testing this @Chas-Davis, and for taking the time to report back 👍
I left a comment on the PR about using backdrop_substr()
instead of substr()
. If we can use that instead, that would be preferable.
@Graham-72 made a last edit and I think he's right that the current code is fine, and easier than rewriting to use backdrop_strpos()
just because it's there. This didn't make it into 1.11.4 but it will be in 1.12.1. Thanks @Graham-72, @dyrer, @klonos, @korontari, @jenlampton, and @Chas-Davis!
Merged https://github.com/backdrop/backdrop/pull/2408 into 1.x and 1.12.x.
I am still having problems with thumbnails, https://www.screencast.com/t/aZbSuwO0DUA The correct thumbnails uploaded from default image field and the corrupted from the image file manager. Here is also my status report https://www.screencast.com/t/VMlD2Kv4le8
Re-opening this issue until we can sort out @dyrer 's problem.
@dyrer if you look in the admin listing of files (Manage files) can you see the missing images listed there, e.g. an entry for dangerous.jpg
? If so, when you hover on the filename in this listing, what link is it showing? Is it linking to a file of exactly the same name and does the link work from there? [I am trying to understand what might be happening in your system].
With inspect I have links like this /files/styles/thumbnail/public/inline-images/hestiacp_term.jpg but there are any directories in /files/styles/ here also my /files/ structure https://www.screencast.com/t/oRWWunhlyqzL
In a previous screencast https://www.screencast.com/t/aZbSuwO0DUA there were three images showing and four not showing.
The images that are showing I expect would have links like ....../files_public/styles/thumbnail/public/inline-images/filename.jpg
This is on a Backdrop site where the Public File System Path is defined as files_public
Where in your site are the four missing image files - the ones that do not have images appearing in the library in your screencast image? Does 'Manage files' help you find this? I would like to know whether your system has created a styles folder within that folder.
For example, where in your system is the file dangerous.jpg? I mean, which folder is it in?
What folders are there within your styles folder shown in https://www.screencast.com/t/oRWWunhlyqzL ?
yes this was from a test server with hestiaCP , is deleted now
The last one is with my main web configuration with runcloud.io and this mainly I care about.
runcloud.io disables also by default these extensions
getmyuid,passthru,leak,listen,diskfreespace,tmpfile,link,ignore_user_abort,shell_exec,dl,set_time_limit,exec,system,highlight_file,source,show_source,fpassthru,virtual,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_open,proc_close,proc_nice,proc_terminate,escapeshellcmd,ini_alter,popen,pcntl_exec,socket_accept,socket_bind,socket_clear_error,socket_close,socket_connect,symlink,posix_geteuid,ini_alter,socket_listen,socket_create_listen,socket_read,socket_create_pair,stream_socket_server
As I understand it runcloud.io provides a Server Management Panel on top of an underlying web server. I am unable to set up a test installation and so cannot find out what exactly you are experiencing. Sorry I cannot help you more.
I have similar issue with thumbnails in library - some of them are just missing. All links point to standard location: /files/styles/thumbnails/public. It looks like not all thumbnail images where generated.
Status report:
@korontari please can you check whether the original image file still exists in /files/public? The only times I have experienced this behaviour is when a temporary image file has been deleted by housekeeping.
@Graham-72 I have checked and found the following:
@korontari thank you for the extra information. I am thinking that there must be some sort of timing race that is showing up on your server. I think that the image library function is calculating the URL of where the thumbnail file will be and sending this to the browser before the server has stored the thumbnail in this location. I am not experiencing this problem on my server.
On a test site I have created a situation where the same image is uploaded three times, twice via CKeditor into the body and once as the image file in a post. This results in it appearing three times in the image library, as seen here As you can see each of the three identical thumbnails has the same name though in fact they are three separate files as can be seen by inspecting the code, which is
In my opinion it is unfortunate that for 'image-library-filename' we are using the human-readable name and not the actual file name. (Backdrop adds a suffix _0, _1 etc when a file with an identical name is uploaded into the same folder). This is a wider issue, raised by @jenlampton in issue #4175.
On an established site where a site editor has, for good reasons, uploaded the same image multiple times, I am finding it difficult with our existing admin capabilities to find out all that I need to know about these different files, hence would welcome some extra help - issues #3904 and #4175 .
@Graham-72 , thank you for the in depth explanation. The last time I looked into the image library all thumbnails where in place. So it really seems like a timing related issue in my case. I do agree that filename should be an actual filename. I have left a more detailed feedback here: #3904.
We don't have PR here to solve the latest problem yet, so adjusting tags and milestones.
All that time I've made a lot of test with other control panels and configuration for example, aaPane (nginx)l, gridepane(nginx), cyberpanel(openlitespeed) and thumbnails same problem. With VestaCP, HestiaCP (apache with nginx proxy), ploi.io (nginx) are working so I believe is something with server configuration not permissions.
As per request in #5525 I have tested this on my LiteSpeed Hosting and I do see thumbnails for png and jpeg in library.
I don't see them for SVG but this is the same for apache (tested on Lando), even with the SVG Image Support enabled. However, that is a separate issue
Yup, I now have an actual site hosted on LiteSpeed, and I can confirm that there is no issues with generating thumbnails on the image library dialog.
@dyrer are you still having this issue?
Yes, with Runcloud.io and working great with hestiaCP. Runcloud is with openlitespeed and hestiaCP nginx with Apache. @klonos Your host is using Openlitespeed or Litespeed?
Since the PR for this issue has been merged, I'm going to close this issue as fixed. If anyone is still having this problem, feel free to re-open this issue or create a newer one.
No thumbnails in library
I am using openlitespeed server, with PHP 7.1 (No apache, no nginx)
In library media there are empty thumbnails just the filenames
PR by @Graham-72 : /backdrop/backdrop/pull/2408