Viewing 7 replies - 1 through 7 (of 7 total)
  • I’m experiencing the same problem. Here’s the error I am getting. Looks like I am running the latest version of the plugin?

    ——————–

    When seeking help with this issue, you may be asked for some of the following information:
    WordPress version 5.8.1
    Current theme: ***
    Current plugin: Enable Media Replace (version 3.6.0)
    PHP version 7.3.31

    Error Details
    =============
    An error of type E_ERROR was caused in line 45 of the file /wp-content/plugins/enable-media-replace/classes/file.php. Error message: Uncaught Error: Call to undefined function EnableMediaReplace\mime_content_type() in /wp-content/plugins/enable-media-replace/classes/file.php:45
    Stack trace:
    #0 /wp-content/plugins/enable-media-replace/classes/replacer.php(65): EnableMediaReplace\emrFile->__construct(‘/home/legalrf5/…’)
    #1 /wp-content/plugins/enable-media-replace/views/popup.php(38): EnableMediaReplace\Replacer->__construct(8228)
    #2 /wp-content/plugins/enable-media-replace/classes/emr-plugin.php(154): require_once(‘/home/legalrf5/…’)
    #3 /wp-includes/class-wp-hook.php(303): EnableMediaReplace\EnableMediaReplacePlugin->route(”)
    #4 /wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(”, Array)
    #5 /wp-includes/plugin.php(470): WP_Hook->do_action(Array)
    #6 /wp-admin/admin.php(259): do_action(‘media_page_enab…’)

    I commented out lines 44-45 on enable-media-replace/classes/file.php and that seemed to work for now. I get a warning stating the mime types don’t match, but that at least lets me replace files for now.

    Any idea why mime_content_type() wouldn’t work? Was it using this php function before, or was it recently changed?

    Answering my own question here. I had to enable the php extension php73-php-fileinfo. Was able to do that in WHM by going to EasyApache 4 -> Currently Installed Packages -> PHP Extensions and select php73-php-fileinfo. Looks like it is working fine now.

    Plugin Support Gerard Blanco

    (@sixaxis)

    Hi @bluon and @vermilionink,

    Could you please go to Tools > Site Health > Info, click on “Copy site info to clipboard” and paste the site info here?

    Thank you!

    Thread Starter vermilionink

    (@vermilionink)

    
    ### wp-core ###
    
    version: 5.8.1
    site_language: en_US
    user_language: en_US
    timezone: +10:00
    permalink: /%postname%/
    https_status: true
    multisite: false
    user_registration: 0
    blog_public: 1
    default_comment_status: open
    environment_type: production
    user_count: 1
    dotorg_communication: true
    
    ### wp-paths-sizes ###
    
    wordpress_path: /home/cqsolarc/public_html/rumcityfoods.com.au
    wordpress_size: 1.04 GB (1113370285 bytes)
    uploads_path: /home/cqsolarc/public_html/rumcityfoods.com.au/wp-content/uploads
    uploads_size: 2.04 GB (2192386441 bytes)
    themes_path: /home/cqsolarc/public_html/rumcityfoods.com.au/wp-content/themes
    themes_size: 44.94 MB (47127992 bytes)
    plugins_path: /home/cqsolarc/public_html/rumcityfoods.com.au/wp-content/plugins
    plugins_size: 94.11 MB (98680346 bytes)
    database_size: 265.25 MB (278134784 bytes)
    total_size: 3.47 GB (3729699848 bytes)
    
    ### wp-dropins (1) ###
    
    advanced-cache.php: true
    
    ### wp-active-theme ###
    
    name: divi Child Theme (divi-child)
    version: .1
    author: vermillion ink
    author_website: (undefined)
    parent_theme: Divi (Divi)
    theme_features: core-block-patterns, widgets-block-editor, custom-background, automatic-feed-links, post-thumbnails, menus, title-tag, post-formats, woocommerce, wc-product-gallery-zoom, wc-product-gallery-lightbox, wc-product-gallery-slider, customize-selective-refresh-widgets, editor-style, widgets
    theme_path: /home/cqsolarc/public_html/rumcityfoods.com.au/wp-content/themes/divi-child
    auto_update: Enabled
    
    ### wp-parent-theme ###
    
    name: Divi (Divi)
    version: 4.11.3
    author: Elegant Themes
    author_website: http://www.elegantthemes.com
    theme_path: /home/cqsolarc/public_html/rumcityfoods.com.au/wp-content/themes/Divi
    auto_update: Enabled
    
    ### wp-themes-inactive (4) ###
    
    Rum City Child Theme: version: 1, author: Leanne Duckmanton, Auto-updates enabled
    Twenty Nineteen: version: 2.1, author: the WordPress team, Auto-updates enabled
    Twenty Twenty: version: 1.8, author: the WordPress team, Auto-updates enabled
    Twenty Twenty-One: version: 1.4, author: the WordPress team, Auto-updates enabled
    
    ### wp-mu-plugins (1) ###
    
    WP-SpamShield Anti-Malware & Functional Integrity Scanner: version: 1.9.21, author: Red Sand Media Group and Blackhawk Cybersecurity
    
    ### wp-plugins-active (18) ###
    
    Classic Editor: version: 1.6.2, author: WordPress Contributors, Auto-updates enabled
    Divi Icon Expansion Pack: version: 1.0.0, author: Divi Space | an Aspen Grove Studios Company, Auto-updates enabled
    Easy Updates Manager: version: 9.0.10, author: Easy Updates Manager Team, Auto-updates enabled
    Enable Media Replace: version: 3.6.0, author: ShortPixel, Auto-updates enabled
    FooTable: version: 0.3.1, author: Brad Vincent, Auto-updates enabled
    Gravity Divi - Gravity Forms Styler for Divi: version: 2.1.0, author: Divi Codex, Auto-updates enabled
    Gravity Forms: version: 2.2.5, author: rocketgenius, Auto-updates enabled
    Gravity Forms MailChimp Add-On: version: 4.2, author: rocketgenius, Auto-updates enabled
    PDF Image Generator: version: 1.5.6, author: Mizuho Ogino, Auto-updates enabled
    Postman SMTP: version: 1.7.2, author: Jason Hendriks, Auto-updates enabled
    Really Simple SSL: version: 5.1.2, author: Really Simple Plugins, Auto-updates enabled
    Redirection: version: 5.1.3, author: John Godley, Auto-updates enabled
    Smush: version: 3.9.0, author: WPMU DEV, Auto-updates enabled
    UpdraftPlus - Backup/Restore: version: 1.16.62, author: UpdraftPlus.Com, DavidAnderson, Auto-updates enabled
    Wordfence Security: version: 7.5.5, author: Wordfence, Auto-updates enabled
    WP-SpamShield: version: 1.9.21, author: Red Sand Media Group, Auto-updates enabled
    WP Fastest Cache: version: 0.9.5, author: Emre Vona, Auto-updates enabled
    Yoast SEO: version: 17.3, author: Team Yoast, Auto-updates enabled
    
    ### wp-media ###
    
    image_editor: WP_Image_Editor_GD
    imagick_module_version: Not available
    imagemagick_version: Not available
    imagick_version: Not available
    file_uploads: File uploads is turned off
    post_max_size: 32M
    upload_max_filesize: 32M
    max_effective_size: 32 MB
    max_file_uploads: 20
    gd_version: 2.2.5
    gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
    ghostscript_version: 9.25
    
    ### wp-server ###
    
    server_architecture: Linux 3.10.0-962.3.2.lve1.5.27.el7.x86_64 x86_64
    httpd_software: Apache
    php_version: 7.4.22 64bit
    php_sapi: litespeed
    max_input_variables: 1000
    time_limit: 300
    memory_limit: 512M
    max_input_time: 120
    upload_max_filesize: 32M
    php_post_max_size: 32M
    curl_version: 7.71.0 OpenSSL/1.1.1d
    suhosin: false
    imagick_availability: false
    pretty_permalinks: true
    htaccess_extra_rules: true
    
    ### wp-database ###
    
    extension: mysqli
    server_version: 10.3.25-MariaDB-log-cll-lve
    client_version: 10.3.30-MariaDB
    
    ### wp-constants ###
    
    WP_HOME: undefined
    WP_SITEURL: undefined
    WP_CONTENT_DIR: /home/cqsolarc/public_html/rumcityfoods.com.au/wp-content
    WP_PLUGIN_DIR: /home/cqsolarc/public_html/rumcityfoods.com.au/wp-content/plugins
    WP_MEMORY_LIMIT: 40M
    WP_MAX_MEMORY_LIMIT: 512M
    WP_DEBUG: false
    WP_DEBUG_DISPLAY: true
    WP_DEBUG_LOG: false
    SCRIPT_DEBUG: false
    WP_CACHE: false
    CONCATENATE_SCRIPTS: undefined
    COMPRESS_SCRIPTS: undefined
    COMPRESS_CSS: undefined
    WP_LOCAL_DEV: undefined
    DB_CHARSET: utf8
    DB_COLLATE: undefined
    
    ### wp-filesystem ###
    
    wordpress: writable
    wp-content: writable
    uploads: writable
    plugins: writable
    themes: writable
    mu-plugins: writable
    
    

    Hi there,

    I got the exactly same issue here, can you please help?

    Thanks

    Plugin Support Gerard Blanco

    (@sixaxis)

    Hi guys, we are already aware of this issue and we’ll try to release a fix as soon as possible.

    In the meantime, feel free to

    • either roll back to a previous version
    • comment out lines 44-45 on enable-media-replace/classes/file.php

    Thanks for your patience!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘critical error when replacing pdf file with media replace’ is closed to new replies.