SPA Renderer V2 not rendering remote page

192 views
Skip to first unread message

Michael Haufe

unread,
May 18, 2021, 5:25:49 PM5/18/21
to Magnolia User Mailing List
I've been experimenting with getting The SPA Renderer Extended module to work.

My environment is Magnolia version 6.2.8 DX Core.

The module is installed as:

<dependency>
  <groupId>info.magnolia.pages</groupId>
  <artifactId>magnolia-spa-rendering-extended</artifactId>
  <version>1.1</version>
</dependency>

My front end application is configured with:

const config = {
    get appBase() { return `/${this.hostName}` },
    get apiPages() { return `${this.mgnlAuthorUrl}/.rest/delivery/pages/v1` },
    get apiPagesPreview() { return `${this.mgnlAuthorUrl}/.rest/preview/pages/v1` },
    get apiTemplateDefinitions() { return `${this.mgnlAuthorUrl}/.rest/template-definitions/v1` },
    componentMappings: {
        'one-ds:pages/basic': Basic,
        ...
    },
    get hostName(){ return window.location.hostname },
    isPreview: true,
    languages: ['en', 'de'],
    // TODO: parameterize from .env ?
    get mgnlAuthorUrl(){ return 'http://localhost:8091' },
    get mgnlVersion() {
        return new URLSearchParams(window.location.href).get('mgnlVersion');
    },
    staticWebResourcesPath: '/static' 
}

CORS is configured in magnolia and when I visit my front-end application on a separate domain it renders as expected:

performs ajax request to

All is well.

Now on the Magnolia side in the Page template (basic.yaml) I have the following:

title: 'one-ds: Basic'
#renderType: spa
renderType: spaExtended
class: info.magnolia.rendering.spa.renderer.SpaRenderableDefinition
# I assume this points to the remote site?
# templateScript: http://localhost:8091
templateScript: http://site-1.local

dialog: one-ds:pages/basic

areas:
  main:
    title: Main Area
    availableComponents:
     ...
        
  extras:
    title: Extras Area
    availableComponents:
     ...


When I attempt to preview or edit the page though I receive a 500 error:

HTTP Status 500 – Internal Server Error
...
java.lang.RuntimeException: com.machinezoo.noexception.WrappedException: java.net.ConnectException: Connection refused (Connection refused)
...

Inspecting the Iframe wrapping the WYSIWYG, I see the following:

<iframe class="gwt-Frame" src="/site-1.local.html?mgnlPreview=false&mgnlChannel=desktop" ...>

That is not the url I expected. I was under the impression that this should be
pointing to the remote domain <http://site-1.local>

From the documentation I can't tell if something is missing or not. 
I assumed it was as straightforward as:

1. the font-end code referencing the magnolia server (confirmed to work)
2. The backend referencing the front-end for WYSIWYG rendering (not working)

Is there something obvious I'm missing?

Bartosz Staryga

unread,
May 21, 2021, 6:58:10 AM5/21/21
to Magnolia User Mailing List
Hey Michael,

I might know what is wrong :)

Regarding the iframe URL
Yes, it is correct.
As of now, Magnolia (parent window) does a few things to preview (child iframe).
It does it directly accessing the DOM of the child (e.g. rendering green bars). This operation is only allowed within one domain for security reason.
Hence preview iframe looks ok.
What happens behind the scene when you open a page in the Pages app is magnolia takes your remote domain http://site-1.local adds whatever is in preview iframe pathname and fetches that page.
In your case, Magnolia would behind the scene fetch http://site-1.local/site-1.local.html?mgnlPreview=false&mgnlChannel=desktop
It gets whatever the response body is and puts it inside the preview iframe <iframe class="gwt-Frame" src="/site-1.local.html?mgnlPreview=false&mgnlChannel=desktop" ...>
That we can load the data from the remote place but allow all the WYSIWYG authoring experience.

The team is working on extracting all the communication, dom manimulation into JS script so in the spa extended version that will land in the product probably will be free of those cavets.

Regarding your error
Usually, errors in with spa extended are due to our JS not doing something.
So far every time I saw 500 with spa extended was due to calling /.rest/template-definitions/v1/undefined, so not having the correct page template added to the url.
If you could check in your network tab to see what is causing this 500 would be a big help :)

If this is the case, you have two options:
  1. Make sure you get back from your pages endpoint correct mgnl:template and attach it to URL
  2. Use template annotations instead: https://docs.magnolia-cms.com/product-docs/Developing/API/REST-API/SPA-template-annotations-endpoint.html
Go for nr 2 (there are few reasons why, if you wanna know I can explain :P)

Hope that helps.

Cheers,
Bartosz



--
You received this message because you are subscribed to the Google Groups "Magnolia User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to user-list+...@magnolia-cms.com.
To view this discussion on the web, visit https://groups.google.com/a/magnolia-cms.com/d/msgid/user-list/d0156251-303a-4b5f-a6cd-252f9931b06dn%40magnolia-cms.com.


--
Best regards,

Bartosz Staryga
Front-End Solution Architect, Headless Expert
bartosz...@magnolia-cms.com 

Magnolia 
Oslo-Strasse 2, 4142 Münchenstein (Basel), Switzerland
Office: +41 61 228 90 00 www.magnolia-cms.com
 
 

Michael Haufe

unread,
May 24, 2021, 9:50:35 AM5/24/21
to Magnolia User Mailing List, bartosz...@magnolia-cms.com
If it fetches http://site-1.local/site-1.local.html?mgnlPreview=false&mgnlChannel=desktop then that implies to me that it can not be a headless SPA as a server on the target machine would have to forward requests to the root application as appropriate. A statically generated headless site would work otherwise. Regardless, I created a site-1.local.html page on the target to make sure a 404 wouldn't occur and that did not make a difference in the WYSIWYG editor, it still raises a 500 error.

The text of the 500 error in the WYSIWYG is as follows and no reference to /.rest/* is mentioned (it can't get that far):

```
java.lang.RuntimeException: com.machinezoo.noexception.WrappedException: java.net.ConnectException: Connection refused (Connection refused) info.magnolia.rendering.engine.RenderingFilter.handleTemplateRequest(RenderingFilter.java:162) info.magnolia.rendering.engine.RenderingFilter.doFilter(RenderingFilter.java:94) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.rendering.model.ModelExecutionFilter.doFilter(ModelExecutionFilter.java:109) info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:59) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.personalization.filter.VariantResolverFilter.doFilter(VariantResolverFilter.java:131) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.cms.filters.AggregatorFilter.doFilter(AggregatorFilter.java:133) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.cms.security.BaseSecurityFilter.doFilter(BaseSecurityFilter.java:57) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.cms.filters.RepositoryMappingFilter.doFilter(RepositoryMappingFilter.java:122) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.cms.filters.CompositeFilter.doFilter(CompositeFilter.java:65) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:74) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81) info.magnolia.cms.filters.CompositeFilter.doFilter(CompositeFilter.java:65) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.virtualuri.VirtualUriFilter.doFilter(VirtualUriFilter.java:98) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81) info.magnolia.module.cache.executor.Bypass.processCacheRequest(Bypass.java:58) info.magnolia.module.cache.executor.CompositeExecutor.processCacheRequest(CompositeExecutor.java:66) info.magnolia.module.cache.filter.CacheFilter.doFilter(CacheFilter.java:164) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.cms.i18n.I18nContentSupportFilter.doFilter(I18nContentSupportFilter.java:85) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.cms.filters.RangeSupportFilter.doFilter(RangeSupportFilter.java:78) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81) info.magnolia.cms.security.BaseSecurityFilter.doFilter(BaseSecurityFilter.java:57) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.multisite.filters.CrossSiteSecurityFilter.doFilter(CrossSiteSecurityFilter.java:104) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81) info.magnolia.cms.security.SecurityCallbackFilter.doFilter(SecurityCallbackFilter.java:84) info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:59) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.cms.security.LogoutFilter.doFilter(LogoutFilter.java:94) info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:59) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.module.site.filters.SiteMergeFilter.doFilter(SiteMergeFilter.java:119) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.multisite.filters.MultiSiteFilter.doFilter(MultiSiteFilter.java:120) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.cms.filters.MultiChannelFilter.doFilter(MultiChannelFilter.java:83) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.sitemesh.webapp.MagnoliaSiteMeshFilter.bufferAndPostProcess(MagnoliaSiteMeshFilter.java:95) org.sitemesh.webapp.contentfilter.ContentBufferingFilter.doFilter(ContentBufferingFilter.java:126) org.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:120) org.sitemesh.config.ConfigurableSiteMeshFilter.doFilter(ConfigurableSiteMeshFilter.java:163) info.magnolia.sitemesh.config.MagnoliaConfigurableSiteMeshFilter.doFilter(MagnoliaConfigurableSiteMeshFilter.java:92) info.magnolia.cms.filters.FilterDecorator.doFilter(FilterDecorator.java:90) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.module.cache.filter.GZipFilter.doFilter(GZipFilter.java:74) info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:59) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81) info.magnolia.cms.security.auth.login.LoginFilter.doFilter(LoginFilter.java:128) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.enterprise.registration.RegistrationFilter.doFilter(RegistrationFilter.java:79) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.cms.security.CsrfTokenSecurityFilter.doFilter(CsrfTokenSecurityFilter.java:107) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81) info.magnolia.cms.filters.MultipartRequestFilter.doFilter(MultipartRequestFilter.java:151) info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:59) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.personalization.preview.filter.PreviewFilter.doFilter(PreviewFilter.java:92) info.magnolia.cms.filters.OncePerRequestAbstractMgnlFilter.doFilter(OncePerRequestAbstractMgnlFilter.java:59) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.personalization.trait.AbstractTraitDetectorFilter.doFilter(AbstractTraitDetectorFilter.java:80) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.personalization.trait.AbstractTraitDetectorFilter.doFilter(AbstractTraitDetectorFilter.java:80) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.personalization.trait.AbstractTraitDetectorFilter.doFilter(AbstractTraitDetectorFilter.java:80) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.personalization.trait.AbstractTraitDetectorFilter.doFilter(AbstractTraitDetectorFilter.java:80) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.cms.filters.ContentTypeFilter.doFilter(ContentTypeFilter.java:155) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.cms.filters.ContextFilter.doFilter(ContextFilter.java:128) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79) info.magnolia.cms.filters.CompositeFilter.doFilter(CompositeFilter.java:65) info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85) info.magnolia.cms.filters.SafeDestroyMgnlFilterWrapper.doFilter(SafeDestroyMgnlFilterWrapper.java:107) info.magnolia.cms.filters.MgnlFilterDispatcher.doDispatch(MgnlFilterDispatcher.java:67) info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:110) info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:96)
```

Michael Haufe

unread,
May 24, 2021, 9:58:55 AM5/24/21
to Magnolia User Mailing List, bartosz...@magnolia-cms.com

Bartosz Staryga

unread,
May 26, 2021, 9:19:05 AM5/26/21
to Michael Haufe, Magnolia User Mailing List
Hey Michael,

It does still is headless CMS. Data is still decoupled from the front end. The front end still fetches all data over REST.
What you need to ensure is that your front end is smart enough to fetch the correct page.

Screenshot 2021-05-26 at 15.14.11.png

One of the ways would be e.g.:
...
const nodeName = 'spa-home';
const pageRes = await fetch(
'/magnoliaAuthor/.rest/pages/' +
nodeName +
window.location.pathname.replace(new RegExp('(.*' + nodeName + '|.html)', 'g'), '')
);
...

Please keep in mind that this is how the spaExtended module works. It does use rather ticky solution to bring the feature to Magnolia.
The version that would end up in the product itself should simply load the external iframe.

If you could share what you can see in the browser dev tools network tab, the request causing the 500 could be a bit more helpful.
Java error stack is black magic for me :(

Cheers,
Bartosz


Michael Haufe

unread,
May 26, 2021, 9:32:42 AM5/26/21
to Magnolia User Mailing List, bartosz...@magnolia-cms.com, Magnolia User Mailing List, Michael Haufe
Yes, I know it is headless, I mean it's not an SPA as the target *.html pages either need to exist or the front-end would need a server to handle the requests generically to forward them to the application. Magnolia is doing this when hosted under the light-modules folder. This does not happen with a simple move of the front end code to another location. That's a separate discussion though and irrelevant to the issue here and a trivial thing to configure with .htaccess.

The Network tab has nothing but the generic 500 error with the details above, there are no console errors.

On Wednesday, May 26, 2021 at 8:19:05 AM UTC-5 bartosz...@magnolia-cms.com wrote:
Hey Michael,

Bartosz Staryga

unread,
May 27, 2021, 5:00:57 AM5/27/21
to Magnolia User Mailing List, Michael Haufe
Hey Michael,

Yep, you are right when we host our SPA in LM then .htaccess, CDN configuration or even Magnolia's Virtual URI mapping would do the trick.

As of 500 is it looking like sth like that:
Screenshot 2021-05-27 at 10.59.40.png
What request does it happen for exactly?

Cheers,
Bartosz



--
You received this message because you are subscribed to the Google Groups "Magnolia User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to user-list+...@magnolia-cms.com.
Message has been deleted

Michael Haufe

unread,
May 27, 2021, 9:47:59 AM5/27/21
to Magnolia User Mailing List, bartosz...@magnolia-cms.com, Michael Haufe
The error happens on the iframe url itself:

error-1.png

The console has nothing additional
error-2.png

The front-end can access fine:

error-3.png

Top level pages defined as:

error-4.png

Bartosz Staryga

unread,
May 28, 2021, 9:07:13 AM5/28/21
to Michael Haufe, Magnolia User Mailing List
Hey Michael,

The spaExtended behind the scene will not call just site-1.local but:
http://site-1.local/site-1.local.html?mgnlPreview=false&mgnlChannel=desktop
  • http://site-1.local - this comes from templateScript
  • site-1.local.html - this comes from node name in Pages app
  • ?mgnlPreview=false&mgnlChannel=desktop - Pages app preview always adds this
So you need to ensure that http://site-1.local/site-1.local.html?mgnlPreview=false&mgnlChannel=desktop can be handled by your external server.
It is SPA so the most common way is to have some rewrite that would return index.html of your SPA for all requests.

On screenshot, you only show http://site-1.local

If this is all sorted and you still got 500 then I am out of ideas then it needs to be some error when Magnolia behind the scene fetches the remote page. What exactly I would be out of ideas :(

Cheers,
Bartosz


Michael Haufe

unread,
May 28, 2021, 1:40:57 PM5/28/21
to Magnolia User Mailing List, bartosz...@magnolia-cms.com, Magnolia User Mailing List
I've resolved the issue. 

I looked at the source code of the SPARenderer class in the magnolia-spa-rendering-extended-1.1.jar and saw that there was only one place with it could go wrong:

mgnl-java.png
This made me suspicious that there is a local machine issue. I tested placing the front end code on a remote server and it fetched successfully.

In my particular case my local environment is set up as:

Magnolia in Docker 

Front end in IIS on the host machine.

Docker is ignorant of the hosts file on the parent machine so any request will fail when it is directly from the server:

docker-cli.png

The browser does not have this problem, and a fetch from the front-end in magnolia succeeds:

mgnl-front-fetch.png

So for docker (on windows WSL in this case), the following url has to be used in the template:

template-url.png

<http://host.docker.internal> is a reserved url for access to the parent machine. 
So to direct the request to the right location, the IIS site has to be updated to respond to this request:

iis-binding.png

With that being said, I think this was still a fruitful thread to give insight into how the plugin works beyond the basic documentation.
Hopefully it proves useful for others using this extension in a non-traditional manner.

Out of curiosity, in the next version, is the general plan to

1. Not copy the remote html page to magnolia
2. Leverage  Window.postMessage() for communication?

On Friday, May 28, 2021 at 8:07:13 AM UTC-5 bartosz...@magnolia-cms.com wrote:
Hey Michael,

Bartosz Staryga

unread,
May 31, 2021, 2:57:50 AM5/31/21
to Michael Haufe, Magnolia User Mailing List
Great job on finding it out! Now it does make sense what was happening :)

Regarding your questions

Not copy the remote html page to magnolia
AFAIK the idea is that preview iframe will load directly the external URL

Leverage Window.postMessage() for communication
That would be my guess :) I saw that there are works to externalize all preview-Magnolia communications and operations to external JS that could be then just dropped inside the template.
It is the end game for sure but will it already end up in the first version that will land in the product, I can not tell.

Cheers,
Bartosz


Christopher Zimmermann

unread,
May 31, 2021, 3:17:28 AM5/31/21
to Magnolia User Mailing List, Michael Haufe
Great that you took the time to share your resolution Michael.

Yes, we are working on the postMessage approach. 


Best regards,

Bartosz Staryga
Magnolia 
Oslo-Strasse 2, 4142 Münchenstein (Basel), Switzerland
 
 

--
You received this message because you are subscribed to the Google Groups "Magnolia User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to user-list+...@magnolia-cms.com.


--
Best regards,

Christopher Zimmermann Product Manager 
christopher...@magnolia-cms.com 

Magnolia 
Oslo-Strasse 2, 4142 Münchenstein (Basel), Switzerland
 
 

Reply all
Reply to author
Forward
0 new messages