Project

Profile

Help

Issue #4227

Crane 3.2 to 3.3 - Javascript error

Added by Poil 12 months ago. Updated 7 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Sprint/Milestone:
Start date:
Due date:
Severity:
3. High
Version - Crane:
Platform Release:
2.19.0
Blocks Release:
Target Release - Crane:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 46

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

Associated revisions

Revision f1209ca5 View on GitHub
Added by ipanova@redhat.com 8 months ago

Fixing path for the js script files.

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

(cherry picked from commit 14c1b831a3ad83aaf2444bc6de7b06880839c5ef)

History

#1 Updated by dkliban@redhat.com 12 months ago

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

#2 Updated by ipanova@redhat.com 12 months 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

#3 Updated by ipanova@redhat.com 12 months ago

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

#4 Updated by CodeHeeler 12 months ago

  • Triaged changed from No to Yes

#5 Updated by Poil 11 months 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

#6 Updated by Poil 11 months 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 ...

#7 Updated by Poil 11 months 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

#8 Updated by ipanova@redhat.com 11 months ago

  • Status changed from POST to MODIFIED

#9 Updated by ttereshc 8 months ago

  • Platform Release set to 2.19.0

#10 Updated by ttereshc 8 months ago

  • Sprint/Milestone set to 2.19.0

#12 Updated by ttereshc 8 months ago

  • Status changed from MODIFIED to ON_QA

#13 Updated by ttereshc 8 months ago

  • Status changed from ON_QA to CLOSED - CURRENTRELEASE

#14 Updated by bmbouter 7 months ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF