• Resolved cwright1

    (@cwright1)


    Dear Support,

    Any time I attempt to replace a file in our media library, I get the error message “There has been a critical error on this website. Please check your site admin email inbox for instructions.” Please advise. Let me know if I can make credentials for you to see what I am seeing.

    Kind Regards,
    Corey

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Gerard Blanco

    (@sixaxis)

    Hi Corey,

    Can you please check your site admin email inbox and copy-paste the content of that e-mail that was sent to you?

    Thank you,

    I am having the same issue. If I replace a media with Enable Media Replace I am getting an error message saying “There has been a critical error on this website. Please check your site admin email inbox for instructions.” But, I did not get any email.

    Can ShortPixel help with this issue?

    Thanks.

    Plugin Support Gerard Blanco

    (@sixaxis)

    Hi venkykumar,

    Do you have version 3.6.3 installed?

    Best,

    Hello Gerard,
    Yes, I have 3.6.3 installed.

    Plugin Support Gerard Blanco

    (@sixaxis)

    Could you please deactivate all plugins except Enable Media Replace and check if you can now replace an image? If so, please activate all plugins one by one until you find the one that is causing the issue and let us know.

    Thank you,

    Thread Starter cwright1

    (@cwright1)

    Hi Gerard,

    Here is the site admin email I received after the error:

    Howdy!
    
    Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.
    
    In this case, WordPress caught an error with one of your plugins, Envira Gallery.
    
    First, visit your website (https://www.niagaracc.suny.edu/) and check for any visible issues. Next, visit the page where the error was caught (https://www.niagaracc.suny.edu/wp-admin/upload.php?page=enable-media-replace%2Fenable-media-replace.php&action=media_replace_upload&attachment_id=50508&_wpnonce=47c8366b1c&noheader=1) and check for any visible issues.
    
    Please contact your host for assistance with investigating this issue further.
    
    If your site appears broken and you can't access your dashboard normally, WordPress now has a special "recovery mode". This lets you safely login to your dashboard and investigate further.
    
    https://www.niagaracc.suny.edu/wp-login.php?action=enter_recovery_mode&rm_token=840O707ARUkGHkvqNtW6Ed&rm_key=eGEDywCz42Zp8Zq3Rlvz34
    
    To keep your site safe, this link will expire in 1 day. Don't worry about that, though: a new link will be emailed to you if the error occurs again after it expires.
    
    When seeking help with this issue, you may be asked for some of the following information:
    WordPress version 5.8.3
    Current theme: NCCC (version 0.1)
    Current plugin: Envira Gallery (version 1.9.4.1)
    PHP version 8.0.14
    
    Error Details
    =============
    An error of type E_ERROR was caused in line 1061 of the file /nas/content/live/niagaraccc/wp-content/plugins/envira-gallery/src/Admin/Admin_Container.php. Error message: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given in /nas/content/live/niagaraccc/wp-content/plugins/envira-gallery/src/Admin/Admin_Container.php:1061
    Stack trace:
    #0 /nas/content/live/niagaraccc/wp-content/plugins/envira-gallery/src/Admin/Admin_Container.php(1061): count('')
    #1 /nas/content/live/niagaraccc/wp-includes/class-wp-hook.php(303): Envira\Admin\Admin_Container->emr_clear_envira_cache('https://www.nia...', 'https://www.nia...', 50508)
    #2 /nas/content/live/niagaraccc/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array)
    #3 /nas/content/live/niagaraccc/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
    #4 /nas/content/live/niagaraccc/wp-content/plugins/enable-media-replace/classes/replacer.php(254): do_action('enable-media-re...', 'https://www.nia...', 'https://www.nia...', 50508)
    #5 /nas/content/live/niagaraccc/wp-content/plugins/enable-media-replace/views/upload.php(159): EnableMediaReplace\Replacer->replaceWith('/tmp/php61KW6S', 'Meat_Raffle_202...')
    #6 /nas/content/live/niagaraccc/wp-content/plugins/enable-media-replace/classes/emr-plugin.php(163): require_once('/nas/content/li...')
    #7 /nas/content/live/niagaraccc/wp-includes/class-wp-hook.php(303): EnableMediaReplace\EnableMediaReplacePlugin->route('')
    #8 /nas/content/live/niagaraccc/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array)
    #9 /nas/content/live/niagaraccc/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
    #10 /nas/content/live/niagaraccc/wp-admin/admin.php(259): do_action('media_page_enab...')
    #11 /nas/content/live/niagaraccc/wp-admin/upload.php(10): require_once('/nas/content/li...')
    #12 {main}
      thrown
    Plugin Support Gerard Blanco

    (@sixaxis)

    Hi @cwright1,

    The error you got seems to come from Envira Gallery. Could you please contact them and ask for further assistance?

    Thank you!

    We had this same issue and it was tied to having EMR, Envira Gallery, and PHP 8 in our environment. Envira support confirmed the bug and release an update that fixed this for us on 3/23/2022 (Version 1.9.4.2)

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Unable to Replace Media’ is closed to new replies.