Minigallery (v2.5.0) - better again

henri

Sorry,

I had done this test on Ruud's message
Reply # 21 on: January 19, 2019, 11:20:37 PM

dbs

QuoteSun, 20 Jan 2019 19:18:00 +0000 [E_NOTICE] /modules/minigal2/functions.php:[210] from /modules/minigal2/functions.php:[28] isImageFile "getimagesize(): Read error!"
Sun, 20 Jan 2019 19:18:01 +0000 [E_NOTICE] /modules/minigal2/functions.php:[210] from /modules/minigal2/functions.php:[28] isImageFile "getimagesize(): Read error!"

Hello, this was answered some postings before:
Quote from: RuudThe message is shown by WB when your error-reporting is set to "Development" mode.
For some reason WB switches off the standard way of suppressing errors (using the @ character) when this setting is used.

So, nothing wrong. Just a little bit too critical error reporting.
[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

henri

PHP-Version: 7.2.13
WebsiteBaker Version: 2.12.1 -r188

Corresponds to error message with MiniGallery 2.5.1

Also Foldergallery v3.0.14 tested with 12 images.
Setting PHP error level: Production.
Setting PHP error level: Development.

No error messages in WebsiteBaker Error log.


henri

PHP-Version: 7.2.13
WebsiteBaker-Version: 2.12.1 -r188

MiniGallery Version 2.5.1 tested with 16 images.
No error messages in WebsiteBaker Error log.
Setting PHP error level: Production.

If I set PHP error level to: Development
Then I get the following error messages

Sun, 20 Jan 2019 19:18:00 +0000 [E_NOTICE] /modules/minigal2/functions.php:[210] from /modules/minigal2/functions.php:[28] isImageFile "getimagesize(): Read error!"
Sun, 20 Jan 2019 19:18:01 +0000 [E_NOTICE] /modules/minigal2/functions.php:[210] from /modules/minigal2/functions.php:[28] isImageFile "getimagesize(): Read error!"
Sun, 20 Jan 2019 19:18:01 +0000 [E_USER_DEPRECATED] /framework/class.frontend.php:[335] from /modules/droplets/droplets.php(34) : eval()'d code:[5] frontend->preprocess "invalid method call: frontend::preprocess""

Gast

possible, that you add some pic's via FTP there? maybe, a hidden file inside of this folder (not every ftp-client show all files in the default settings).
i test it with different PHP-Version (7.2.0, 7.2.8, 7.3.0), no problems

this part of the script build's the preview-thumbs for this section
the 4 warnings in your last message show's everywhere the same problem. this four functions works with a path or the informations from there. (for example: if getimagesize() has no informations about the size, this size is missing in the next function imagecopyresampled() ). equal in all this functions is the source path to the image. Ruud write the answer: a image (or the info inside of the image) is broken or the selected file is not an image

try to call all images in this folder step by step in a browser. you can also delete all the thumbs in this yolder /media/minigal2/[your-section-id]/thumbs and reload the section in you wb-backend again, then compare the pictures in this picture folder with the pictures in the thumb-folder. normalize, the script breaks in this step with the result, that one pic is missing in the thumb-folder - so you found the source picture with the problem

if the problem coms again, we can set some exeption inside of this function, so that you see, what the source is

Ruud

Tried to reproduce the warning on PHP 7.2.13. (minigal2 v2.5.1)
For me it seems to work ok. No problems or warnings.

The warning is caused because the function "imagecreatetruecolor" is called with wrong parameters.
These parameters are basically created by the call in line 102 ( $info = getimagesize($source); )
The manual for the PHP function getimagesize says to be sure the file is a valid image or it will giive unexpected result (without failure). So it could be one of the images in the directory is corrupt or not an image at all.

[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

noname8

This worked before, but now i tried it again, in php 7.2 server
when "refresh images"
any ideas ? tried already  chmodding the folder
Warning: imagecreatetruecolor(): Invalid image dimensions in /var/www/xxxx/modules/minigal2/functions.php on line 169

Warning: imagecopyresampled() expects parameter 1 to be resource, boolean given in /var/www/xxxx/modules/minigal2/functions.php on line 187

Warning: imagejpeg() expects parameter 1 to be resource, boolean given in /var/www/xxxx/modules/minigal2/functions.php on line 195

Warning: imagedestroy() expects parameter 1 to be resource, boolean given in /var/www/xxxx/modules/minigal2/functions.php on line 203


this seems to be some kind of problem of my php / website baker creating dir & filesthat does not have enough permissions..

Gast

see readme since WB 2.10.0

QuoteExtended error handling
    The already existing error handling in WB 2.10.0 has been extended by a few setting possibilities.
    The error reporting setting in the WB options has been re-enabled.
    The following settings are possible:
   

    "Switched Off" = No error messages.
    "Production Mode" = All error messages are not suppressed by the @error control operator.
    "Developer Mode" = Show all error messages, even those with @error control operator.

the @ is a allowed php-error control operator and in use, if you know, a empty answer for a special request is possible, but not the standard answer.
it's not a real error, it's a info, that you suppress somewhere a information from the script with the @error control operator.

hgs

PHP-Error in WB-Options is  "Developer"
because it is a developer environment and there WebsiteBaker is tried to code without "messages" in the ErrorLog.
For testing purposes we also install all modules from our own repro and popular modules there.
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

Gast

Quote from: hgsChanged the code, the message stays the same.
your PHP-Error in WB-Options is set to "Developer" or "Production"?

hgs

Changed the code, the message stays the same.
Page reloaded with F5 and ctrl+F5
The code now looks like this:
if (!function_exists('isImageFile')) {
function isImageFile($filename) {
      //if(@!is_array(getimagesize($filename))){
if(@!is_array(@getimagesize($filename))){
return false;
}
return true;
}
}
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

Ruud

Quote from: hgs on December 19, 2018, 01:22:56 PM
[E_NOTICE] /modules/minigal2/functions.php:[210] from /modules/minigal2/functions.php:[28] isImageFile "getimagesize(): Read error!""
Is there a solution to this?

Try changing line 210 in functions.php from
if(@!is_array(getimagesize($filename))){
into
if(@!is_array(@getimagesize($filename))){

That might fix the notice in the errorlog.
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

hgs

Hello Ruud
The miniGallery 2.5 writes the following message to the errorlog
[E_NOTICE] /modules/minigal2/functions.php:[210] from /modules/minigal2/functions.php:[28] isImageFile "getimagesize(): Read error!""
Is there a solution to this?

PHP-Version: 7.2.11
WebsiteBaker-Version: 2.12.1 -r188
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

Ruud

Quote from: noname8 on August 24, 2018, 08:34:21 AM
Somehow the minigallery sorting does not work.
I can't explain it, i have inserted the photos with sort numbers about 9000 but seems it has no effect.
Manually dragging file works, but number to sql comes 99 107 or similiar.
Not really sure what you mean here..

Remember that for sorting routines 10000 comes before 99.
Sorting is initially done per filename characters , so the 1 from 10000 is lower than the 9 from 99.
If you want to sort numeric imagenames correctly use 00001, 00002 etc..

After this first load the sorted filenames are stored in the settings and you can drag&drop them around for manual sorting. Any additional uploads will be appended behind the existing sortlist (sorted on filename) whenever the images are reloaded (either backend/frontend page refresh).

Quote from: noname8 on August 24, 2018, 08:34:21 AM
In the code there is sort parameter many place but no sort setting in the admin gallery settings ?
There is a field "sorting" in the wb_mod_minigal2 table. It is created on module install or when upgrading from older versions.

Quote from: noname8 on August 24, 2018, 09:17:23 AM
Found a bug, when you delete image the description row in the mod_minigal2img table does not get deleted
This is not a bug, it is intentionally kept to be able to use the same caption whenever the same image (or complete gallery) is uploaded again (replaced).
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

noname8

so the sorting is not the number but | list in the settings.


Found a bug, when you delete image the description row in the mod_minigal2img table does not get deleted

noname8

Somehow the minigallery sorting does not work.
I can't explain it, i have inserted the photos with sort numbers about 9000 but seems it has no effect.
Manually dragging file works, but number to sql comes 99 107 or similiar.

In the code there is sort parameter many place but no sort setting in the admin gallery settings ?

Ruud

The message is shown by WB when your error-reporting is set to "Development" mode.
For some reason WB switches off the standard way of suppressing errors (using the @ character) when this setting is used.

So, nothing wrong. Just a little bit too critical error reporting.
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

hgs

Have now installed a fresh Wb 2.12 with php 7.2 and minigallery 2.5.1.
These error messages come only with the installation of the module minigallery

Fri, 25 May 2018 10:57:01 +0000 [E_NOTICE] /modules/minigal2/functions.php:[210] from /modules/minigal2/functions.php:[28] isImageFile "getimagesize(): Read error!"
Fri, 25 May 2018 10:57:25 +0000 [E_NOTICE] /modules/minigal2/save.php:[77] from /modules/minigal2/save.php:[77] WbErrorHandler "Undefined index: PAGES"
Fri, 25 May 2018 10:57:27 +0000 [E_NOTICE] /modules/minigal2/functions.php:[210] from /modules/minigal2/functions.php:[28] isImageFile "getimagesize(): Read error!""


Where the second message is fixed quickly, strange are the messages to pictures that have not yet been uploaded ??
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

hgs

Have now tested the php version of 7.2 to 7.1 and 7.0, the error message remains unfortunately.
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

hgs

I have deleted all images, the directories wash empty afterwards.
I changed the line 210 so.
Then the pictures uploaded again via the BE from the module and the pictures updated.
The error message still appears.

It's about this site
https://reverend-biola.org/
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

Ruud

It could be some other file was uploaded or created..
Using "delete all" in the module should remove the complete folder and create a new one.

The error (notice) could be handled better by minigal2.
You can try to modify line 210 in functions.php ( /modules/minigal2/functions.php )
if(@!is_array(getimagesize($filename))){
into
if(!is_array(@getimagesize($filename))){

That might help suppressing the message.
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

hgs

Okay, thanks for the hint. In the FE the pictures are all to see and in the BE I have updated all images again. The message remains unfortunately.
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

Ruud

Quote from: hgs on May 25, 2018, 10:51:26 AM
Minigallery 2.5.1 throws the following error in the error log
Fri, 25 May 2018 08:37:11 +0000 [E_NOTICE] /modules/minigal2/functions.php:[210] from /modules/minigal2/functions.php:[28] isImageFile "getimagesize(): Read error!"
The message just means it is trying to check a file that is either no image or a corrupted imagefile.
So, you could check the folder for invalid files.
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

hgs

Minigallery 2.5.1 throws the following error in the error log
Fri, 25 May 2018 08:37:11 +0000 [E_NOTICE] /modules/minigal2/functions.php:[210] from /modules/minigal2/functions.php:[28] isImageFile "getimagesize(): Read error!"

WebsiteBaker 2.12
php 7.2.1
strikt no

What can I do?
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

dbs

My client is happy with the new version.
I didn't explain anything. It was intuitive enough.  (Y)

Thank you, Ruud!
[url="https://onkel-franky.de"]https://onkel-franky.de[/url]