After updating to 7.28 and (+ media_ckeditor 7.x-2.1 module), I get the following watchdog anytime a user clicks to create a new forum topic:
PHP Notice: Undefined index: #value in media_wysiwyg_pre_render_text_format() (line 124 of media_wysiwyg.module)
.
The media_wysiwyg_pre_render_text_format() function is looking for $element['summary']['#value'] in order to build a map of media tags in the element for javascript settings so that the media tags can be transformed when the editor is being displayed. However in this case, $element['summary'] has no such ['#value'] of course since it's a new node.
I'm trying to track down why this module is even involved on a new node from users who do not even have the 'use media wysiwyg' permission in the first place.
Suggestion:
<?php
foreach (array('value', 'summary') as $column) {
if (isset($element[$column])) { // CHANGE THIS TO if (!empty($element[$column]['#value'])) {
$tagmap += _media_wysiwyg_generate_tagMap($element[$column]['#value']);
}
}
?>
Comment | File | Size | Author |
---|---|---|---|
#2 | media-php_notice_when_new_node_no_summary_value-2889284-2.patch | 558 bytes | joseph.olstad |
Comments
Comment #2
joseph.olstadsee patch
Comment #5
joseph.olstadfixed in 7.x-2.x-dev and 7.x-3.x-dev
Comment #6
blasthaus CreditAttribution: blasthaus commentedthanks for the fast commit!