#1870 closed defect (bug) (fixed)
Inline Image Uploading creates wrong subpost [rewrited] uris when using wp rather than root folder,
Reported by: | mani_monaj | Owned by: | ryan |
---|---|---|---|
Milestone: | Priority: | high | |
Severity: | major | Version: | 1.6 |
Component: | Administration | Keywords: | image uploading bg|has-patch |
Focuses: | Cc: |
Description
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 www.yourblog.com/yyyy/mm/dd/post-name/image-name/ or www.yourblog.com/subpost_id=xxx 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 : www.yourblog.com/blog/
in image pan the uri is : www.yourblog.com/blog/yyyy/mm/dd/post-name/image-name/
but in tinymce the uri is : www.yourblog.comblog/yyyy/mm/dd/post-name/image-name/
note that there is no slash between www.yourblog.com & 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)
Change History (7)
#3
@
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.
Finally, a diff I can upload ;)