GPML WP Offload Media Compat
Gravity Perks Media Library (Multi-File Upload) Compatibility Plugin with WP Offload Media
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/robertstaddon/gpml-wp-offload-media-compat/archive/refs/heads/main.zipSmall WordPress compatibility plugin for sites using:
- Gravity Forms
- Gravity Perks File Upload Pro
- GP Media Library
- WP Offload Media
What It Does
GP Media Library stores uploaded file attachment IDs in Gravity Forms entry meta as gpml_ids_{field_id}. When WP Offload Media has not finished making every attachment URL available at entry-save time, multi-file upload fields can retain local URLs that later break when local files are removed.
This plugin rebuilds GP Media Library-enabled file upload field values from those stored attachment IDs and saves the best available URL for each attachment:
- Prefer
as3cf_get_attachment_url( $attachment_id, null, true )when WP Offload Media has offloaded the file. - Fall back to
wp_get_attachment_url( $attachment_id ). - Queue retries when not all attachment IDs have provider URLs yet.
- Process due retry queue items when real WP-Cron loads WordPress.
Installation
Copy the gpml-wp-offload-media-compat folder to:
wp-content/plugins/gpml-wp-offload-media-compat
Then activate GPML WP Offload Media Compat in WordPress.
Cron
For reliable retries, use real cron instead of visitor-triggered WP-Cron.
Recommended WP-CLI cron:
cd /home/dpfrecycler/public_html && wp cron event run --due-now --quiet
Alternative PHP cron:
cd /home/dpfrecycler/public_html && php wp-cron.php
If using real cron, disable visitor-triggered WP-Cron in wp-config.php:
define( 'DISABLE_WP_CRON', true );
Debugging
The plugin logs to debug.log when WordPress debugging is enabled:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
You can also force plugin logging with:
define( 'DPF_GPML_WOMC_DEBUG', true );
Relevant cron hook:
dpf_gpml_womc_refresh_entry_urls
Retry queue option:
dpf_gpml_womc_retry_queue