Issue #4227
closedCrane 3.2 to 3.3 - Javascript error
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
Updated by dkliban@redhat.com almost 6 years ago
Could you please specify which page you are seeing this on.
Updated by ipanova@redhat.com almost 6 years ago
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
Updated by ipanova@redhat.com almost 6 years ago
- Status changed from NEW to POST
- Assignee set to ipanova@redhat.com
- Sprint set to Sprint 46
Updated by Poil almost 6 years ago
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
Updated by Poil almost 6 years ago
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 ...
Updated by Poil almost 6 years ago
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
Added by ipanova@redhat.com almost 6 years ago
Updated by ipanova@redhat.com almost 6 years ago
- Status changed from POST to MODIFIED
Applied in changeset 14c1b831a3ad83aaf2444bc6de7b06880839c5ef.
Added by ipanova@redhat.com over 5 years ago
Revision f1209ca5 | View on GitHub
Fixing path for the js script files.
closes #4227 https://pulp.plan.io/issues/4227
(cherry picked from commit 14c1b831a3ad83aaf2444bc6de7b06880839c5ef)
Updated by ipanova@redhat.com over 5 years ago
Applied in changeset f1209ca56672ef6be4ba26184e0bb8d51ea653fd.
Updated by ttereshc over 5 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
Fixing path for the js script files.
closes #4227 https://pulp.plan.io/issues/4227