Make WordPress Core

Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#1870 closed defect (bug) (fixed)

Inline Image Uploading creates wrong subpost [rewrited] uris when using wp rather than root folder,

Reported by: mani_monaj's profile mani_monaj Owned by: ryan's profile ryan
Milestone: Priority: high
Severity: major Version: 1.6
Component: Administration Keywords: image uploading bg|has-patch
Focuses: Cc:


It's a little confusing problem , When you use inline uploading when posting new post / editing current posts , in Image Pan it creates a uri like or depends on you saved the post or not.

When the image get copied to TinyMCE , there's a bug (I guess in JavaScript) for removing trailing slashes, There is no problem when you have your wordpress in root folder , like the example above , but consider that wordpress is installed here :

in image pan the uri is :
but in tinymce the uri is : www.yourblog.comblog/yyyy/mm/dd/post-name/image-name/

note that there is no slash between & blog.

I double checked the PHP functions related to permalinks and there were no errors there(as we can see the image pan URI is correct) , so I think there's something wrong with JS.

Attachments (2)

pingless.diff (8.9 KB) - added by skeltoac 19 years ago.
Finally, a diff I can upload ;)
pingless.2.diff (9.1 KB) - added by skeltoac 19 years ago.
Forgot edit_post()

Download all attachments as: .zip

Change History (7)

#1 @skeltoac
19 years ago

  • Owner changed from anonymous to skeltoac
  • Status changed from new to assigned

#2 @ryan
19 years ago

  • Milestone set to 2.0

19 years ago

Finally, a diff I can upload ;)

19 years ago

Forgot edit_post()

#3 @skeltoac
19 years ago

  • Keywords bg|has-patch added; trailing slash inline removed
  • Owner changed from skeltoac to ryan
  • Status changed from assigned to new

pingless.2.diff resolves this problem and the double-slash problem with dragged attachment anchors.

Attachment anchors dragged from inline-uploading have attributes rel="attachment" id="##". This enables WP to update the hrefs of these links at any time, even after a change in permalinks, using fix_attachment_links(). This new function is only called in write_post() and edit_post().

This patch also prevents WP from pinging any of its own attachments. It used to ping every attachment to a new post. No longer. Local pings are still allowed post-to-post and attachment-to-post, but all local post-to-attachment pings are prevented.

#4 @ryan
19 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3145]) Attachment cleanups from skeltoac. fixes #1870

#5 @(none)
18 years ago

  • Milestone 2.0 deleted

Milestone 2.0 deleted

Note: See TracTickets for help on using tickets.