Issue #4227
closed
Crane 3.2 to 3.3 - Javascript error
Status:
CLOSED - CURRENTRELEASE
Description
After upgrading from Crane 3.2 to 3.3, the webpage stays white and I have a javascript error
TypeError: $(...).dataTable is not a function repositories:62:25
<anonyme>
https://repos.xxxx:8443/crane/repositories:62:25
c
jquery-1.10.2.js:3048:9
fireWith
jquery-1.10.2.js:3160:6
ready
jquery-1.10.2.js:433:2
q
jquery-1.10.2.js:104:3
Could you please specify which page you are seeing this on.
I tried to reproduce this and failed.
Have you changed any crane config files after the upgrade? Have you restarted the services and sure that they are correctly running?
What browser do you use?
To my very little javascript knowlegde, this error comes up when jquery is not loaded, but our scripts are in the correct order, more to this that section of the code has not been touched for a long time.
https://github.com/pulp/crane/blob/master/crane/templates/layout.html#L24
- Status changed from NEW to POST
- Assignee set to ipanova@redhat.com
- Sprint set to Sprint 46
- Triaged changed from No to Yes
Hi,
Sorry I was a little busy:
I have this configuration :
[general]
data_dir: /var/lib/pulp/published/docker/v2/app
debug: false
endpoint: repos.engsec:8443
[serve_content]
enable: true
[solr]
url: http://localhost:8983/solr/pulp/query?x={0}
And on apache
<VirtualHost *:8443>
ServerName repos.engsec
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/repos.engsec_G-IGCGROUPE-G2-SERVEURS-AUTH-CERT_pem.cer
SSLCertificateKeyFile /etc/pki/tls/private/repos.engsec.key
WSGIScriptAlias / /usr/share/crane/crane.wsgi
<Location /crane>
#Require host localhost
Require all granted
</Location>
<Directory /usr/share/crane/>
Require all granted
</Directory>
</VirtualHost>
Best regards
Hi,
These files are not found
<script src="../static/js/bootstrap.min.js"></script>
<script src="../static/js/jquery.dataTables.js"></script>
<script src="../static/js/patternfly.min.js"></script>
I don't know where crane should find these files ...
The files seems to be deployed here : /usr/lib/python2.7/site-packages/crane/static/j but there is no rules in the Apache configuration for this folder
So I have this and it's working
<Directory /usr/lib/python2.7/site-packages/crane/static>
Require all granted
</Directory>
Alias /static /usr/lib/python2.7/site-packages/crane/static
Also in URL v2 the img is searched at this path https://repos.engsec:8443/crane/static/img/crane.png but on v1 on this path https://repos.engsec:8443/static/img/crane.png
v1 is correct, v2 give a 404 not found
- Status changed from POST to MODIFIED
- Platform Release set to 2.19.0
- Sprint/Milestone set to 2.19.0
- Status changed from MODIFIED to 5
- Status changed from 5 to CLOSED - CURRENTRELEASE
Also available in: Atom
PDF
Fixing path for the js script files.
closes #4227 https://pulp.plan.io/issues/4227