From c8759c42da14072ccbf9edaf55e6172c947633be Mon Sep 17 00:00:00 2001 From: Sebastian Dimunzio Date: Tue, 30 Sep 2025 12:08:17 -0300 Subject: [PATCH 1/3] Removed all data attributes to components containers --- wp-react-lib/src/embedded/EmbeddedGateway.jsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wp-react-lib/src/embedded/EmbeddedGateway.jsx b/wp-react-lib/src/embedded/EmbeddedGateway.jsx index 03a5032..d911db1 100644 --- a/wp-react-lib/src/embedded/EmbeddedGateway.jsx +++ b/wp-react-lib/src/embedded/EmbeddedGateway.jsx @@ -45,12 +45,20 @@ class EmbeddedGateway extends React.Component { container = div } + + if (component) { const props = {...this.props} const attrs = element.attributes for (let i = attrs.length - 1; i >= 0; i--) { props[attrs[i].name] = attrs[i].value; } + + element.getAttributeNames().forEach((name) => { + if (name.startsWith('data-')) { + element.removeAttribute(name); + } + }); const C = injectIntl(getComponent(component)); if (C) { ReactDOM.createRoot(container) From 596a2ebcd2a622c7fffc896d2e71210b611404c0 Mon Sep 17 00:00:00 2001 From: Sebastian Dimunzio Date: Mon, 6 Oct 2025 11:21:42 -0300 Subject: [PATCH 2/3] removing duplicated common code and update core blocks --- wp-react-lib/src/embedded/EmbeddedGateway.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-react-lib/src/embedded/EmbeddedGateway.jsx b/wp-react-lib/src/embedded/EmbeddedGateway.jsx index d911db1..4e5c956 100644 --- a/wp-react-lib/src/embedded/EmbeddedGateway.jsx +++ b/wp-react-lib/src/embedded/EmbeddedGateway.jsx @@ -45,9 +45,9 @@ class EmbeddedGateway extends React.Component { container = div } - - - if (component) { + if (component != null && getComponent(component) === null) { + element.innerHTML = "

Data Viz Error

Component " + component + " not found


" + } else if (component && getComponent(component)) { const props = {...this.props} const attrs = element.attributes for (let i = attrs.length - 1; i >= 0; i--) { From d12febc112b767836e8d7f7e9bab3588c3638f1e Mon Sep 17 00:00:00 2001 From: Sebastian Dimunzio Date: Wed, 10 Dec 2025 16:46:05 -0300 Subject: [PATCH 3/3] ALDASH-512 Link not leading to download --- wp-react-lib/src/util/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp-react-lib/src/util/index.js b/wp-react-lib/src/util/index.js index dedc552..c4a8a67 100644 --- a/wp-react-lib/src/util/index.js +++ b/wp-react-lib/src/util/index.js @@ -16,6 +16,10 @@ const localReplaceLink = (url, locale) => { if (!pathname.startsWith("/wp/")) { return url; // Not a WordPress path, leave unchanged } + //ensuring access to media library files + if (pathname.startsWith("/wp/wp-content")){ + return url + } const afterWp = pathname.slice(3); // remove '/wp' @@ -38,6 +42,7 @@ export const replaceLink = (url, locale) => { } export const replaceHTMLinks = (html, locale) => { + debugger; //console.log("--------- replaceHTMLinks--------------") // console.log(process.env.REACT_APP_WP_HOSTS)