I am following this url about iframe Modal example, except I use a local html file under /public/forms
class releaseArchitectureModal extends Modal {
constructor(client: EditorClient) {
super(client, {
title: 'Release Architecture',
width: 800,
height: 600,
url: 'forms/releaseArchitectureForm.html',
});
}
The ifame shows up in developer mode and do its expected function, but it doesn’t show render the html content after installing the bundle. And I get this error in console
in fact exploring the html is empty in the browser resources.
Also I made sure the html file exist in the created zip file bundle
Are there any missing step I need to make in order to load the html file proberly?
Best answer by Nathan Kim
Hi @KGV !
Ben and I (he has been covering for me, thanks Ben) have a couple more suggestions to try.
First: Like you referenced earlier, could you send the contents of your webpack.config.js? Some changes to the build config might be needed. You should be able to send this file here (the contents by default have no specific information). However, if you would like, you can send us a private message or email, too.
Also, from Ben: Running through the following steps to create, upload, and install a bare-bones extension (with as minimal of changes as possible) will help us narrow down where the issue is. Could you try going through them?
Run the update sdk command (just to make sure you're on the most up-to-date version): npx lucid-package update-sdk
Create a brand new extension npx lucid-package@latest create (select Editor Extension in component selection step, no framework for custom UI)
Create a new app in the developer portal and update the package id in the newly created extension's manifest.json file to match (this should be the only manual change you need to make to files in the extension)
Bundle the new extension: npx lucid-package@latest bundle
Upload and install to the new app in the dev portal
Verify if you're still seeing the same issue of the html file not being uploaded properly
Thank you for your patience, especially with so many extra follow-ups.
Hey there, just to get some additional details and rule out the more obvious possibilities…
Have you re-uploaded the new zip file?
Have you installed the newly uploaded package version via the developer portal? (You can verify you’ve got the proper one installed by checking it’s version number against the version number in your extension’s
manifest.json
file
Have you refreshed the editor browser tab since uploading the package?
Interesting. What sort of content do you have inside that html file? Are you trying to make use of some external framework for example? Just trying to narrow down what sort of divergences you’ve made from the simple example here. I personally threw together a quick extension following the instructions on that page of the documentation, with the same modal class structure as you provided here (and putting the html in the same location in public) and had no issues with uploading and installing the package, so hoping to divine where your specific example may be different.
I’ll keep looking into some things on my end. In the mean time, here’s a few things you can try on your end to debug/troubleshoot it:
Check that you’ve got the most up-to-date sdk version:
npx lucid-package update-sdk
Try building with build-editor-extension command (this command does everything to build the final extension.js file, but may be helpful in troubleshooting)
npx lucid-package build-editor-extension <name>
Check your package.zip file. If you extract it, you should be able to verify if the html file exists in the bundle (should be in the public folder)
Check if the network tab gives any more information on that 404 error
Ben and I (he has been covering for me, thanks Ben) have a couple more suggestions to try.
First: Like you referenced earlier, could you send the contents of your webpack.config.js? Some changes to the build config might be needed. You should be able to send this file here (the contents by default have no specific information). However, if you would like, you can send us a private message or email, too.
Also, from Ben: Running through the following steps to create, upload, and install a bare-bones extension (with as minimal of changes as possible) will help us narrow down where the issue is. Could you try going through them?
Run the update sdk command (just to make sure you're on the most up-to-date version): npx lucid-package update-sdk
Create a brand new extension npx lucid-package@latest create (select Editor Extension in component selection step, no framework for custom UI)
Create a new app in the developer portal and update the package id in the newly created extension's manifest.json file to match (this should be the only manual change you need to make to files in the extension)
Bundle the new extension: npx lucid-package@latest bundle
Upload and install to the new app in the dev portal
Verify if you're still seeing the same issue of the html file not being uploaded properly
Thank you for your patience, especially with so many extra follow-ups.
A Lucid account is required to interact with the Community, and your participation is subject to the
Supplemental Lucid Community Terms.
You may not participate in the Community if you are under age 18. You will be redirected to the Lucid app to log in.
A Lucid account is required to interact with the Community, and your participation is subject to the
Supplemental Lucid Community Terms.
You may not participate in the Community if you are under age 18. You will be redirected to the Lucid app to log in.