Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: MODUL: OIL.js Cookie Consent Management

    mattheis

    • Neu im Forum
    • Beiträge: 12
    Re: MODUL: OIL.js Cookie Consent Management
    Antwort #270 am: 08. November 2020, 08:55:16
    Hallo,

    habe einen neuen Shop installiert und dieses Modul,
    ich verwende den Bootstrap4.

    Beim starten vom Shop bekomme ich aber nur folgenden Hinweis,
    kann mir jemand helfen?

    mattheis

    • Neu im Forum
    • Beiträge: 12
    Re: MODUL: OIL.js Cookie Consent Management
    Antwort #271 am: 08. November 2020, 10:57:28
    Hat sich erledigt.

    Danke

    eronweb

    • Mitglied
    • Beiträge: 113
    Re: MODUL: OIL.js Cookie Consent Management
    Antwort #272 am: 10. November 2020, 09:28:16
    Guten Morgen,
    Ich habe das Modul auf einem anderen Webserver ohne Probleme installiert.

    Auf dem Webserver hier erhalte ich jedoch Fehlermeldungen:
    Code: Javascript  [Auswählen]
    Access to XMLHttpRequest at 'https://vendorlist.consensu.org/vendorlist.json' from origin 'https://www.domain.de' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

    Nun gehe ich davon aus, dass es am Webserver liegt. Ich habe bereits versucht "Access-Control-Allow-Origin" über die ".htaccess" zu erlauben, jedoch ohne Erfolg.

    Hat jemand eine Idee?
    Gruß Chris

    noRiddle (revilonetz)

    • Experte
    • Beiträge: 13.743
    • Geschlecht:
    Re: MODUL: OIL.js Cookie Consent Management
    Antwort #273 am: 11. November 2020, 17:23:07
    Das sieht danach aus, daß die geänderte (oder auch neue, wenn du vorher kein Modul der Art hattest) Datei /templates/DEIN_TEMPLATE/javascript/cookieconsent.js.php nicht aufgespielt wurde.

    Gruß,
    noRiddle

    eronweb

    • Mitglied
    • Beiträge: 113
    Re: MODUL: OIL.js Cookie Consent Management
    Antwort #274 am: 12. November 2020, 09:04:18
    Es lag wie bereits auf der 2. Seite erwähnt tatsächlich an der JS-Komprimierung.
    Da kommt man natürlich nicht so fix drauf.

    Wenn die JS-Komprimierung aus ist, dann wird alles korrekt angezeigt.

    hpzeller

    • Experte
    • Beiträge: 4.129
    • Geschlecht:
    Re: MODUL: OIL.js Cookie Consent Management
    Antwort #275 am: 12. November 2020, 12:24:03
    Hallo eronweb,

    ersetze doch mal testweise in der Datei /includes/external/compactor/compactor.php ab Zeile 416 folgenden Code

    Code: PHP  [Auswählen]
                    /**
                     * Use simple preg_replace to compresses code (ie javascript and css) whitespace.
                     * It would be advisable to use another library such as 'minify' http://code.google.com/p/minify/
                     * because this function has certain limitations with comments and other regex expressions.
                     * You can set another function callback using the 'compress_js_callback' option.
                     *
                     * @access private
                     * @param string $code Code string
                     * @return string
                     **/

                    private function _simpleCodeCompress($code)
                    {
          // Remove multiline comment
                            $code = preg_replace('/\/\*(?!-)[\x00-\xff]*?\*\//', '', $code);
          // Removes single line '//' comments
          $code = $this->_removeSingleLineComments($code);
          $code = preg_replace('/[^:]\\/\\/[^\\n\\r]*[\\n\\r]/', '', $code);
          $code = preg_replace('/\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\//', '', $code);
          // Remove extra spaces
                            $code = preg_replace('/\s+/', ' ', $code);
          // prevent negative px styles
          $code = preg_replace('/(?<!px)\s?(-)\s?/', "\\1", $code);
          // Remove spaces that can be removed
                            return trim(preg_replace('/\s?([\{\};\=\(\)\/\+\*])\s?/', "\\1", $code));
                    }

                    /**
                     * Strips PHP Comments from the buffer
                     *
                     * @access private
                     * @param string $html The HTML string for comment removal.
                     * @return string
                     */

        private function _stripPHPComments($html) {
          // Removes single line '//' comments
          $html = $this->_removeSingleLineComments($html);
         
          // Strip blank lines
          $html = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $html);
         
          return trim(preg_replace('/\/\*.*?\*\//s', '', $html));
        }
       
                    /**
                     * Strips single line Comments from the buffer
                     *
                     * @access private
                     * @param string $code Code string
                     * @return string
                     */

        private function _removeSingleLineComments($code) {
          if ($this->_options['compress_css'] == false) {
            $code = preg_replace('/(?:(?:\/\*(?:[^*]|(?:\*+[^*\/]))*\*+\/)|(?:(?<!\:|\\\|\'|\")\/\/.*))/', '', $code);
          }
          return $code;
        }
            }
    ?>

    mit diesem Code.

    Code: PHP  [Auswählen]
                    /**
                     * Use simple preg_replace to compresses code (ie javascript and css) whitespace.
                     * It would be advisable to use another library such as 'minify' http://code.google.com/p/minify/
                     * because this function has certain limitations with comments and other regex expressions.
                     * You can set another function callback using the 'compress_js_callback' option.
                     *
                     * @access private
                     * @param string $code Code string
                     * @return string
                     **/

                    private function _simpleCodeCompress($code)
                    {
          // Remove multiline comment
                            $code = preg_replace('/\/\*(?!-)[\x00-\xff]*?\*\//', '', $code);  // entfernt multi line comments '/* */', ist ueberfluessig! hpzeller
          // Removes single line '//' comments
          $code = $this->_removeSingleLineComments($code); // entfernt sowohl multi line commenst '/* */' als auch single line '//' comments! hpzeller
          $code = preg_replace('/[^:]\\/\\/[^\\n\\r]*[\\n\\r]/', '', $code);  // entfernt single line '//' comments auch innerhalb doppelter Anführungszeichen FEHLER, und ist ausserdem ueberfluessig! hpzeller
          $code = preg_replace('/\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\//', '', $code); // entfernt nochmals multi line comment '/* */', ist uebrfluessig! hpzeller
          // Remove extra spaces
                            $code = preg_replace('/\s+/', ' ', $code);
          // prevent negative px styles
          $code = preg_replace('/(?<!px)\s?(-)\s?/', "\\1", $code);
          // Remove spaces that can be removed
                            return trim(preg_replace('/\s?([\{\};\=\(\)\/\+\*])\s?/', "\\1", $code));
                    }

                    /**
                     * Strips PHP Comments from the buffer
                     *
                     * @access private
                     * @param string $html The HTML string for comment removal.
                     * @return string
                     */

        private function _stripPHPComments($html) {
          // Removes single line '//' comments
          $html = $this->_removeSingleLineComments($html); // entfernt sowohl multi line commenst '/* */' als auch single line '//' comments! hpzeller
         
          // Strip blank lines
          $html = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $html);
         
          return trim(preg_replace('/\/\*.*?\*\//s', '', $html));  // entfernt multi line comments '/* */', ist aber so ueberfluessig, und kann durch folgenden Code ersetzt werden return trim($html);! hpzeller
        }
       
                    /**
                     * Strips single line  and  multi line Comments from the buffer
                     *
                     * @access private
                     * @param string $code Code string
                     * @return string
                     */

        private function _removeMultiLineAndSingleLineComments($code) {
          // Wegen https://www.modified-shop.org/forum/index.php?topic=41168.msg377654#msg377654
          // zuerst multi line '/* */' comments entfernen
          // und erst danach gegebenenfalls single line '//' comments entfernen.
          $code = preg_replace('/(?:\/\*(?:[^*]|(?:\*+[^*\/]))*\*+\/)/', '', $code); // entfernt multi line '/* */' comments. hpzeller    
          if ($this->_options['compress_css'] == false) {
            $code = preg_replace('/(?:(?<!\:|\\\|\'|\")\/\/.*)/', '', $code);  // entfernt single line '//' comments. hpzeller
          }      
          return $code;
        }
            }
    ?>

    Hintergrund, siehe hier -> Antwort #233 und hier -> Antwort #255

    Gruss
    Hanspeter

    Tomcraft

    • modified Team
    • Gravatar
    • Beiträge: 46.185
    • Geschlecht:
    Re: MODUL: OIL.js Cookie Consent Management
    Antwort #276 am: 12. November 2020, 13:02:28
    [...]
    Hintergrund, siehe hier -> Antwort #233 und hier -> Antwort #255
    [...]

    Sowie Ticket #930. Danke an dieser Stelle nochmal für deine Hilfe mit der Komprimierung. :thx:

    Grüße

    Torsten

    Dampfliquids

    • Neu im Forum
    • Beiträge: 46
    • Geschlecht:
    Re: MODUL: OIL.js Cookie Consent Management
    Antwort #277 am: 15. November 2020, 01:39:59
    Hallo,

    habe einen neuen Shop installiert und dieses Modul,
    ich verwende den Bootstrap4.

    Beim starten vom Shop bekomme ich aber nur folgenden Hinweis,
    kann mir jemand helfen?

    Bei mir schaut es so aus. Habe die Dateien in den Shoproot kopiert, Modul installiert, Cache geleert usw.

    Template ist Bootstrap 4
    Shopversion 2.0.5.1

    Karl1

    • Experte
    • Beiträge: 1.805
    Re: MODUL: OIL.js Cookie Consent Management
    Antwort #278 am: 15. November 2020, 13:10:22
    Hallo Dampfliquids,
    hast du auch die richtigen Dateien für das Template von verwendet? -> TEMPLATE: Bootstrap4 für Shop 2.x - freies responsive Template

    Schalte zum Testen auch die Komprimierung aus, damit auch die richtigen CSS- und JS-Dateien verwendet werden.

    Gruß Karl

    Dampfliquids

    • Neu im Forum
    • Beiträge: 46
    • Geschlecht:
    Re: MODUL: OIL.js Cookie Consent Management
    Antwort #279 am: 15. November 2020, 16:17:49
    Vielen Dank Karl. Das war es. Hast mich wieder gerettet.

    Dampfliquids

    • Neu im Forum
    • Beiträge: 46
    • Geschlecht:
    Re: MODUL: OIL.js Cookie Consent Management
    Antwort #280 am: 15. November 2020, 17:13:28
    Was ich nicht verstehe wenn ich auf "Weitere Informationen" drücke öffnet sich nichts. Im Demoshop hat es funktioniert. Lg

    Karl1

    • Experte
    • Beiträge: 1.805
    Re: MODUL: OIL.js Cookie Consent Management
    Antwort #281 am: 15. November 2020, 17:23:10
    Was soll man dir darauf antworten - bei mir funktioniert's?
    Link zur Seite würde helfen!

    Gruß Karl

    Dampfliquids

    • Neu im Forum
    • Beiträge: 46
    • Geschlecht:
    Re: MODUL: OIL.js Cookie Consent Management
    Antwort #282 am: 15. November 2020, 18:11:33
    Das steht bei mir wenn ich im Backend auf Konfiguration "Cookie Consent" bin.

    Code: PHP  [Auswählen]
    Exception NOTICE:
    Type    NOTICE
    Message Undefined index: oID
    File    /www/htdocs/xxx/Dampfliquids/admin/cookie_consent.php
    Line    317
    Type    NOTICE
    Message Undefined index: action
    File    /www/htdocs/xxx/Dampfliquids/admin/cookie_consent.php
    Line    317
    Type    NOTICE
    Message Undefined index: action
    File    /www/htdocs/xxx/Dampfliquids/admin/cookie_consent.php
    Line    352
    Type    NOTICE
    Message Undefined index: action
    File    /www/htdocs/xxx/Dampfliquids/admin/cookie_consent.php
    Line    438

    Dampfliquids

    • Neu im Forum
    • Beiträge: 46
    • Geschlecht:
    Re: MODUL: OIL.js Cookie Consent Management
    Antwort #283 am: 15. November 2020, 21:08:56
    Was soll man dir darauf antworten - bei mir funktioniert's?
    Link zur Seite würde helfen!
    [...]

    https://www.dampfliquids.at
    habe es kurz online gestellt. Lg

    kulli

    • Fördermitglied
    • Beiträge: 249
    • Geschlecht:
    Re: MODUL: OIL.js Cookie Consent Management
    Antwort #284 am: 16. November 2020, 06:21:58
    Erzeugt einen script-Fehler: (Browser- Konsole F12 nutzen)
    [ Für Gäste sind keine Dateianhänge sichtbar ]

    Lösung ? (verwende das Theme leider nicht)
    Shop Hosting
    11 Antworten
    2488 Aufrufe
    10. Dezember 2021, 21:55:58 von gdl-joe
    11 Antworten
    3303 Aufrufe
    17. Dezember 2021, 12:40:07 von Pixelknecht
    8 Antworten
    1358 Aufrufe
    16. Oktober 2023, 16:47:54 von Tomcraft
    2 Antworten
    766 Aufrufe
    07. Oktober 2022, 13:16:22 von Viol