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: Email optionen error beim Speichern

    Juan Carlos Silverio Gomez

    • Fördermitglied
    • Beiträge: 473
    • Geschlecht:
    Email optionen error beim Speichern
    am: 27. Juni 2016, 13:34:02
    Hallo,

    wenn ich die e-mail einstellungen abspeichern möchte kommt nur eine weise Seite. Aber das nur wenn ich in der Spanischen Sprache bin. Bei den anderen Sprachen geht es wunderbar.
    error-log schreibt:

     [27-06-2016 13:04:22] E_STRICT   : LoggingManager: Only variables should be passed by reference in File: /mnt/web014/e3/89/57439089/htdocs/snack/admin/configuration.php on Line: 69

    Weiss jemand woran es liegen könnte ?

    Lg, Juan Carlos

    Linkback: https://www.modified-shop.org/forum/index.php?topic=35250.0

    Bonsai

    • Viel Schreiber
    • Beiträge: 4.127
    • Geschlecht:
    Re: Email optionen error beim Speichern
    Antwort #1 am: 27. Juni 2016, 13:36:23
    Da fehlt vermutlich eine Sprachkonstante oder irgendwas mit der Zeichenkodierung gefällt ihm nicht. Der Shop ist UTF-8, oder?

    Zeige mal den Code vom Beginn der Datei bis Zeile 69 der /admin/configuration.php

    Juan Carlos Silverio Gomez

    • Fördermitglied
    • Beiträge: 473
    • Geschlecht:
    Re: Email optionen error beim Speichern
    Antwort #2 am: 27. Juni 2016, 13:51:40
    Hallo Bonsai,

    ja, ist UTF8. Habe in einem unterordner installiert

    Und wie gesagt, mit deutsch/english Speichert er ja...,

    Code: PHP  [Auswählen]
    <?php
    /* --------------------------------------------------------------
       $Id: configuration.php 5547 2013-09-06 13:19:01Z Tomcraft $

       modified eCommerce Shopsoftware
       http://www.modified-shop.org

       Copyright (c) 2009 - 2013 [www.modified-shop.org]
       --------------------------------------------------------------
       based on:
       (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
       (c) 2002-2003 osCommerce(configuration.php,v 1.40 2002/12/29); www.oscommerce.com
       (c) 2003 nextcommerce (configuration.php,v 1.16 2003/08/19); www.nextcommerce.org
       (c) 2006 XT-Commerce (configuration.php 229 2007-03-06)

       Released under the GNU General Public License
       --------------------------------------------------------------*/


      require('includes/application_top.php');

      //include special language file
      if (isset($_GET['gID']) && is_file(DIR_FS_LANGUAGES . $_SESSION['language'] . '/admin/configuration_'.(int)$_GET['gID'].'.php')) {
        include(DIR_FS_LANGUAGES . $_SESSION['language'] . '/admin/configuration_'.(int)$_GET['gID'].'.php');
      }
      //install new configurations
      if (file_exists(DIR_WS_INCLUDES.'configuration_installer.php')) {
        include(DIR_WS_INCLUDES.'configuration_installer.php');
      }
      //set value_limits
      $value_limits = array();
      if (file_exists(DIR_WS_INCLUDES.'configuration_limits.php')) {
        include(DIR_WS_INCLUDES.'configuration_limits.php');
      }

      $action = (isset($_GET['action']) ? $_GET['action'] : '');

      if (xtc_not_null($action)) {
        switch ($action) {
          case 'save':
            // moneybookers payment module version 2.4
            if ($_GET['gID']=='31') {
              if (isset($_POST['_PAYMENT_MONEYBOOKERS_EMAILID'])) {
                $url = 'https://www.moneybookers.com/app/email_check.pl?email=' . urlencode($_POST['_PAYMENT_MONEYBOOKERS_EMAILID']) . '&cust_id=86&password=1a28e4';
                $ch = curl_init();
                curl_setopt($ch, CURLOPT_URL, $url);
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                curl_setopt($ch, CURLOPT_HEADER, 0);
                curl_setopt($ch, CURLOPT_TIMEOUT, 30);
                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
                $result = curl_exec($ch);
                if ($result=='NOK') {
                  $messageStack->add_session(MB_ERROR_NO_MERCHANT, 'error');
                }
                if (strstr($result,'OK,')) {
                  $data = explode(',',$result);
                  $_POST['_PAYMENT_MONEYBOOKERS_MERCHANTID'] = $data[1];
                  $messageStack->add_session(sprintf(MB_MERCHANT_OK,$data[1]), 'success');
                }
              }
            }

            // update changed configurations
            if (isset($_POST) && count($_POST) > 0) {
              $configuration_query = xtc_db_query("select configuration_key,configuration_id, configuration_value, use_function,set_function from " . TABLE_CONFIGURATION . " where configuration_group_id = '" . (int)$_GET['gID'] . "' order by sort_order");
              while ($configuration = xtc_db_fetch_array($configuration_query)) {
                $configuration['configuration_value'] = stripslashes($configuration['configuration_value']);
                if (is_array($_POST[$configuration['configuration_key']])) {
                  // multi language config
                  if (gettype(array_shift(array_keys($_POST[$configuration['configuration_key']]))) == 'string') {
                    $config_value = array();
    if (gettype(array_shift(array_keys($_POST[$configuration['configuration_key']]))) == 'string') {
                    $config_value = array();
                    foreach ($_POST[$configuration['configuration_key']] as $key => $value) {
                      if (xtc_not_null($value)) {
                        $config_value[] =  $key . '::' . $value;
                      }
                    }
                    $_POST[$configuration['configuration_key']] = implode('||', $config_value);
                  } else {
                    $_POST[$configuration['configuration_key']] = implode(',', $_POST[$configuration['configuration_key']]);
                  }
                }

     

    Bonsai

    • Viel Schreiber
    • Beiträge: 4.127
    • Geschlecht:
    Re: Email optionen error beim Speichern
    Antwort #3 am: 27. Juni 2016, 14:16:49
    Uff ... das ganze ist da mehrsprachig geworden ....

    $_POST[$configuration['configuration_key']] ist das Problem .... nur was davon?

    Entweder fehlt ein Feld ($_POST) oder das Array $configuration hat in dem Fall ein Problem.

    Ich würde beides in Zeile 68 mit var_dump(); ausgeben lassen und mal vergleichen was der Unterschied ist wenn du spanisch oder deutsch laufen hast.
    Wenn var_dump() nicht geht, kann man file_put_contents('meine_datei.txt',var_export($variable,true)); nehmen. var_export() mit zweitem Parameter true gibt die Variable als String zurück, und file_put_contents(); schreibt das ganze in eine Textdatei.

    Juan Carlos Silverio Gomez

    • Fördermitglied
    • Beiträge: 473
    • Geschlecht:
    Re: Email optionen error beim Speichern
    Antwort #4 am: 27. Juni 2016, 14:47:38
    Hallo, Danke Bonsai. Habe bemerkt das ich überhaupt probleme beim Speichern habe. Auch mit German-sprache, seite bleibt weiss...:-(  , mann kann sich nicht mal registrieren, kommt auch weise seite...

    hmm

    Lg, Juan CArlos

    Bonsai

    • Viel Schreiber
    • Beiträge: 4.127
    • Geschlecht:
    Re: Email optionen error beim Speichern
    Antwort #5 am: 27. Juni 2016, 14:55:09
    Gleicher Fehler in DE?

    Dann müsstest du das Prozedere aus meinem Letzten Post vergleichen zu einem Shop in dem es geht ....

    hpzeller

    • Experte
    • Beiträge: 4.129
    • Geschlecht:
    Re: Email optionen error beim Speichern
    Antwort #6 am: 27. Juni 2016, 14:57:42
    Hallo Juan Carlos,

    dein Skript scheint kaputt zu sein, denn dieser Code kommt darin unmittelbar hintereinander zwei mal vor.

    Code: PHP  [Auswählen]
                  if (gettype(array_shift(array_keys($_POST[$configuration['configuration_key']]))) == 'string') {
                    $config_value = array();
     

    Gruss
    Hanspeter

    Juan Carlos Silverio Gomez

    • Fördermitglied
    • Beiträge: 473
    • Geschlecht:
    Re: Email optionen error beim Speichern
    Antwort #7 am: 27. Juni 2016, 16:08:31
    Sorry, hpzeller. ist schon richtig...habe nur falsch kopiert......

    lg, Juan carlos
    8 Antworten
    1226 Aufrufe
    10. August 2019, 12:16:01 von awids
    0 Antworten
    1320 Aufrufe
    22. April 2015, 11:44:42 von Olikun
               
    anything