Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static images used by lforms cannot be found. #139

Open
sudoris opened this issue Nov 13, 2023 · 7 comments
Open

Static images used by lforms cannot be found. #139

sudoris opened this issue Nov 13, 2023 · 7 comments

Comments

@sudoris
Copy link

sudoris commented Nov 13, 2023

lforms version: 34.2.0

For the version specified above, lforms can't find the magnifying_glass.png and down_arrow_gray_10_10.png images which are used for search and dropdown inputs.

Screenshot 2023-11-12 at 9 57 23 PM
@sudoris
Copy link
Author

sudoris commented Nov 13, 2023

Note: It does works when I download the images from https://clinicaltables.nlm.nih.gov/lforms-versions/34.2.0/webcomponent, and place them in my own public folder.

@plynchnlm
Copy link
Member

plynchnlm commented Nov 14, 2023

Can you provide steps to reproduce the problem?

@rob-a-bolton
Copy link

Having the same issue here.
I'm loading with webpack rather than using directly as a client html link tag, and webpack fails to bundle due to missing the images.
Following the steps in the README you'll have included all the css/js but not the images.
Perhaps this needs adding to the README?

@plynchnlm
Copy link
Member

As noted in the README, you should not attempt to webpack to re-bundle lforms. This is because it is already bundled with webpack because it is released as a web component. Instead, you should include the files with script/link tags (a point which we should probably make more clear in the README).

@sudoris
Copy link
Author

sudoris commented Mar 1, 2024

Haven't had time to write out the exact steps to reproduce the issue, but I'm including the files directly with script/link tags.

Edit: Sorry, I lied. I forgot that I was actually including the files using a custom script (https://github.com/sudoris/lhc_forms_client/blob/main/src/loadExternalScript.ts). So I am using a bundler (vite) for my application, but loading the files for lform separately at run time.

@plynchnlm
Copy link
Member

Interesting. We also have created (but not advertised) an lforms-loader package which can be used to load the LForms files at runtime. It is available on npm. Several of our own websites are using it successfully.

@sudoris
Copy link
Author

sudoris commented Mar 1, 2024

Interesting. We also have created (but not advertised) an lforms-loader package which can be used to load the LForms files at runtime. It is available on npm. Several of our own websites are using it successfully.

That's awesome. I'll have to check that out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants