• Resolved jperksmower

    (@jperksmower)


    Hello,

    After upgrading to 4.1.0, we are now getting the following error message when trying to replace a media item:

    Fatal error: Uncaught Error: Call to a member function get_source_type_class() on null
    in /var/www/wp-content/plugins/enable-media-replace/classes/external/wp-offload.php on line 327

    Call stack:

    1. EnableMediaReplace\Externals\WPOffload::getMediaClass()
      wp-content/plugins/enable-media-replace/classes/external/wp-offload.php:219
    2. EnableMediaReplace\Externals\WPOffload::getSourceIDByURL()
      wp-content/plugins/enable-media-replace/classes/external/wp-offload.php:151
    3. EnableMediaReplace\Externals\WPOffload::checkIfOffloaded()
      wp-includes/class-wp-hook.php:308
    4. WP_Hook::apply_filters()
      wp-includes/plugin.php:205
    5. apply_filters()
      wp-content/plugins/enable-media-replace/build/shortpixel/filesystem/src/Model/File/FileModel.php:518
    6. EnableMediaReplace\F\M\F\FileModel::UrlToPath()
      wp-content/plugins/enable-media-replace/build/shortpixel/filesystem/src/Model/File/FileModel.php:53
    7. EnableMediaReplace\F\M\F\FileModel::__construct()
      wp-content/plugins/enable-media-replace/build/shortpixel/filesystem/src/Controller/FileSystemController.php:29
    8. EnableMediaReplace\F\C\FileSystemController::getFile()
      wp-content/plugins/enable-media-replace/classes/Controller/ReplaceController.php:273
    9. EnableMediaReplace\Controller\ReplaceController::setupSource()
      wp-content/plugins/enable-media-replace/classes/Controller/ReplaceController.php:47
    10. EnableMediaReplace\Controller\ReplaceController::__construct()
      wp-content/plugins/enable-media-replace/classes/ViewController/ReplaceViewController.php:41
    11. EnableMediaReplace\ViewController\ReplaceViewController::load()
      wp-content/plugins/enable-media-replace/classes/emr-plugin.php:228
    12. EnableMediaReplace\EnableMediaReplacePlugin::route()
      wp-includes/class-wp-hook.php:308
    13. WP_Hook::apply_filters()
      wp-includes/class-wp-hook.php:332
    14. WP_Hook::do_action()
      wp-includes/plugin.php:517
    15. do_action()
      wp-admin/admin.php:259
    16. require_once()
      wp-admin/upload.php:10

    Please help!

    ~James

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Pedro

    (@petredobrescu)

    Hello @jperksmower,

    The error you reported is the same as the one from this thread:

    https://www.ads-software.com/support/topic/enable-media-replace-4-1-0-breaks-my-site/

    Please check existing threads before opening new ones, as that makes everything difficult to follow. I just posted a test version there, please check it, and let’s continue discussing on that thread.

    Thank you!

    Thread Starter jperksmower

    (@jperksmower)

    Hello,

    I did check existing threads. I don’t believe this is a duplicate. The other thread says the plugin “breaks my site”, and provides no further details.

    This thread details that the plugin only errors out when using the media replace functionality. It does not mention that the entire site is broken.

    ~James

    • This reply was modified 1 year, 7 months ago by jperksmower.
    Plugin Support Gerard Blanco

    (@sixaxis)

    Hi James,

    In this case, please provide us with the following information:

    • Screenshots or even better, a screen recording that show the issue in action. If possible, please include relevant links as well.
    • Your site information. Please navigate to Tools > Site Health > Info, click on the “Copy site info to clipboard” button and paste the information in your reply.
    • Have you used or are you using now any kind of image offloading service?
    • Can you please install this version on top of the existing 4.1.0 version and check if the issue is solved?

    Thank you,

    Plugin Author Pedro

    (@petredobrescu)

    This should be resolved by version 4.1.1, which was just released. If you still encounter issues, please re-open this thread.

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fatal error when replacing media’ is closed to new replies.