Wolfgang Bremer
Wolfgang Bremer

Reputation: 7

In Wordpress, trying to add an existing image from the media library to a text widget throws 404 error

I have two Wordpress instances (same Wordpress version, both recent fresh installs) on two different domains, both hosted with Namecheap, one of them works fine (actually hosted on a subdomain like sub.example.co), the other one (hosted on example.li) always throws an error when trying to add an existing image from the media library to a text widget (it does not throw an error when adding an existing image file into a normal post though).

In detail: I'm opening a text widget (or creating a new one), then I'm pressing the "Add media" button, which opens the media library and displays all the media properly but when I then select a media (an image file, I tried several different ones) and click on "Insert into post", no image is being inserted and I see the below error show up in side the dev console.

I've already tried changing the theme and deactivating all plug-ins but unfortunately to no avail.

The error shown seems to be always the same one (I'm using Chrome's dev tools):

1) Console

send    @   load-scripts.php?c=0…e,utils&ver=5.5.3:4
ajax    @   load-scripts.php?c=0…e,utils&ver=5.5.3:4
(anonymous) @   wp-util.min.js?ver=5.5.3:2
Deferred    @   load-scripts.php?c=0…e,utils&ver=5.5.3:2
send    @   wp-util.min.js?ver=5.5.3:2
post    @   wp-util.min.js?ver=5.5.3:2
attachment  @   media-editor.min.js?ver=5.5.3:2
(anonymous) @   media-editor.min.js?ver=5.5.3:2
(anonymous) @   underscore.min.js?ver=1.8.3:2
v.map.v.collect @   underscore.min.js?ver=1.8.3:2
(anonymous) @   backbone.min.js?ver=1.4.0:2
(anonymous) @   media-editor.min.js?ver=5.5.3:2
p   @   backbone.min.js?ver=1.4.0:2
f   @   backbone.min.js?ver=1.4.0:2
l   @   backbone.min.js?ver=1.4.0:2
n.trigger   @   backbone.min.js?ver=1.4.0:2
_onModelEvent   @   backbone.min.js?ver=1.4.0:2
p   @   backbone.min.js?ver=1.4.0:2
f   @   backbone.min.js?ver=1.4.0:2
l   @   backbone.min.js?ver=1.4.0:2
n.trigger   @   backbone.min.js?ver=1.4.0:2
click   @   media-views.min.js?ver=5.5.3:2
click   @   media-views.min.js?ver=5.5.3:2
dispatch    @   load-scripts.php?c=0…e,utils&ver=5.5.3:3
r.handle    @   load-scripts.php?c=0…e,utils&ver=5.5.3:3

Console screenshot

2) Sources

g.send(b.hasContent && b.data || null),

Sources screenshot

I'm also attaching screenshots of what I see.

I've googled and tried whatever I could find but unfortunately I can't seem to figure it out. Does anybody have any idea what might be the problem and how I could fix it?

Thank you very much for your help in advance!

Wolfgang

Upvotes: 0

Views: 217

Answers (0)

Related Questions