Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#34974 closed defect (bug) (worksforme)

Media link format changed to 'Custom URL' from ' Media File' since 4.4

Reported by: hughie.molloy Owned by:
Priority: normal Milestone:
Component: Editor Version: 4.4
Severity: normal Keywords:
Cc: Focuses:

Description

The $attachment variable set on line 2553 of ajax-actions.php in the function wp_ajax_send_attachment_to_editor() no longer has an index 'url'. This means that the $url being feed through to the hooks later on is an empty string.

This was not the case in WP 4.3.1

Change History (5)

#1 @DrewAPicture
11 years ago

  • Keywords reporter-feedback added

Hi @hughie.molloy, thanks for the report.

I can't seem to reproduce your issue, the 'url' value is being passed through just fine for me. Would it be possible for you to share the code you're using that demonstrates the problem?

#2 @SergeyBiryukov
11 years ago

Looking at media-editor.js, the url value is only passed if props.linkUrl is set, but it's been that way since [22835].

#3 @hughie.molloy
11 years ago

Having backtracked this issue after updating we had two cases where media had link set to 'custom URL' which was blank thus the empty URL being passed through. I am not sure how the link format was changed originally. I do not feel it was change through the UI as I tested this originally on my own local version of WP. However, I have tested this on a third install of 4.3.1 being updated to 4.4 and I could not reproduce. Feel free to close the ticket.

#4 @hughie.molloy
11 years ago

  • Summary Missing $url variable in hook 'image_send_to_editor' since 4.4Media link format changed to 'Custom URL' from ' Media File' since 4.4

#5 @SergeyBiryukov
11 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review
  • Resolutionworksforme
  • Status newclosed
Note: See TracTickets for help on using tickets.