Open Deltik opened 11 months ago
This patch fixes the symptom of this bug, but I'm concerned about potential side effects:
diff --git a/e107_core/shortcodes/single/navigation.php b/e107_core/shortcodes/single/navigation.php
--- a/e107_core/shortcodes/single/navigation.php (revision a6e1c0b897a3bf3f3e7bd6ea0382e2556e456379)
+++ b/e107_core/shortcodes/single/navigation.php (date 1691073309731)
@@ -47,6 +47,8 @@
$template = e107::getCoreTemplate('navigation', $tmpl);
$data = $nav->initData($category, $parm);
+ e107::getScParser()->parseCodes("{SETIMAGE: default}");
+
return $nav->render($data, $template, $parm);
}
Maybe related: https://github.com/e107inc/e107/issues/4846
Maybe related: https://github.com/e107inc/e107/issues/4143 See answer.
A similar answer here: https://github.com/e107inc/e107/issues/2676
This patch fixes the symptom of this bug, but I'm concerned about potential side effects:
diff --git a/e107_core/shortcodes/single/navigation.php b/e107_core/shortcodes/single/navigation.php --- a/e107_core/shortcodes/single/navigation.php (revision a6e1c0b897a3bf3f3e7bd6ea0382e2556e456379) +++ b/e107_core/shortcodes/single/navigation.php (date 1691073309731) @@ -47,6 +47,8 @@ $template = e107::getCoreTemplate('navigation', $tmpl); $data = $nav->initData($category, $parm); + e107::getScParser()->parseCodes("{SETIMAGE: default}"); + return $nav->render($data, $template, $parm); }
Perhaps adding {SETIMAGE: default} to the core navigation template is a better idea, at least it would provide theme developers with a way to override this change.
The issue is the reuse of the e_parse
state for a different scope (first in "navigation", then in "page"). The ideal fix would be to initialize the state for that particular scope rather than share one across the entire execution. Otherwise, we're forcing themes to work around quirks/bugs from the e107 core.
Bug Description
Due to the reuse of state in
e107::getParser()
, navigation bar icons that were uploaded to Media Manager will use the same thumbnail dimensions as the ones oncpage
s.Using e107 v2.3.2, this is the stack where the thumbnail dimensions are specified:
The thumbnail dimensions are set in this stack:
And navigation icons uploaded to
e_MEDIA_IMAGE
reuse the dimensions here:How to Reproduce
Steps to reproduce the behavior:
Expected Behavior
Actual Behavior