@@ -171,7 +171,7 @@ along with this software (see the LICENSE.md file). If not, see
window.emailTemplateId = new URLSearchParams(window.location.search).get('emailTemplateId');
const request = new XMLHttpRequest();
request.open("GET", ("${baseLinkUrl}/rest/s1/moqui-mjml/mjml?grapesLocation="+window.grapesLocation+"&htmlLocation="+window.htmlLocation+"&emailTemplateId="+window.emailTemplateId), false); // `false` makes the request synchronous
request.open("GET", ("${baseLinkUrl}/rest/s1/moqui-mjml/mjml?emailTemplateId="+window.emailTemplateId), false); // `false` makes the request synchronous
request.send(null);
let response;
...
...
@@ -203,8 +203,8 @@ along with this software (see the LICENSE.md file). If not, see
<description>Load GrapesJs resource. Can be adapted to entity other than EmailTemplate, but must have data for the grapesLocation and htmlLocation to ensure safety of read and write of resources.</description>
<in-parameters>
<parametername="grapesLocation"/>
<parametername="htmlLocation"/>
<parametername="emailTemplateId"/>
<parametername="emailTemplateId"required="true"/>
</in-parameters>
<out-parameters>
<parametername="grapesLocation"/>
...
...
@@ -31,21 +31,10 @@ along with this software (see the LICENSE.md file). If not, see
<description>Store GrapesJs resource. Can be adapted to entity other than EmailTemplate, but must have data for the grapesLocation and htmlLocation to ensure safety of read and write of resources.</description>
This doesn't look right. htmlFile is created with a random name, no content, and then immediately moved to the dbResourceId based name. This should then mean htmlFile itself is invalid(I just read the source code of the ContentResourceReference:move() method). Further down, the rest of this service then accesses htmlFile.