From 5ba9f2d942ae679fdfc1086539359a12ea2767b2 Mon Sep 17 00:00:00 2001 From: Sergey <63499796+SergeyParfenoff@users.noreply.github.com> Date: Mon, 22 Dec 2025 22:13:42 +0300 Subject: [PATCH] Fix 'Uncaught Invalid JSON: $port_config' error on '802.1Q sync' page The $port_config variable is not embedded into the JS text. This patch fixes the problem with the Heredoc variable definition. --- wwwroot/inc/interface-8021q.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wwwroot/inc/interface-8021q.php b/wwwroot/inc/interface-8021q.php index f38832722..a145cbfa7 100644 --- a/wwwroot/inc/interface-8021q.php +++ b/wwwroot/inc/interface-8021q.php @@ -1180,7 +1180,7 @@ function renderObject8021QSyncPreview ($object, $vswitch, $plan, $C, $R, $maxdec switchportInfoJS ($vswitch['object_id']); // load JS code to make portnames interactive // Initialize one of the three popups: the data is ready. $port_config = addslashes (json_encode (formatPortConfigHints ($vswitch['object_id'], $R))); - addJSText (<<<'END' + addJSText (<<<"END" $(document).ready(function(){ var confData = $.parseJSON('$port_config'); applyConfData(confData);