Opened 4 years ago

Closed 4 years ago

#8705 closed defect (bug) (fixed)

New uploaded media relative links are broken upon site move

Reported by: DD32 Owned by: anonymous
Priority: normal Milestone: 2.8
Component: General Version: 2.7
Severity: normal Keywords: has-patch needs-testing
Cc:

Description

Seems I (or who ever wrote the final patch) forgot to cover a If branch case for when $file was relative to the uploads dir.

See attached patch.

Attached patch also includes a small notice-level warning correction for a post meta function.

Attachments (2)

8705.diff (873 bytes) - added by DD32 4 years ago.
8705-2.diff (1.0 KB) - added by azaozz 4 years ago.

Download all attachments as: .zip

Change History (6)

DD324 years ago

comment:1   DD324 years ago

  • Keywords needs-testing added

Hm, I have a feeling this patch might not work well for old attachments after the WordPress install has moved to a new server, Eg, It appears to be creating links such as:

http://dd32.id.au/wordpress/wp-content/uploads//home/theonly/public_html/dd32.id.au/wordpress/wp-content/uploads/2007/07/uaimage.png

azaozz4 years ago

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

(In [10253]) Fix uploaded media relative links when site has been moved, props DD32, fixes #8705 for 2.7

  • Milestone changed from 2.7.1 to 2.8
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopen for trunk

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

(In [10254]) Fix uploaded media relative links when site has been moved, props DD32, fixes #8705 for trunk

Note: See TracTickets for help on using tickets.