Hello,
Can you tell me why it stops randomly when I start register process? Sometimes it registers 4 images, sometimes 15, sometimes 100. But it always stops. Any solution?
]]>I am doing some testing and have not yet upgraded to php 8. By removing the plugin (deactivated currently), will it impact the existing registered images? Currently have 1000 pics in database, done successfully with this plugin. thank you
]]>Not work /// Have a bug.. My issue with the Bulk Media Register plugin is that when I choose to register certain media files, after it says “completed,” it logs the following errors:
[18-Jul-2024 19:51:04 UTC] PHP Warning: foreach() argument must be of type array|object, false given in X:\xampp\htdocs\wp-content\plugins\bulk-media-register\lib\class-bulkmediaregister.php on line 707
[18-Jul-2024 19:51:04 UTC] PHP Warning: Trying to access array offset on false in X:\xampp\htdocs\wp-content\plugins\bulk-media-register\lib\class-bulkmediaregister.php on line 712
[18-Jul-2024 19:51:04 UTC] PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in X:\xampp\htdocs\wp-content\plugins\bulk-media-register\lib\class-bulkmediaregister.php:712
Stack trace:
#0 X:\xampp\htdocs\wp-includes\class-wp-hook.php(324): BulkMediaRegister->mail_register_message(1)
#1 X:\xampp\htdocs\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
#2 X:\xampp\htdocs\wp-includes\plugin.php(517): WP_Hook->do_action(Array)
#3 X:\xampp\htdocs\wp-content\plugins\bulk-media-register\lib\class-bulkmediaregister.php(954): do_action('bmr_mail_regist...', 1)
#4 X:\xampp\htdocs\wp-includes\class-wp-hook.php(324): BulkMediaRegister->bulkmediaregister_message_callback('')
#5 X:\xampp\htdocs\wp-includes\class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
#6 X:\xampp\htdocs\wp-includes\plugin.php(517): WP_Hook->do_action(Array)
#7 X:\xampp\htdocs\wp-admin\admin-ajax.php(192): do_action('wp_ajax_bulkmed...')
#8 {main}
thrown in X:\xampp\htdocs\wp-content\plugins\bulk-media-register\lib\class-bulkmediaregister.php on line 712
Temporary solution
The error is related to the get_user_option()
function returning false
instead of the expected array. This can happen if the options you are trying to retrieve do not exist for this user. We need to add a check for the existence and correctness of the retrieved data before using them in foreach
and count
.
We will make changes to your mail_register_message
function to check for the presence of options before using them:
public function mail_register_message( $uid ) {
$bulkmediaregister_settings = get_user_option( 'bulkmediaregister', $uid );
if ( $bulkmediaregister_settings && $bulkmediaregister_settings['mail_send'] ) {
if ( function_exists( 'wp_date' ) ) {
$now_date_time = wp_date( 'Y-m-d H:i:s' );
} else {
$now_date_time = date_i18n( 'Y-m-d H:i:s' );
}
$messages = get_user_option( 'bulkmediaregister_messages', $uid );
$csvs = get_user_option( 'bulkmediaregister_csvs', $uid );
if (is_array($csvs)) {
$max_col_count = 0;
foreach ( $csvs as $value ) {
if ( is_array($value) && $max_col_count < count( $value ) ) {
$max_col_count = count( $value );
}
}
if (isset($csvs[0]) && is_array($csvs[0])) {
$start_comma = count( $csvs[0] );
$plus_comma = $max_col_count - count( $csvs[0] );
for ( $i = $start_comma; $i < $start_comma + $plus_comma; $i++ ) {
$csvs[0][ $i ] = __( 'Images' ) . strval( $i - $start_comma + 1 );
}
$csv_filename = sanitize_file_name( 'registered' . $now_date_time . '.csv' );
$csv_file = wp_normalize_path( $this->plugin_tmp_dir . '/' ) . $csv_filename;
$filter = null;
if ( get_locale() == 'ja' ) {
$filter = 'php://filter/write=' . urlencode( 'convert.iconv.utf-8/cp932//TRANSLIT' ) . '/resource=';
}
$file = new SplFileObject( $filter . $csv_file, 'a' );
foreach ( $csvs as $line ) {
if (is_array($line)) {
$file->fputcsv( $line );
}
}
$file = null;
if ( $messages ) {
/* translators: Date and Time */
$message_head = sprintf( __( 'Bulk Media Register : %s', 'bulk-media-register' ), $now_date_time ) . "\r\n\r\n";
/* translators: count of media */
$message_head .= sprintf( __( '%1$d media were registered. Attached the registration data as a CSV file[%2$s].', 'bulk-media-register' ), count( $messages ), $csv_filename ) . "\r\n\r\n";
$to = get_userdata( $uid )->user_email;
/* translators: blogname for subject */
$subject = sprintf( __( '[%s] Media Register', 'bulk-media-register' ), get_option( 'blogname' ) );
wp_mail( $to, $subject, $message_head . implode( $messages ), null, $csv_file );
delete_user_option( $uid, 'bulkmediaregister_messages' );
delete_user_option( $uid, 'bulkmediaregister_csvs' );
wp_delete_file( $csv_file );
}
}
}
}
}
]]>
I just inherited a site and found this folder with thousands of image file in it taking up a significant amount of storage.
bulk-media-register-tmp
This plugin is no longer installed on the site
Can this folder and its contents be deleted?
The current version of this plugin only works with PHP 8, but my host has not updated past PHP 7.4. Is an older version of the plugin that works with PHP 7.4 available somewhere? Or an alternate version?
]]>I have the issue that I cannot start or stop a cron event anymore.
At the place where the “Start Cron” or “Stop Cron” button is displayed normally I see a red warning called “Running Cron Event” now.
I think this happened because I accidentally changed the filter by text while the cron was running.
How can I resolve this issue? I already deinstalled both plugins and reinstalled them again via FTP. I also deleted my site cache and server cache.
Thanks in advance for your help!
]]>Hey, if I click in selected register, I get a whitescreen, any ideas?
]]>Thank you for the awesome plugin.
However I experience 1 issue when I try to import a lot of images from an old website: the current options for assigning a date do not assign the desired date to the media items in the library. I would like to get the date according to the uploaded file structure (for example: wp-uploads/2023/3 would be march 2023)
Would this option be difficult to make?
]]>When I try to register an mp4 file (2GB) with bulkmediaregister, it immediately goes to 100%, but then it freezes and doesn’t move. By the way, the stop button is still visible.
]]>Hi
When we select a folder on which we already made a import attempt we have the error message “File doesn’t exist?” without any notice about how to proceed.
What does it mean please?
thanks
]]>Hi I am getting a message saying ERROR: this plugin requires a newer version of PHP. But my PHP is set to version 8.1 and the info says 8.0 or higher
]]>Hi!
Thank you for your work; this plugin is awesome.
I have an issue with translation to Polish. You use the “generic” translation for:
__( ‘Register’ )
Unfortunately, in Polish, we have different verbs when we register an account (this is the main context in WP core) and different for objects (files).
I will be glad to ask you to add a translation domain.
Thank you in advance.
Marcin
]]>This is a multisite, and the images are in a folder named wp-content/uploads/sites/4/
Bulk register correctly displays all the subfolders under the site’s directory tree, but none of the images under those directories are showing up. The images are there, and the permissions are set correctly.
]]>Hello, I’ve been using your plugin for several months and have recently begun hitting the following error when attempting to bulk register, using the same process I have since installing the plugin:
After following the instructions I see the ABSPATH is currrently set to “ABSPATH: /wordpress/”
I have updated your plugin to the latest version and am also running the latest version of WordPress. I also attempted on the prior version of both and am still hitting the same error.
Your plugin’s functionality is a key component of the website in question as I use it to perform large weekly inventory imports with several hundred images. With that, I’d be happy to compensate you for your time in helping me resolve the situation so that I can continue with these critical processes.
Thank you!
]]>Unfortunately, the FTP media has been removed from the repository and I am using Bulk Media Register to register 100K (yes 100K) images, but apparently when it reaches 1% it doesn’t progress… Any help so that the plugin does not stop and can process everything step by step?
I will appreciatte any help!!
Thank you
]]>Hi, when videos are registered, the date used is the current date even though that’s not the correct creation date. EXIF is enabled and “Get the date/time of the file, and updated based on it.” is selected in “Settings”.
Also, somehow the thumbnails aren’t created correctly. Or maybe a thumbnail size is missing? I’m using SimpLy Gallery plugin and when I create my gallery and select some jpg photos, the thumbnail previews don’t appear on the sidebar. However, if I upload normally through the Media Library upload tool, then there is no problem with the thumbnails. So somehow, a thumbnail isn’t created properly or is missing – not sure which.
I registered around 850 files at one time. For the most part, everything worked fine. However, a few jpg photos did not get registered correctly. Not sure why – just a few, most were fine.
If I upload myphoto.jpg through the Media Library upload tool and then upload myphoto.jpg through FTP into a different folder in the ‘uploads’ folder, the register will double register the file. It doesn’t happen right away. To recreate issue:
Expected behaviour: the duplicate photo should be registered as myphoto-2.jpg or myphoto-3.jpg or something and the original myphoto.jpg should not be de-registered or removed.
Thanks, hoping all that made sense!
]]>Hi, after it registers the media, which works great, how to automatically remove the files from the temp folder to free up some space?
Thank you!
]]>Hi
I would like to ask how to troubleshoot the following
I installed the plugin bulk media register and it worked 1 time with 4 files
Now I am trying to register another 8 files and when I press on register nothing happens
I dont see my site loading on the tab or anything else indicating the plugin is doing somehing.
The files I need to register is *.ogg
Hope someone can help
]]>I’m having a critical error when trying to select folder/path for uploads.
The error message my host, flywheel, has been able to find is:
PHP Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/wordpress/wp-content/uploads/2023/06): Failed to open directory: No such file or directory in /www/wp-content/plugins/bulk-media-register/lib/class-bulkmediaregister.php:121″
I’ve rolled back versions, deleted and uninstalled the plugin then reinstalled but to no avail.
Hello there,
Changelog
1.30
Registration results are now sent via email.
It is not needed, thank you. How to disable it? I can’t find the setting.
Cheers
]]>Hi,
WP 6.2.2
Bulk Media Register 1.30
PHP 7.4
When using bulk media register we received an email from WP with the following error message and on the website back end it says there’s a critical error:
Error message: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/wordpress/wp-content/uploads/2023/06): failed to open dir: No such file or directory in /www/wp-content/plugins/bulk-media-register/lib/class-bulkmediaregister.php:121
Any idea what this means and how we can solve it?
TIA,
Karen
Thank you for a great plugin!. Impressive performance too
I was wondering, is there any way for the plugin to be able to detect if a files has been deleted? Or even better, can it detect if it has been moved to a new folder and then re-link it?
]]>Hi,
I really like you problem and I hope that you could find a solution because after that I want to buy the cron-update.
I have the following problem:
I just switched from android to ios and portrait pictures uploaded via ftp are getting a filname-rotated.jpg addition, because wordpress seems to rotated the picture and gives it a new name.
You could see this behavior even when you are using bulk register. See below.
If I uses bulk register again, it wants to import it once more…
So it seems that Bulk register just looks after the URL, but not at the Original URL oder the Original File name.
So it created duplicates again and again, the cron-Version cannot be used!
The same problem could happen if you add large pictures, were wordpress adds -scaled.jpg
ID: 40520
Titel: IMG_0072
Permalink:?https://xxx.de/img_0072-2/
URL:?https://xxx.de/wp-content/uploads/2023/02/05/IMG_0072-rotated.jpg
Dateiname: IMG_0072.JPG
Original URL:?https://xxx.de/wp-content/uploads/2023/02/05/IMG_0072.JPG
Original File name: IMG_0072.JPG
Datum/Zeit: 2023-2-5 17:11:56
Dateityp: image/jpeg
Dateigr??e: 405 kB
]]>
I started to register ca. 25000 Fotos
It was all ok. But today I see everytime I try to start the plugin a 500 Internal Server Error Page.
I installed the core again
I installed the plugin again
nothing to do
Can anyone help me?
]]>Like the title says ??
Can this plugin be deleted after register media?
A lot of thanks
]]>除外ファイルで設定する前に読み込んでしまった読み込みたくないファイルをライブラリから消したいのですが、リセットする方法はありますか??
]]>Version: 1.26 on WordPress 6.0.1 Multi-Site
PHP Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/wp-content/uploadswp-content/uploads/sites/35/files): failed to open dir: No such file or directory in /wp-content/plugins/bulk-media-register/lib/class-bulkmediaregister.php:120
The correct folder selected in the dropdown is wp-content/uploads/sites/35/files
Someone else asked the same thing – it was closed without response.
Why is woocommerce_uploads folder excluded? I remove it and save and it shows back up.
Can you please answer this BEFORE closing this topic?
WooCommerce uploads is one of the most used upload folders with WP users and excluding this severely limits the use of this plugin, which seems like the perfect solution.
]]>Hi, I wonder if your plugin will make 3 image files(thumnail, medium, and large size) if I uplaod one image.
I uploaded some images through FTP, and some images through Media.
And I noticed that WP doesn’t recognize files that I uploaded through FTP.
So I decided to download all media files to local computer, and reset media, and upload media again to server through FTP, and to register bulk media by using your plugin.
However if your plugin make multiple size of images file per each image, then I will have so many images files.
Please confirm this.
Thank you.
I have a bounce of file with the extension .pro6. They are not showing up when I chose the containing folder. If I rename the extension to something else matching the extension list, it will be shown.
So now my question!
Is it possible to add my extension to the list? I have checked you code, but can’t find anywhere where you are creating the extension list. So any hint will be nice.
Thanks for a good product, It seams better than the Media From FTP plugin, you made to. That I have used on several websites, but will move on with this updated version.
]]>