Closed goneall closed 10 months ago
@BassCoder2808 @rtgdk - could you take a look at this
Hi @goneall, I checked this and have attached the SS below, it is working on my local machine, does the issue still persist? because the
findLicenseMatch function is present in the utils.js which is loaded on line 177 in submit_new_license.html
@BassCoder2808 I just checked the deployed system at https://tools.spdx.org/app/submit_new_license/ and the error is still there.
It looks like the function is defined in the file static/js/util.js
but that file is not present on the deployed system - see below.
Is it possible there is some deployment issue where that file isn't being deployed?
I think the problem is that we are not running the collect static command and the STATIC_ROOT URL is not defined
Static File Configuration: In your Django settings, ensure that the STATIC_ROOT and STATIC_URL are correctly configured for production. STATIC_ROOT should point to where your static files are collected for deployment.
Collect Static Files: Run python manage.py collectstatic to gather all static files from your apps into one location. Ensure this command is run before deploying your Django app.
Web Server Configuration: Check if your web server (like Nginx or Apache) is correctly configured to serve static files. It should be configured to serve files from the STATIC_ROOT directory.
Permissions: Verify that the user running the web server process has permissions to access the static files in the deployed directory.
Debug Mode: If Django is in debug mode (DEBUG = True), static files might be served by Django itself, which could differ from how they are served in production. Ensure DEBUG is set to False in the production environment.
Cache Busting: Check if there's any caching mechanism interfering with the visibility of the updated static files. Clearing the cache or using cache-busting techniques might resolve the issue.
Deployment Scripts: Review your deployment scripts to ensure they are correctly copying static files to the appropriate location in your production environment.
I will create a PR fo this and @goneall you can check then and we can proceed further
Thanks @BassCoder2808
Fixed with PR #518
After the upgrade, when submitting a new license - if you click on check license, nothing happens.
The browser console log has the following error: