diff --git a/bibcite_footnotes.module b/bibcite_footnotes.module index 5162d89..841d99a 100644 --- a/bibcite_footnotes.module +++ b/bibcite_footnotes.module @@ -112,7 +112,7 @@ function bibcite_footnotes_preprocess_bibcite_footnote_list(&$variables) { $override_page_in_citation = FALSE; } - if ($fn['ibid']) { + if (isset($fn['ibid']) && $fn['ibid']) { $build['footnote-text'] = [ '#type' => 'markup', '#markup' => ' ' @@ -131,7 +131,7 @@ function bibcite_footnotes_preprocess_bibcite_footnote_list(&$variables) { } if (!empty($reference_entity_id)) { - if (!$fn['ibid']) { + if (empty($fn['ibid'])) { $citation_build = $citation_tools->getRenderableReference($reference_entity_id); if ($override_page_in_citation) { $citation_build['#data']['page'] = $override_page_in_citation; @@ -200,5 +200,7 @@ function bibcite_footnotes_preprocess_bibcite_footnote_link(&$variables) { $link = Link::fromTextAndUrl($fn['value'], $url)->toRenderable(); - $variables['fn']['fn'][] = $link; + unset($variables['fn']['fn']); + $variables['fn']['fn'] = $link; +// $variables['fn']['fn'][] = $link; }