Opened 9 years ago
Closed 9 years ago
#32006 closed defect (bug) (fixed)
Problem with setting width and height of embedded media
Reported by: | pavelevap | Owned by: | azaozz |
---|---|---|---|
Milestone: | 4.2 | Priority: | high |
Severity: | normal | Version: | 4.2 |
Component: | Media | Keywords: | |
Focuses: | Cc: |
Description
- Create new post.
- Insert Youtube video, not directly but from Media modal window - From URL.
- Set maximum width and height.
- Insert into post.
Problems:
1) Width and height not set in editor.
2) When you click "Edit", there are no fields for setting width and height anymore.
3) When you switch from Visual to Text and then back again, there is no preview, but only shortcode in visual editor.
Attachments (1)
Change History (14)
#2
@
9 years ago
@pavelevap - please open one ticket per distinct issue. Point 3 sounds unrelated to width/height setting. "Link text" is irrelevant if there's an embed - it's a fallback for when there's no embed available for a URL so the user can insert a link instead. Not sure what you expect it to do when an embed is available. It was previously just discarded (the field was labeled "Title"), which is a weird experience for users.
#3
@
9 years ago
ad 4) You are right, it is invalid. I saw this field in 4.1.1 and now it is much better for embedded links.
I added first 3 points together to one ticket because they are related (described workflow):
1) I tried to set width and height for embedded video and it did not work. These fields were not available in 4.1.1.
2) I tried to edit width and height of embedded media because it was not set correctly in editor. But now there are no fields for settings of width and height when you click "Edit" for embedded media.
3) Then I switched to Text editor to see inserted shortcode and when I switched back to Visual, there was no preview (only shortcode). This point is related to previous two points, because problem can be observed only when you tried to edit inserted embedded media before switching.
All these 3 issues are regression. In 4.1.1 there was no option to set width and height and also no problem when switching to Text and back to Visual (after trying to edit embedded media).
I was not able to identify which issues are connected, so I created only one ticket with my workflow.
#4
@
9 years ago
- Milestone changed from Awaiting Review to 4.2
For investigation - @azaozz or @iseulde, any thoughts?
#6
@
9 years ago
I can't even insert it in the editor:
<br /> <b>Notice</b>: Undefined index: link_text in <b>/Users/iseulde/Sites/wp/trunk/src/wp-admin/includes/ajax-actions.php</b> on line <b>2493</b><br /> {"success":true,"data":"[embed]https:\/\/www.youtube.com\/watch?v=1FE_K01mm5Y[\/embed]"}
Probably caused by [32055].
#7
@
9 years ago
I made a mistake in [32055]. I accidentally changed embed.url
to embed.linkText
. This does not solve the width/height problem though, which is caused by something else.
This ticket was mentioned in Slack in #core by drew. View the logs.
9 years ago
#9
@
9 years ago
- Priority changed from normal to high
Another possibly related bug:
- Paste
[embed]https://twitter.com/WordPress/status/588418492535181312[/embed]
in the Text editor or inserthttps://twitter.com/WordPress/status/588418492535181312
from the media modal Insert from URL. - Click on the preview and edit it.
- Either click on "Insert into post" (which should have been "Update" at this point) or cancel/close the modal.
The preview remains selected and cannot be deselected. Also in Chrome the caret cannot be placed above or below the preview, making the editor look "locked".
Editing works properly when https://twitter.com/WordPress/status/588418492535181312
was pasted directly in the editor. Only embeddable content inside [embed]
shortcodes cannot be edited.
4) Code shows that there should be also "Link Text" field (above height and width settings), but it is currently hidden. I am not sure if it should be hidden and why?