The plugin breaks under PHP 8. For example these errors will break the site under PHP 8:
media-settings.php line 43: ‘create_function’ was removed in 8.0 PHP version
media-tags.php line line 48: ‘create_function’ was removed in 8.0 PHP version
media-tags.php line line 55: ‘create_function’ was removed in 8.0 PHP version
And there are also many undefined variable and undefined constant errors that will break under PHP 8.
This is the full error and warning report:
'Inspections Results' project 52 errors 99 warnings 27 weak warnings
PHP group 52 errors 99 warnings 27 weak warnings
Code smell group 9 warnings
Inconsistent return points inspection 9 warnings
file attachments-custom-fields.php 2 warnings
WARNING Missing return argument
WARNING Missing return argument
file file-gallery.php 1 warning
WARNING Missing return argument
file main.php 2 warnings
WARNING Missing return argument
WARNING Missing 'return' statement
file media-tags.php 1 warning
WARNING Missing 'return' statement
file TreeBuilder.php 3 warnings
WARNING Missing 'return' statement
WARNING Missing 'return' statement
WARNING Missing 'return' statement
Control flow group 1 warning
Unreachable statement inspection 1 warning
file mime-types.php 1 warning
WARNING Unreachable statement
General group 3 errors 2 warnings
Array index is immediately rewritten inspection 2 warnings
file media-settings.php 1 warning
WARNING Array index is immediately overwritten before accessing
file regenerate-images.php 1 warning
WARNING Array index is immediately overwritten before accessing
Element is not available in configured PHP version inspection 3 errors
file media-settings.php 1 error
ERROR 'create_function' was removed in 8.0 PHP version
file media-tags.php 2 errors
ERROR 'create_function' was removed in 8.0 PHP version
ERROR 'create_function' was removed in 8.0 PHP version
Probable bugs group 1 error 45 warnings
Empty index operator not supported for strings inspection 1 error
file main.php 1 error
ERROR '[]' operator not supported for strings
Expression result unused inspection 1 warning
file TreeBuilder.php 1 warning
WARNING Expression result is not used anywhere
Optional before required parameter inspection 2 warnings
file attachments.php 1 warning
WARNING Optional parameter is provided before required
file file-gallery.php 1 warning
WARNING Optional parameter is provided before required
Statement has empty body inspection 41 warnings
file attachments-custom-fields.php 2 warnings
WARNING Statement has empty body
WARNING Statement has empty body
file InputStream.php 1 warning
WARNING Statement has empty body
file Tokenizer.php 7 warnings
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
file TreeBuilder.php 31 warnings
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
WARNING Statement has empty body
Void function result used inspection 1 warning
file TreeBuilder.php 1 warning
WARNING 'void' method 'emitToken' result used
Type compatibility group 1 error 23 warnings
Arithmetic operation with unsupported operands inspection 1 error
file attachments-custom-fields.php 1 error
ERROR Unsupported operand types in '\unknown_type % int' will cause a PHP 8 TypeError
Incompatible return type inspection 3 warnings
file attachments-custom-fields.php 3 warnings
WARNING Return value type is not compatible with declared
WARNING Return value type is not compatible with declared
WARNING Return value type is not compatible with declared
Parameter type inspection 20 warnings
file attachments-custom-fields.php 3 warnings
WARNING Parameter '$count' type is not compatible with declaration
WARNING Parameter '$metadata' type is not compatible with declaration
WARNING Parameter '$post' type is not compatible with declaration
file templating.php 1 warning
WARNING Parameter 'wp_get_attachment_link($attachment?>ID)' type is not compatible with declaration
file Tokenizer.php 16 warnings
WARNING Parameter 'self::WHITESPACE' type is not compatible with declaration
WARNING Parameter '$mask' type is not compatible with declaration
WARNING Parameter 'self::ALPHA' type is not compatible with declaration
WARNING Parameter 'self::UPPER_ALPHA' type is not compatible with declaration
WARNING Parameter '"\t\n\x0C />" . self::UPPER_ALPHA' type is not compatible with declaration
WARNING Parameter 'self::UPPER_ALPHA' type is not compatible with declaration
WARNING Parameter '"\t\n\x0C /=>\"'" . self::UPPER_ALPHA' type is not compatible with declaration
WARNING Parameter ''"&'' type is not compatible with declaration
WARNING Parameter '"'&"' type is not compatible with declaration
WARNING Parameter '"\t\n\x0c &>\"'="' type is not compatible with declaration
WARNING Parameter ''>'' type is not compatible with declaration
WARNING Parameter ''?'' type is not compatible with declaration
WARNING Parameter 'self::ALPHA' type is not compatible with declaration
WARNING Parameter ''?'' type is not compatible with declaration
WARNING Parameter 'self::ALPHA' type is not compatible with declaration
WARNING Parameter '$char_class' type is not compatible with declaration
Undefined symbols group 47 errors 19 warnings 27 weak warnings
Undefined class inspection 16 warnings
file attachments-custom-fields.php 4 warnings
WARNING Undefined class 'unknown_type'
WARNING Undefined class 'unknown_type'
WARNING Undefined class 'unknown'
WARNING Undefined class 'unknown_type'
file attachments.php 1 warning
WARNING Undefined class 'echoes'
file file-gallery.php 1 warning
WARNING Undefined class 'Debug_Bar_Panel'
file InputStream.php 3 warnings
WARNING Undefined class 'Data'
WARNING Undefined class 'Bytes'
WARNING Undefined class 'Bytes'
file Parser.php 6 warnings
WARNING Undefined class 'HTML'
WARNING Undefined class 'Custom'
WARNING Undefined class 'Parsed'
WARNING Undefined class 'HTML'
WARNING Undefined class 'Custom'
WARNING Undefined class 'Parsed'
file Tokenizer.php 1 warning
WARNING Undefined class 'Data'
Undefined class constant inspection 1 error
file TreeBuilder.php 1 error
ERROR Constant 'INBODY' not found
Undefined constant inspection 1 error
file media-tags.php 1 error
WARNING Undefined constant 'MEDIA_TAGS_URL'
Undefined method inspection 3 warnings
file file-gallery.php 1 warning
WARNING Method 'title' is undefined
file regenerate-images.php 1 warning
WARNING Method 'get_error_message' is undefined
file TreeBuilder.php 1 warning
WARNING Method 'insertToken' is undefined
Undefined property inspection 4 weak warnings
file attachments.php 2 weak warnings
WARNING Property declared dynamically
WARNING Property declared dynamically
file TreeBuilder.php 2 weak warnings
WARNING Property declared dynamically
WARNING Property declared dynamically
Undefined variable inspection 45 errors 23 weak warnings
file attachments.php 2 weak warnings
ERROR Variable '$possible_new_attachments' is probably undefined
ERROR Variable '$promoted_id' is probably undefined
file file-gallery.php 1 error
ERROR Undefined variable '$acf_localize'
ERROR Undefined variable '$acf_options'
ERROR Variable '$transient' is probably undefined
file gallery.php 5 errors 1 weak warning
ERROR Undefined variable '$startcol'
ERROR Undefined variable '$endcol'
ERROR Undefined variable '$title'
ERROR Undefined variable '$thumb_link'
ERROR Undefined variable '$size'
ERROR Variable '$title' is probably undefined
file gallery.php 11 errors 1 weak warning
ERROR Undefined variable '$itemtag'
ERROR Undefined variable '$startcol'
ERROR Undefined variable '$endcol'
ERROR Undefined variable '$icontag'
ERROR Undefined variable '$title'
ERROR Undefined variable '$thumb_link'
ERROR Undefined variable '$thumb_width'
ERROR Undefined variable '$thumb_height'
ERROR Undefined variable '$size'
ERROR Undefined variable '$thumb_alt'
ERROR Variable '$title' is probably undefined
ERROR Undefined variable '$captiontag'
file gallery.php 11 errors 3 weak warnings
ERROR Undefined variable '$link'
ERROR Undefined variable '$file_gallery_this_template_counter'
ERROR Undefined variable '$link_class'
ERROR Variable '$link' is probably undefined
ERROR Undefined variable '$endcol'
ERROR Variable '$diff' is probably undefined
ERROR Undefined variable '$caption'
ERROR Undefined variable '$thumb_link'
ERROR Undefined variable '$thumb_width'
ERROR Undefined variable '$thumb_height'
ERROR Undefined variable '$title'
ERROR Undefined variable '$size'
ERROR Undefined variable '$thumb_alt'
ERROR Variable '$link' is probably undefined
file gallery.php 2 errors 1 weak warning
ERROR Undefined variable '$endcol'
ERROR Undefined variable '$title'
ERROR Variable '$title' is probably undefined
file main-form.php 10 errors 7 weak warnings
ERROR Undefined variable '$output'
ERROR Undefined variable '$checked_attachments'
ERROR Undefined variable '$delete_what'
ERROR Undefined variable '$post_id'
ERROR Undefined variable '$gallery_state'
ERROR Variable '$file_gallery_options' is probably undefined
ERROR Variable '$gallery_state' is probably undefined
ERROR Undefined variable '$sizes'
ERROR Variable '$templates_dropdown' is probably undefined
ERROR Variable '$templates_dropdown' is probably undefined
ERROR Undefined variable '$single_state'
ERROR Variable '$single_state' is probably undefined
ERROR Variable '$post_id' is probably undefined
ERROR Undefined variable '$files_or_tags'
ERROR Undefined variable '$attachment_orderby'
ERROR Undefined variable '$attachment_order'
ERROR Variable '$post_id' is probably undefined
file media-settings.php 2 errors 1 weak warning
ERROR Variable '$output' is probably undefined
ERROR Undefined variable '$values'
ERROR Undefined variable '$values'
file mime-types.php 1 weak warning
ERROR Variable '$out' is probably undefined
file templates-media-wp39.php 1 error
ERROR Undefined variable '$post'
file templates-media-wp40.php 1 error
ERROR Undefined variable '$post'
file templates-media-wp43.php 1 error
ERROR Undefined variable '$post'
file templating.php 1 weak warning
ERROR Variable '$transient' is probably undefined
file Tokenizer.php 1 weak warning
ERROR Variable '$id' is probably undefined
file TreeBuilder.php 4 weak warnings
ERROR Variable '$in_stack' is probably undefined
ERROR Variable '$fe_af_pos' is probably undefined
ERROR Variable '$fe_af_pos' is probably undefined
ERROR Variable '$fe_af_pos' is probably undefined
]]>
Dear all,
after a php version update to 7.3, we encountered a problem on the plugin and the media gallery section of our site has stopped working with an error about a deprecated create_function.
We write here how we have solved it in case it serves others.
To solve the problem it is necessary to modify the following two files:
/wp-content/plugins/file-gallery/includes/media-tags.php
change row 48 from:
create_function(”, ‘file_gallery_media_tags_permalink_fields(“media_tag_taxonomy_name”);’),
to:
function(){file_gallery_media_tags_permalink_fields(“media_tag_taxonomy_name”);},
and change row 55 from:
create_function(”, ‘file_gallery_media_tags_permalink_fields(“media_tag_taxonomy_slug”);’),
to:
function(){file_gallery_media_tags_permalink_fields(“media_tag_taxonomy_slug”);},
/wp-content/plugins/file-gallery/includes/media-settings.php
change row 43 from:
add_settings_field(“size_” . $size, $translated_size . $size_translated, create_function(”, ‘echo file_gallery_options_fields( array(“name” => “‘ . $size . ‘”, “type” => “intermediate_image_sizes”, “disabled” => 0) );’), ‘media’, ‘intermediate_image_sizes’);
to:
add_settings_field(“size_” . $size, $translated_size . $size_translated, function(){echo file_gallery_options_fields( array(“name” => “‘ . $size . ‘”, “type” => “intermediate_image_sizes”, “disabled” => 0) );}, ‘media’, ‘intermediate_image_sizes’);
Best regards
MVP-Arena Team
Hello, since WP 5.0.3, with FG activated, it takes nearly 10 seconds to save a post. No problem if the plugin is desactivated.
]]>Hello,
Nice plugin but it needs some TLC. ??
Query Monitor reports:
Object
component: “Plugin: file-gallery”
file: “wp-content/plugins/file-gallery/includes/media-tags.php”
line: 48
message: “Function create_function() is deprecated”
stack: (2) [“file_gallery_media_tags_add_permalink_fields()”, “do_action(‘admin_init’)”]
type: “deprecated”
__proto__: Object
Ciao!
At today I continue using your fantastic plugin.
Now I have a problem with a site with WPML and WooCommerce.
I can’t find the solution.
FG wants to delete an image, but there is no image.
https://www.eun.ch/fg-image.jpg
Preview images in post list view are very big overlapping the edit link.
https://www.eun.ch/fg-listview.jpg
I’m very very sad ??
If you don’t support this plugin anymore, can you suggest me an alternative plugin that does the same as yours?
Thank you very much
Marco_it
We’re using the “simple” template and the thumbnails look great but the larger image is blurry. Is there anything we can change to fix that?
Thanks!
]]>Please read my previous post and offer some help. Thank you!
]]>I successfully installed and activated File Gallery, but when I go to the Media Library, WP’s default gallery opens.
I am using the Oshine theme v.4.4.1.
]]>Hello,
Screenshot https://i.imgur.com/GKvsl6u.png
Issue:
– Cannot attach image that is already uploaded before
– There is problem with File Gallery + WP Offload S3
Steps:
1) Upload images in a Page
2) The images will surely work in that page
3) So go to another page (either create a new one) then attach the images that has been upload in step 1 via File Gallery
4) Images attached is broken.
Example of broken image url:
broken: https://sta_index_slide_01-150×150.jpgtic-prince-1.wp-ha_index_slide_01-150×150.jpg.fa_index_slide_01-150×150.jpgstbooking.com/A_index_slide_01-150×150.jpg
correct but still broken: https://static-prince-1.wp-ha.fastbooking.com/A_index_slide_01-150×150.jpg
Basically after clicking “Attach all checked items to current post”, it must trigger WP Offload S3 to upload to S3. Maybe you can point me to the correct place so that I could debug and try to fix this part, thank you!
WordPress Version 4.4.2
File Gallery Version 1.8.5
Amazon Web Services Version 0.3.5
WP Offload S3 Lite Version 1.0.2
Thanks for a great plugin! I do have an issue – pagination is not appearing. I have the current WP depository version.
My client will have large galleries, and I got your plugin specifically for its gallery pagination. However, I’ve created a test post with a 20+ image gallery, and don’t see pagination kicking in. I wasn’t able to find any settings regarding the number of thumbnails per page or anything else related to pagination. What am I missing?
]]>In my theme, File Gallery breaks (again !) the default WP gallery rendering…
]]>Hi Bruno, thank you for this plugin – I am using it since years now very successfully.
Now I have to update several websites to WP 4.4.1.
The File Gallery Version 1.8.5 is basically working with 4.4.1, but the problem with the missing “Attach all selected Media to current post” in the dialog for adding media to a post has returned.
And also: sometimes, when adding 10 pics to a post none or only some pics show up in the file gallery area.
Any plans to to upgrade the plugin to WP 4.4.1?
Thank you!
Emanáku.
]]>Hello!
I notice that FG loads its own CSS only if the shortcode is inside the post.
I have a post that show himself, but also related posts using tags.
If the main post have the gallery then CSS will be load, but if the main post doesn’t have the gallery, but other in the loop yes, FG don’t load the CSS.
Question: how can I force FG to always load CSS?
Thank you very much, I use FG on all my sites ??
Very nice plugin
Hello there, I’m getting this small deprecated notice in your plugin:
Incorrect Use of register_taxonomy() Used in wp-content/plugins/file-gallery/file-gallery.php on line 922. Taxonomy names must be between 1 and 32 characters in length. This message was added in version 4.2.
To be forward-coded, can you add some changes to your plugin logic and add a condition to account for greater than 4.2 versions of wordpress in this case?
]]>Hi
I am optimising my site for speed and disabling any unneccessary css requests.
How do I stop file-gallery from loading the css please?
I seem to have two css files, columns.css and gallery.css.
Thanks
]]>In Chrome and Firefox (but not Safari), the photo thumbnails displayed by File Gallery are showing up on the page in a vertical column, not a horizontal row. I can fix the problem by clicking the little shield in the address bar and telling the page to run insecure scripts or display insecure elements.
For an example, look at this page: https://www.roaringmouse.org/classes/after-school/
In order for our online registration plugin to work correctly, our pages need to be HTTPS, not HTTP.
Is there a setting to force HTTPS delivery of all components of this plugin?
]]>Hi.
I’ve been using this plugin for a while. But reticently I realized it glitching on Google Chrome – doesn’t respond when you click on different parts of its functions and links.
Could you help me, please.
Thanks!
Hi,
l made update this plugin to 1.8.4, but what doesn’t work is url of crystal icons, now after update wordpress it shows wordpress icons url (/wp-includes/images/media/document.png) but l need to use crystal, so l find that there is FILE_GALLERY_CRYSTAL_URL and file_gallery_crystal_url filter, but it doesn’t exist – not working, so l was “scouting” your source code, but l didn’t find them – what happened. l was looking to version 1.7 and l found there this constant. Can you help me please ? Thanx Mickey
Hello Aesqe,
I’m sorry to announce that File Gallery breaks – again – Lightbox effect on regular WP galleries.
Tested with PrettyPhoto effect from Responsive Lightbox plugin.
]]>Hi there,
I am part way through retro-fitting a website that makes use of this plugin and wondering how to modify it so that it becomes responsive.
What currently happens is, as the screen narrows, the thumbnails also narrow, and eventually overlap. Is there a way to keep them the same size, but, as the screen narrows, change from three columns to two and if need be, one?
Any help that anyone can provide or if anyone knows a quick fix, would be most helpful.
With kind regards,
Mark
]]>Any chance there is place for a function that returns a collection of raw urls for images of a certain tag collection?
Use case is for backgrounds and other non <img>-tag related file management.
Are there security implications implementing this?
Maybe obligatory filters for a specific mimetype?
Thanks in advance
Tobias
[function.require]: Failed opening required ‘includes/templates-media-wp42.php’ (include_path=’.:/usr/local/php5_3/lib/php’) in /home/content/85/9609685/html/wp-content/plugins/file-gallery/file-gallery.php on line 1573
]]>I’ve update my wordpress & filegallery to the latest versions. Now I get the following error:
Uncaught ReferenceError: wp is not defined
in file-gallery.js?ver=1.8.3:13
The text editor doesn’t work anymore, the media browser shows an empty screen :'(
Where do I set the target=”_blank” to have the thumbnails come up in a new window? Thanks.
]]>And I get these errors. The bold ones occur when I activate the plugin:
Notice: add_custom_background is deprecated since version 3.4! Use add_theme_support( ‘custom-background’, $args ) instead. in /home/public_html/wp-includes/functions.php on line 3378
Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in /home/public_html/wp-includes/functions.php on line 3378
Notice: register_widget_control is deprecated since version 2.8! Use wp_register_widget_control() instead. in /home/public_html/wp-includes/functions.php on line 3378
Notice: Constant WP_POST_REVISIONS already defined in /home/public_html/wp-config.php on line 77
Notice: Constant WP_MEMORY_LIMIT already defined in /home/public_html/wp-config.php on line 78
Warning: Cannot modify header information – headers already sent by (output started at /home/public_html/wp-includes/functions.php:3378) in /home/public_html/wp-includes/pluggable.php on line 1178
Warning: Cannot modify header information – headers already sent by (output started at /home/public_html/wp-includes/functions.php:3378) in /home/public_html/wp-includes/pluggable.php on line 1178
I can see the plugin is working, the settings are available, but no visual editor.
]]>We have the site from https://asceticexperience.com/
Feel free to dig the site in order to understand our question below.
Of course, any feedback appreciated ?? but my main question is the following:
We have a photo multiple times on site (in blog, portfolio, and in slide-shows from the menus Body, Mind, Heart).
The description of the photos is taken from ‘Description’ field from Media Gallery. (As you know the field is filled from photo’s EXIF).
Because each time when I attach a photo to a page/post, WordPress copies the photo, we need a plugin/solution/whatever to allow us to change simultaneously the description of all the instances for the eg. myPhoto.jpg.
Now when we want to change/update a caption, we need to go to all instances and manually edit them.
Can you do this? – In WP go to Media | Library and select an image. The ‘Attachment Details’ window appear. We have there in the right-bottom corner some buttons: ‘View attachment page’, ‘Delete…’ etc. Can you add there a new button called ‘Update Metadata/Alt Text+Description for all instances’ ? (in fact it will just issue an SQL update against DB for all attachments with the same attachment URL (eg. mysite.com\…\img001.jpg)
]]>Hi!
‘copy attachments from other post’ option widow’s position is out of my browser’s visible section. Other option’s windows is normal but only this option window has the issue.
I’m using Wootheme Canvas 5.9.0 with Wp 4.1 .
Thanks.
]]>Dear,
each time i update the FGPlugin i have to upload my templates again
and change the FILE_GALLERY_DEFAULT_TEMPLATES list in the file-gallery.php
So, i copy/pasted the FILE_GALLERY_DEFAULT_TEMPLATES line in my theme functions, so i don’t have to do it every time, but i can’t find a way to change the default template folder, so i could put it somewhere else and my templates wouldn’t desapear each time…
any idea ?
]]>For admin user all works fine but other users cannot see the editor (tekst and buttons) anymore, had to turn off your plugin.
Error:
Warning: require_once(includes/templates-media-wp38.php) [function.require-once]: failed to open stream: No such file or directory in /**** /public_html/wp-content/plugins/file-gallery/file-gallery.php on line 1573
Fatal error: require_once() [function.require]: Failed opening required ‘includes/templates-media-wp38.php’ (include_path=’.:/usr/local/lib/php’) in /*****/public_html/wp-content/plugins/file-gallery/file-gallery.php on line 1573
]]>Hello,
I discovered textual mode recently and I’m glad with it but I have some problem with “delete” link partially hidden in this mode – https://tof.canardpc.com/view/a133dab7-88a2-4002-831b-5b2a181bb681.jpg