Project

Profile

Help

Issue #4227

closed

Crane 3.2 to 3.3 - Javascript error

Added by Poil over 5 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
3. High
Version - Crane:
Platform Release:
2.19.0
Target Release - Crane:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 46
Quarter:

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
Actions #1

Updated by dkliban@redhat.com over 5 years ago

Could you please specify which page you are seeing this on.

Actions #2

Updated by ipanova@redhat.com over 5 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

Actions #3

Updated by ipanova@redhat.com over 5 years ago

  • Status changed from NEW to POST
  • Assignee set to ipanova@redhat.com
  • Sprint set to Sprint 46
Actions #4

Updated by CodeHeeler over 5 years ago

  • Triaged changed from No to Yes
Actions #5

Updated by Poil over 5 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

Actions #6

Updated by Poil over 5 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 ...

Actions #7

Updated by Poil over 5 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 over 5 years ago

Revision 14c1b831 | View on GitHub

Fixing path for the js script files.

closes #4227 https://pulp.plan.io/issues/4227

Actions #8

Updated by ipanova@redhat.com over 5 years ago

  • Status changed from POST to MODIFIED
Actions #9

Updated by ttereshc about 5 years ago

  • Platform Release set to 2.19.0
Actions #10

Updated by ttereshc about 5 years ago

  • Sprint/Milestone set to 2.19.0

Added by ipanova@redhat.com about 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)

Actions #12

Updated by ttereshc about 5 years ago

  • Status changed from MODIFIED to 5
Actions #13

Updated by ttereshc about 5 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #14

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF