Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When uploading and saving a document through media, it appears in my wysiywg editor window pane with a default "document" image, the name of the file, linked, and a size, like so:
I'm then able to edit the link text:
However, when I save the page, my changes are ignored and reset to the default view:
It looks like this was solved in #1942688: Documents embedded in WYSIWYG get converted to HTML by the editor, but that was before all the massive changes to js/wysiwyg-media.js.
Media version: 7.x-2.x-dev (at commit 042f84f)
WYSIWIG version: 7.x-2.2
TinyMCE version: 3.5.8
Comment | File | Size | Author |
---|---|---|---|
#15 | media-wysiwyg-link-title-unsaved-2139461-15.patch | 506 bytes | bneil |
#4 | pdf_renamed.png | 11.45 KB | mariacha1 |
pdf_forgotten.png | 16.56 KB | mariacha1 | |
pdf_onpage.png | 15.44 KB | mariacha1 | |
pdf_example.png | 9.69 KB | mariacha1 |
Comments
Comment #1
mariacha1 CreditAttribution: mariacha1 commentedComment #2
mariacha1 CreditAttribution: mariacha1 commentedComment #3
mariacha1 CreditAttribution: mariacha1 commentedOriginal summary included a duplicate of:
#2003798: The media button is not activated when a "default" file is selected in the wysiwyg
Comment #4
mariacha1 CreditAttribution: mariacha1 commentedComment #5
mariacha1 CreditAttribution: mariacha1 commentedComment #6
mariacha1 CreditAttribution: mariacha1 commentedReopening this issue because I found a solution to it as stated in the updated summary. Turns out a bit of the patch from #1942688: Documents embedded in WYSIWYG get converted to HTML by the editor wasn't pushed to the latest changes to the alpha release of 7.x-2.x. Patch attached.
Comment #7
genjohnson CreditAttribution: genjohnson commentedThe patch in #6 applied cleanly against the latest dev (commit 8fe0f7d) and worked for me.
Comment #8
briand44 CreditAttribution: briand44 commentedThe patch in #6 worked for me as well.
Comment #9
aaron CreditAttribution: aaron commented6: media-link_title_unsaved-2139461-4.patch queued for re-testing.
Comment #10
aaron CreditAttribution: aaron commented6: media-link_title_unsaved-2139461-4.patch queued for re-testing.
Comment #11
aaron CreditAttribution: aaron commentedThis patch no longer applies.
Comment #14
kaidjohnson CreditAttribution: kaidjohnson commented- Re-rolled against the latest HEAD.
- Simplified code. find('a').html() returns null if no 'a' is found.
Comment #15
bneil CreditAttribution: bneil commentedRe-rolled against the latest HEAD.
Comment #16
bneil CreditAttribution: bneil commentedComment #17
azinck CreditAttribution: azinck commented#15 applies cleanly for me and works perfectly.
Comment #18
aaron CreditAttribution: aaron commentedCommitted to http://drupalcode.org/project/media.git/commit/b75df8c.