Replace featured image doesn’t work when Envira Gallery is active
-
I just noticed that I cannot click on the featured image, then replace it. I deactivated plugins and found it’s Envira Gallery. When it’s active, I cannot replace an image by clicking on “featured image” but it still works if accessing the image through the Media Library.
-
Hi @jodzeee,
Can you please show me exactly what you mean by replacing an image by clicking on “featured image”? I’m not sure I understand it.
Maybe you could send us a small screen recording?
Thank you!
If I’m editing a post, normally I can click on the featured image and it brings me to the media library and there’s an option to replace the image. But that option is missing when Envira Gallery is active.
Here’s a screenshot of the expected behavior. If you still need more info, I can do a video later today.
- This reply was modified 2 years, 10 months ago by jodzeee.
Hi @jodzeee,
I just tried to install Envira Gallery and Enable Media Replace on a test site, and the button is still there when the 2 plugins are active.
Can you please send us a video to see what you mean exactly? Also, can you try the same on tastewp.com and tell us if you can reproduce the issue there?
Thanks!
Here’s a video showing the issue on tastewp.com
I assume there’s a caching issue at 0:41 so the new cat image isn’t showing in the featured image thumbnail, but other than that, you should be able to see what I mean.
I’ve also reached out to Envira Gallery and gave them a link to this thread along with this video.
- This reply was modified 2 years, 10 months ago by jodzeee.
Hi @jodzeee,
I’m sorry, but I’m unable to reproduce the issue, even following every single step you do :-(. Maybe you are right in pointing that there is a cache issue?
A couple of questions.
- Can you reproduce the issue with another device?
- Can you reproduce the issue with another device and internet connection?
- Can you reproduce the issue with another browser?
- What happens if, at 0:41, right before clicking on the cached image, you clear cache so the correct image is displayed?
Thank you,
So are you saying you are able to see the missing button while Envira is active? And you’re accessing it by clicking the featured image on a page (not directly through the Media Library – that works fine).
I’m wondering if you’re misunderstanding my problem. The caching of the image isn’t the issue. It’s the fact that the “Replace Media / Upload New File” area/button are missing. It’s there at 0:03 – 0:05. but missing at 0:44 – 0:46 AFTER activating the Envira Gallery plugin.
I’ll try it on another device when I get a chance.
Yes, I am able to see the missing button while Envira is active. Doing exactly what you do.
Please try it on another device and browser and let me know how it goes.
Best,
I should have mentioned it’s the paid Envira Pro plugin that I’m using. I tested it with the lite version from the repository and that works fine. But the Pro one causes the issue I demonstrated. Do you have access to the pro version?
Thanks,
JodiHi Jodi,
Ah, that’s interesting! We do not have access to the Pro version, but we could contact the Envira guys and see if they can help us with that. However, that may take some time. Maybe you could contact us here so we can check your site?
Thanks!
We’re seeing a potential conflict between Envira Gallery Pro and Enable Media Replace as well. We can reproduce the issue by doing the following:
– Go to Media Library and use List mode to edit a file
– Use the Upload a new file button on the Edit Media page
– Choose a file to upload with the same name as the existing one
– Replacement option: Replace the date with current date
– Date option: Replace the date with current date
– Select the Upload button and within a few seconds the following error occurs: “There has been a critical error on this website. Please check your site admin email inbox for instructions.”The site error logs include the following corresponding entry:
“
[Thu Feb 03 19:27:21.608019 2022] [php:error] [pid 18038] [client 216.57.200.246:0] PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given in /nas/content/live/bhamdev/wp-content/plugins/envira-gallery/src/Admin/Admin_Container.php:1061\nStack trace:\n#0 /nas/content/live/bhamdev/wp-content/plugins/envira-gallery/src/Admin/Admin_Container.php(1061): count('')\n#1 /nas/content/live/bhamdev/wp-includes/class-wp-hook.php(307): Envira\\Admin\\Admin_Container->emr_clear_envira_cache('https://bhamdev...', 'https://bhamdev...', 39540)\n#2 /nas/content/live/bhamdev/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)\n#3 /nas/content/live/bhamdev/wp-includes/plugin.php(474): WP_Hook->do_action(Array)\n#4 /nas/content/live/bhamdev/wp-content/plugins/enable-media-replace/classes/replacer.php(254): do_action('enable-media-re...', 'https://bhamdev...', 'https://bhamdev...', 39540)\n#5 /nas/content/live/bhamdev/wp-content/plugins/enable-media-replace/views/upload.php(159): EnableMediaReplace\\Replacer->replaceWith('/tmp/php7me846', 'ADA-30.jpg')\n#6 /nas/content/live/bhamdev/wp-content/plugins/enable-media-replace/classes/emr-plugin.php(163): require_once('/nas/content/li...')\n#7 /nas/content/live/bhamdev/wp-includes/class-wp-hook.php(307): EnableMediaReplace\\EnableMediaReplacePlugin->route('')\n#8 /nas/content/live/bhamdev/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)\n#9 /nas/content/live/bhamdev/wp-includes/plugin.php(474): WP_Hook->do_action(Array)\n#10 /nas/content/live/bhamdev/wp-admin/admin.php(259): do_action('media_page_enab...')\n#11 /nas/content/live/bhamdev/wp-admin/upload.php(10): require_once('/nas/content/li...')\n#12 {main}\n thrown in /nas/content/live/bhamdev/wp-content/plugins/envira-gallery/src/Admin/Admin_Container.php on line 1061, referer: https://bhamdev.wpengine.com/wp-admin/upload.php?page=enable-media-replace%2Fenable-media-replace.php&action=media_replace&attachment_id=39540&_wpnonce=e05be0033b
”
Our environment:WPEngine hosted
PHP 8.0
WordPress 5.9
Enable Media Replace 3.6.3
Microsoft Edge (chromium)We recently updated from PHP 7.4 to 8.0. When we revert back to PHP 7.4, the conflict appears to go away. So there might be something in EMR or EG that needs to be tweak based on PHP 8 changes. We’re happy to provide access to our dev environment if it helps resolve this.
Thanks for looking into it ??
Received confirmation from Envira Gallery support their devs have connected with the ShortPixel/EMR team to look into this issue.
Hello @jodzeee and thanks for starting this thread.
We’re in touch with the Envira team in order to see how we can get that fixed. For some reason, they exclude all the boxes that were alphabetically added before Envira (and EMR comes before) and probably there are other plugins affected by the same issue. We’ll get back when we have a resolution for this.
Hello @sjnbham,
Indeed that error seems to only be PHP8 related. We’re indeed in touch with the Envira team in order to find the best way to get it fixed. As soon as we have a relevant update, we’ll post it here. Thanks for the patience!
Short update: the Envira Gallery team got back to us confirming they are testing fixes for both issues mentioned in this thread. Hopefully next week they’ll have a fix out which should get these issues resolved.
I’ll be in touch again with more details as soon as I have them!
Thanks for your patience!
Thanks for the update!
- The topic ‘Replace featured image doesn’t work when Envira Gallery is active’ is closed to new replies.