[wp-trac] [WordPress Trac] #57284: IMG tag in Custom HTML widget and also in post made w/ Classic Editor causes 404 on save/update

WordPress Trac noreply at wordpress.org
Tue Dec 6 15:51:46 UTC 2022


#57284: IMG tag in Custom HTML widget and also in post made w/ Classic Editor
causes 404 on save/update
-------------------------------------------------+-------------------------
 Reporter:  blakespot                            |      Owner:  (none)
     Type:  defect (bug)                         |     Status:  new
 Priority:  normal                               |  Milestone:  Awaiting
                                                 |  Review
Component:  Widgets                              |    Version:  6.1.1
 Severity:  major                                |   Keywords:
  Focuses:  javascript, administration, rest-    |
  api                                            |
-------------------------------------------------+-------------------------
 I am running two blogs, both with the latest version of WordPress, 6.1.1.
 (I first noticed this on my previous version installed, 6.0.3 but have
 since updated, which did not solve the problem.)

 This issue exists on both WordPress installs I am running, to be clear.

 No need to walk through my discovery process here, but I noticed I could
 not save and edit I made to an existing Custom HTML widget - it would just
 sit w/ the save gif spinning. I noticed in the console it threw a "Failed
 to load resource: the server responded with a status of 404 (Not Found)".
 I then created a new test Custom HTML widget and it saved and was editable
 no problem. Much experimenting later, I found that the presence of a
 standard HTML "img" tag broke the save. I added full alt, title, src
 attribs to the tag - no change. I even used a blank "img" tag with no
 attribs at all -- the save still broke. 404.

 I had earlier run across an inability to edit and save old posts created
 with the Classic HTML plug-in, which was something I used to do all the
 time. I could create a new post and save it and edit it fine. Seemed odd.
 I just went back and added an "img" tag to the post and -- boom -- "page
 not found." Same issue, it seems. That's why I could not save my edit of
 the old posts -- all of them have an "img" tag or two in them.

 It seems that the presence of such a tag causes the AJAX submit to be
 corrupted somehow. The error, on Widget save, points to the file admin-
 ajax.php. I will attach a screenshot of the situation, for what it's
 worth.

 I can't say when this issue (which seems the same issue, to me as a web
 developer, between the two different examples here) began, but I've
 certainly edited content in the above fashion without incident in the past
 year. Right now I cannot edit or create Custom HTML widgets with images,
 and must -- for posts -- resort to using the block editor on the classic
 posts and dealing with the less-than-ideal HTML Source view it presents to
 make edits.

 Many thanks and I do hope this can soon be resolved.
 blakespot at gmail.com

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57284>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list