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.
This error message always occurred when a missing scald atom object sid was loaded from the text. The code is trying to check the existence of atom after scald_atom_load_multiple()
function mee_filter_process($text) {
// Work on the string as a DOM structure.
$dom = filter_dom_load($text);
// Collect the DOM nodes and the corresponding embed data.
if ($embed_info = _mee_extract_widget_embed_info($dom)) {
// Collect the corresponding atom ids and load them upfront to benefit from
// multiple-loading.
$sids = array();
foreach ($embed_info as $info) {
$sids[] = $info['sid'];
}
$atoms = scald_atom_load_multiple(array_unique($sids));
// Replace each DOM node with the themed embed.
foreach ($embed_info as $info) {
$html = '';
if ($atoms[$info['sid']]) {
$html = theme('mee_widget_embed', array(
'atom' => $atoms[$info['sid']],
'context' => $info['context'],
'options' => $info['options'],
'align' => $info['align'],
'caption' => $info['caption'],
// Only store a SAS code in the filter cache, that will get replaced
// with the HTML for the rendered atom in
// mee_field_attach_view_alter().
'content' => '[scald=' . $info['sid'] . ':' . $info['context'] . ($info['options'] ? ' ' . $info['options'] : '') . ']',
));
}
Comment | File | Size | Author |
---|---|---|---|
#2 | undefined_offset_error-2840060-2.patch | 556 bytes | jimmyko |
Comments
Comment #2
jimmyko CreditAttribution: jimmyko as a volunteer commentedI have created a tiny patch for this issue.
Comment #4
nagy.balint CreditAttribution: nagy.balint commentedThanks!