Ankündigung

Einklappen
Keine Ankündigung bisher.

JQuery lokale Datei läd nicht

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • JQuery lokale Datei läd nicht

    Guten Abend,

    beim Umstellen im Seitenlayout von CDN auf lokale Datei wird JQuery nicht geladen.
    Hat jemand einen Tipp wo ich schauen muss wo die Datei liegen müsste und wie ich das Problem lösen kann?

    Contao 3.5.35

    Gruß
    tschero
    https://www.webdesign24.biz

  • #2
    Hi tschero,

    hab gerade Contao 3.5.35 getestet. Hier lokal läuft das bei mir korrekt.
    Gibt die Console einen Fehler aus?

    Schöne
    Grüße
    Tom
    *********************
    Neu: Kostenloser Contao Installer 3.0
    *********************
    Contao und Erweiterungen in wenigen Sekunden laden, installieren und updaten - ohne Composer oder Contao Manager.

    Kommentar


    • #3
      Hi Tom,

      eigentlich nur dass JQuery nicht geladen ist...
      Code:
      TypeError: jQuery(...).doubleTapToGo is not a function[Weitere Informationen] [URL="https://www.panzertruppe.com/files/cto_layout/scripts/scripts.js"]scripts.js:37:3[/URL]    <anonym> [URL="https://www.panzertruppe.com/files/cto_layout/scripts/scripts.js"]https://www.panzertruppe.com/files/cto_layout/scripts/scripts.js:37:3[/URL]
      n [URL="https://cdnjs.cloudflare.com/ajax/libs/jquery-tools/1.2.7/jquery.tools.min.js"]https://cdnjs.cloudflare.com/ajax/libs/jquery-tools/1.2.7/jquery.tools.min.js:36:14779[/URL]
      fireWith [URL="https://cdnjs.cloudflare.com/ajax/libs/jquery-tools/1.2.7/jquery.tools.min.js"]https://cdnjs.cloudflare.com/ajax/libs/jquery-tools/1.2.7/jquery.tools.min.js:36:15553[/URL]
      ready [URL="https://cdnjs.cloudflare.com/ajax/libs/jquery-tools/1.2.7/jquery.tools.min.js"]https://cdnjs.cloudflare.com/ajax/libs/jquery-tools/1.2.7/jquery.tools.min.js:36:9771[/URL]
      B [URL="https://cdnjs.cloudflare.com/ajax/libs/jquery-tools/1.2.7/jquery.tools.min.js"]https://cdnjs.cloudflare.com/ajax/libs/jquery-tools/1.2.7/jquery.tools.min.js:36:14346[/URL]
      Kann ich bei 2 Installationen nachvollziehen.


      Gruß
      tschero
      https://www.webdesign24.biz

      Kommentar


      • #4
        Das ist unabhängig von jQuery. Das doubletaptogo.js Script wird nicht mehr geladen. Damit fehlt es und der Fehler: .doubleTapToGo is not a function, wird protokolliert.
        http://www.premium-contao-themes.com

        Kommentar


        • #5
          Hi,

          hast DU eine Idee wie das am besten gefixt werden kann? Auch das Laden von JQuery als lokale Datei.
          Es geht um diese beiden Domains.
          Nr 1.
          Nr. 2.

          Ich wollte wegen dieser DSGVO JQuery gerne lokal laden.

          Gruß
          tschero
          https://www.webdesign24.biz

          Kommentar


          • #6
            Das hat mit der jquery Quelle nichts zu tun. Du bindest das doubleTapToGo Script nicht ein.

            Klicke auf die Grafik für eine vergrößerte Ansicht

Name: screenshot_3045.jpg
Ansichten: 387
Größe: 117,2 KB
ID: 11267
            http://www.premium-contao-themes.com

            Kommentar


            • #7
              Hm ok,

              wie löse ich das Problem am besten?
              Wird ein Update von Quantum ausreichen oder muss ich die markierte Codezeile in irgendeinem Template von Quantum(z.B. fe_page) ergänzen?

              Gruß
              tschero
              https://www.webdesign24.biz

              Kommentar


              • #8
                Das ist das Standard fe_page Template von Quantum.
                http://www.premium-contao-themes.com

                Kommentar


                • #9
                  Hi,

                  ich muss hier noch mal ansetzen.
                  Im Standard fe_page Template wird das doubleTapToGo Script eingebunden.
                  Trotzdem kann JQuery nicht lokal geladen werden.
                  Das passiert weiterhin bei der C 3.5.38 Version als auch nach einem Update auf C 4.4.32.

                  Hier mal das Template fe_page:
                  Code:
                  <!DOCTYPE html>
                  <html lang="<?php echo $this->language; ?>" class="{{ua::class}}">
                  <head>
                  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $this->charset; ?>">
                  <title><?php echo $this->pageTitle; ?> - <?php echo $this->mainTitle; ?></title>
                  <base href="<?php echo $this->base; ?>">
                  
                  <meta name="robots" content="<?php echo $this->robots; ?>">
                  <meta name="description" content="<?php echo $this->description; ?>">
                  <meta name="keywords" content="<?php echo $this->keywords; ?>">
                  <meta name="generator" content="Contao Open Source CMS">
                  <meta name="viewport" content="width=device-width,initial-scale=1.0">
                  
                  <link rel="shortcut icon" href="files/cto_layout/img/favicon.ico" type="image/x-icon" />
                  <link rel="apple-touch-icon" href="files/cto_layout/img/apple-touch-icon.png">
                  
                  <!--[if lt IE 9]>
                  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
                  <script src="files/cto_layout/scripts/selectivizr-min.js"></script>
                  <![endif]-->
                  
                  <?php echo $this->mooScripts; ?>
                  <script type="text/javascript">$.noConflict();</script>
                  <script type="text/javascript" src="files/cto_layout/scripts/jquerytools/jquery.tools.min.js"></script>
                  <script type="text/javascript" charset="utf-8" src="<?php
                  $objCombiner = new Combiner();
                  $objCombiner->add('files/cto_layout/scripts/modernizr.js');
                  $objCombiner->add('files/cto_layout/scripts/pushy/js/pushy.js');
                  $objCombiner->add('files/cto_layout/scripts/waypoints.min.js');
                  $objCombiner->add('files/cto_layout/scripts/jquery.cookie.js');
                  $objCombiner->add('files/cto_layout/scripts/easypiecharts/dist/jquery.easypiechart.min.js');
                  $objCombiner->add('files/cto_layout/scripts/doubletaptogo.js');
                  $objCombiner->add('files/cto_layout/scripts/jquery.scrollTo.min.js');
                  $objCombiner->add('files/cto_layout/scripts/bxslider/jquery.bxslider.js');
                  echo $objCombiner->getCombinedFile();
                  ?>"></script>
                  <script src="files/cto_layout/scripts/scripts.js" type="text/javascript" charset="utf-8"></script>
                  
                  <!-- google web fonts entfernt-->
                  
                  <link rel="stylesheet" type="text/css" media="screen" href="<?php
                  $objCombiner = new Combiner();
                  $objCombiner->add('files/cto_layout/scripts/bxslider/jquery.bxslider.css');
                  $objCombiner->add('files/cto_layout/css/icons.min.css');
                  $objCombiner->add('files/cto_layout/scripts/pushy/css/pushy.css');
                  $objCombiner->add('files/cto_layout/css/animate.css');
                  echo $objCombiner->getCombinedFile();
                  ?>">
                  <link rel="stylesheet" type="text/css" href="files/cto_layout/css/styles.css" media="screen">
                  <link rel="stylesheet" type="text/css" href="files/cto_layout/css/customize.css" media="screen">
                  
                  <?php echo $this->stylesheets; ?>
                  <?php echo $this->head; ?>
                  
                  </head>
                  
                  <body class="{{ua::class}}<?php if ($this->class): ?> <?php echo $this->class; ?><?php endif; ?> <?php if($this->sections['stickyheader']): ?>stickyheader<?php endif; ?>"<?php if ($this->onload): ?> onload="<?php echo $this->onload; ?>"<?php endif; ?>>
                  <!--[if lt IE 9]><p id="chromeframe">You are using an outdated browser. <a href="http://browsehappy.com/">Upgrade your browser today</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to better experience this site.</p><![endif]-->
                  
                  <?php  if (strlen($this->sections['off_canvas']) > 0): ?>
                      <div id="off_canvas" class="pushy pushy-left">
                          <?php echo $this->sections['off_canvas']; ?>
                          <?php echo $this->sections['onepagenav']; ?>
                      </div>
                  <?php endif; ?>
                  
                  <!-- Site Overlay -->
                  <div class="site-overlay"></div>
                  <div id="contentwrapper">
                      <div id="headeroffset">
                          <?php if(strlen($this->sections['top']) > 0): ?>
                          <div id="top">
                              <div class="inside"><?php echo $this->sections['top']; ?><div class="clear"></div></div>
                          </div>
                          <?php endif; ?>
                          <?php if ($this->header): ?>
                          <header id="header">
                              <div id="headerhide"></div>
                              <div class="inside"><?php echo $this->header; ?><?php echo $this->sections['onepagenav']; ?><div class="clear"></div></div>
                          </header>
                          <?php endif; ?>
                      </div>
                      
                      <div id="header_after">
                          <div class="inside"><?php echo $this->sections['slider']; ?></div>
                      </div>
                      
                      <div id="wrapper">
                          <?php  if (strlen($this->sections['teaser']) > 0): ?>
                          <div id="container_before">
                              <div class="inside"><?php echo $this->sections['teaser']; ?></div>
                          </div>
                          <?php endif; ?>
                          <?php if ($this->main): ?>
                          <div id="container">
                              <div id="container-inside" class="inside">
                                  <?php if ($this->left): ?>
                                  <aside id="left">
                                      <div class="inside"><?php echo $this->left; ?></div>
                                  </aside>
                                  <?php endif; ?>
                                  <section id="main">
                                      <div class="inside"><?php echo $this->main; ?></div>
                                  </section>    
                                  <?php if ($this->right): ?>
                                  <aside id="right">
                                      <div class="inside"><?php echo $this->right; ?></div>
                                  </aside>
                                  <?php endif; ?>
                              </div>
                          </div>
                          <?php endif; ?>
                          
                      </div>
                      
                      <?php if ($this->footer): ?>
                      <footer id="footer">
                          <div class="inside"><?php echo $this->footer; ?></div>
                      </footer>
                      <?php endif; ?>
                      
                      <?php if(strlen($this->sections['copyright']) > 0): ?>
                      <div id="bottom">
                          <div class="inside">
                              <?php echo $this->sections['copyright']; ?>
                          </div>
                      </div>
                      <?php endif; ?>
                  
                  </div>
                  
                  <?php if(strlen($this->sections['sidearea']) > 0): ?>
                      <?php echo $this->sections['sidearea']; ?>
                  <?php endif; ?>
                  
                  <div id="linktotop"></div>
                  
                  <?php if(strlen($this->sections['stickyheader']) > 0): ?>
                  <div id="stickyheader">
                      <div class="inside"><?php echo $this->sections['stickyheader']; ?><?php echo $this->sections['onepagenav']; ?></div>
                  </div>
                  <?php endif; ?>
                          
                  <?php echo $this->mootools; ?>
                    <?php if (!$this->disableCron): ?>
                      <script>
                        <?php if ($this->layout->addJQuery): ?>
                          setTimeout(function(){jQuery.ajax("system/cron/cron.txt",{complete:function(e){var t=e.responseText||0;parseInt(t)<Math.round(+(new Date)/1e3)-<?php echo $this->cronTimeout; ?>&&jQuery.ajax("system/cron/cron.php")}})},5e3)
                        <?php else: ?>
                          setTimeout(function(){(new Request({url:"system/cron/cron.txt",onComplete:function(e){e||(e=0),parseInt(e)<Math.round(+(new Date)/1e3)-<?php echo $this->cronTimeout; ?>&&(new Request({url:"system/cron/cron.php"})).get()}})).get()},5e3)
                        <?php endif; ?>
                      </script>
                    <?php endif; ?>
                  
                   </body>
                  </html>
                  Ich brauche hier noch mal etwas Hilfe.

                  Gruß
                  tschero
                  https://www.webdesign24.biz

                  Kommentar


                  • #10
                    Ist jquery im Quelltext nicht vorhanden? Ich glaube CDN mit lokalen Fallback hat in Quantum immer besser geklappt.
                    Contao setzt es über $this->mooScripts; ein
                    http://www.premium-contao-themes.com

                    Kommentar


                    • #11
                      Wenn ich auf lokale Datei umschalte wird JQuery unten auf der Seite eingebunden aber folgendes Script wird im <head> aufgerufen.
                      Code:
                       <script type='text/javascript'> /* <![CDATA[ */ jQuery(document).ready(function($) { jQuery('.bxslider6506').bxSlider( { mode: 'horizontal', auto: true, speed: 2000, pause: 4000, autoStart: true, autoDirection: 'next', autoHover: true, autoDelay: 0, startSlide: 0, randomStart: false, slideSelector: 'div', infiniteLoop: true, captions: false, ticker: false, video: false, useCSS: true, pager: false, controls: true, nextText: '&nbsp;', prevText: '&nbsp;', nextSelector: null, prevSelector: null, autoControls: false, minSlides: 1, maxSlides: 3, moveSlides: 1, slideWidth: 400, slideMargin: 0, adaptiveHeight: false, hideControlOnEnd: true }); }); /* ]]> */ </script>
                      Daran könnte es schon liegen oder?
                      Zuletzt geändert von tschero; 17.01.2019, 10:23.
                      https://www.webdesign24.biz

                      Kommentar


                      • #12
                        Was war hier deine Lösung?
                        Wenn ich bei meiner Installation jQuery auf lokal stelle wird auch nichts geladen.

                        Kommentar


                        • #13
                          Nein ich lade weiter per CDN. Eine lokale Lösung habe ich hier leider noch nicht.
                          https://www.webdesign24.biz

                          Kommentar


                          • #14
                            Moin, ich bin jetzt auch auf dieses Problem gestossen. Habe nach einer ansonsten erfolgreichen Migration von Quantum auf eine 4.4.39, versucht, jQuery im Seitenlayout auf lokal zu stellen. Bei anderen Installation klappt das normalerweise auch gut. Hier passiert leider gar nichts. Die lokale Version ist als Datei vorhanden, wird aber nicht geladen. Erst wenn ich die Datei manuell in der fe_page explizit aufrufe, wird sie geladen. Aber scheinbar nicht so, dass die anderen Module das erkennen.

                            Ich habe auch das hier schon versucht aber ohne Erfolg: https://forum.premium-contao-themes....=7164#post7164

                            Habt ihr eine Lösung gefunden? Ich möchte eigentlich keine externen Aufrufe in der Seite haben.

                            Danke schön und Gruss!

                            Kommentar

                            Lädt...
                            X