adotson
Forum Replies Created
-
Forum: Plugins
In reply to: [Enable Media Replace] Upload Button Grayed OutI can confirm that 3.2.5 is the latest version that does not have this issue with the current version of WordPress. I can also tell you that the issue is with the removeAttribute method on line 151 of popup.php. Even when file.value evaluates as true, the “disabled” attribute is not being removed from the input button on the form. Still not sure if it is a browser or WordPress issue though.
Update: I am now 90% convinced this is due to changes in the JavaScript optimization engine of later Chromium-based browsers. I did some testing with some dummy PHP files and had similar results. Setting and removing DOM attributes seems to be not reliable anymore. I even added sleep functions as long as 20 seconds and still had issues (even after clearing the browser cache). Searching on other forums showed this is a common issue lately with the V8 engine. So I don’t think it is WordPress. I even tried removing the attribute altogether, adding a JS sleep function and then setting the disabled attribute after a couple of seconds. In theory, this should have worked, but instead the button remained enabled and the setAttribute method had no effect. This has to be a browser bug. There are other methods for setting and removing attributes. If I get the time later I will try some of them, but I’m done for the day.
- This reply was modified 5 years, 7 months ago by adotson.
Forum: Plugins
In reply to: [Enable Media Replace] Upload Button Grayed OutSame issue here. Downgrading to 3.2.8/3.2.7 did not help even though they worked fine before (I use this plugin almost daily). My first guess is this has something to do with a recent WordPress update. Older versions like 3.2 work fine. I should add that this was while trying to upload an OpenDocument file and not an image. The issue exists whether I use the button to manually choose a file or the drag-and-drop option. It may have something to do with binary uploads. I will test other browsers to rule out the possibility of it being an issue with Chrome. If I learn anything new I will let you know. Obviously one can always use FTP.