1.0.8.12 Questions / Comments / Concerns

Ask the community for help and support.
philpla
Posts: 27
Joined: Sun Feb 28, 2021 8:37 am
Has thanked: 2 times
Been thanked: 1 time

Re: 1.0.8.12 Questions / Comments / Concerns

Post by philpla »

You could try changing 156-7 to

Code: Select all

      if ( !class_exists($class) ) {
        if (!file_exists(DIR_FS_CATALOG . "includes/apps/paypal/modules/$module/$module.php")) {
          return;
        }
        $this->loadLanguageFile("modules/$module/$module.php");
thx, this workaround clears the logs.

anyway just for me to understanding: should their be a module for General config tab? or will this tab be removed in further version?

Tags:
bathurst
Posts: 4
Joined: Wed Mar 02, 2022 2:27 pm

Re: 1.0.8.12 Questions / Comments / Concerns

Post by bathurst »

Still getting this after alterations
Notice: Undefined index: Linker in /home/iptv/public_html/phoenix/includes/apps/paypal/admin/content/start.php on line 21

Fatal error: Uncaught Error: Call to a member function build() on null in /home/iptv/public_html/phoenix/includes/apps/paypal/admin/content/start.php:21 Stack trace: #0 /home/iptv/public_html/phoenix/admin/paypal.php(186): include() #1 {main} thrown in /home/iptv/public_html/phoenix/includes/apps/paypal/admin/content/start.php on line 21
bathurst
Posts: 4
Joined: Wed Mar 02, 2022 2:27 pm

Re: 1.0.8.12 Questions / Comments / Concerns

Post by bathurst »

If I go to the General tab on Paypal module I get
Fatal error: Uncaught Error: Call to undefined method Admin::build() in /home/iptv/public_html/phoenix/includes/apps/paypal/cfg_params/ssl_version.php:59 Stack trace: #0 /home/iptv/public_html/phoenix/includes/apps/paypal/OSCOM_PayPal.php(342): OSCOM_PayPal_Cfg_ssl_version->getSetField() #1 /home/iptv/public_html/phoenix/includes/apps/paypal/admin/content/configure.php(61): OSCOM_PayPal->getInputParameters('G') #2 /home/iptv/public_html/phoenix/admin/paypal.php(186): include('/home/iptv/publ...') #3 {main} thrown in /home/iptv/public_html/phoenix/includes/apps/paypal/cfg_params/ssl_version.php on line 59
heatherbell
VIP Member
VIP Member
Posts: 1996
Joined: Mon Oct 07, 2019 4:39 am
Has thanked: 26 times
Been thanked: 175 times

Re: 1.0.8.12 Questions / Comments / Concerns

Post by heatherbell »

bathurst wrote: Fri Mar 04, 2022 4:20 pm If I go to the General tab on Paypal module I get
Already previously reported and answered in this topic.
viewtopic.php?p=8531#p8531
ecartz
Lead Developer
Lead Developer
Posts: 2637
Joined: Tue Nov 05, 2019 6:02 pm
Has thanked: 4 times
Been thanked: 181 times

Re: 1.0.8.12 Questions / Comments / Concerns

Post by ecartz »

bathurst wrote: Fri Mar 04, 2022 4:20 pm Fatal error: Uncaught Error: Call to undefined method Admin::build() in /home/iptv/public_html/phoenix/includes/apps/paypal/cfg_params/ssl_version.php:59
You made half the change. The original error said Linker::build, which you were supposed to change to Admin and link. You changed Linker to Admin but not build to link.
BPickle
Posts: 20
Joined: Tue Apr 06, 2021 2:08 pm
Been thanked: 4 times

Re: 1.0.8.12 Questions / Comments / Concerns

Post by BPickle »

PHP Fatal error: Uncaught TypeError: Argument 1 passed to Text::input() must be of the type string, null given, called in /xxxx/xxxx/xxxx/catalog/ext/modules/payment/paypal/express.php on line 393 and defined in /xxxx/xxxx/xxxx/catalog/includes/system/versioned/1.0.8.2/text.php
Stack trace:
#0 /xxxx/xxxx/xxxx/catalog/ext/modules/payment/paypal/express.php(393): Text::input(NULL)
#1 {main}
thrown in /xxxx/xxxx/xxxx/catalog/includes/system/versioned/1.0.8.2/text.php on line 34
It's easy enough to fix by making the two lines in question in express.php read as follows:

Code: Select all

$ship_suburb = (empty($appPayPalEcResult['PAYMENTREQUEST_0_SHIPTOSTREET2']) ? '' : Text::input($appPayPalEcResult['PAYMENTREQUEST_0_SHIPTOSTREET2']));

Code: Select all

$ship_suburb = (empty($appPayPalEcResult['SHIPTOSTREET2']) ? '' : Text::input($appPayPalEcResult['SHIPTOSTREET2']));
BPickle
Posts: 20
Joined: Tue Apr 06, 2021 2:08 pm
Been thanked: 4 times

Re: 1.0.8.12 Questions / Comments / Concerns

Post by BPickle »

This may not be the right place to post this one.

PHP 8 may have changed its mail() function a little, such that Phoenix running on Linux garbles the emails by adding a space in front of the Content-type and From headers. This is because if the headers are only separated by a LF, then mail() probably adds CRLF to the existing LF, making there be one more white space character between the headers than there should be.

Changing

Code: Select all

return mail($to, $this->ensure_encoding($subject), $this->output, implode($this->lf,, $headers), "-f$from_addr");
in includes/system/versioned/1.0.8.5/email.php to

Code: Select all

return mail($to, $this->ensure_encoding($subject), $this->output, implode("\r\n", $headers), "-f$from_addr");
fixes it. But maybe that might mess up Phoenix running on Windows. Perhaps the headers should be passed as an array with the name of each header as the key for the value being passed.
Last edited by BPickle on Fri Mar 11, 2022 1:34 am, edited 1 time in total.
ecartz
Lead Developer
Lead Developer
Posts: 2637
Joined: Tue Nov 05, 2019 6:02 pm
Has thanked: 4 times
Been thanked: 181 times

Re: 1.0.8.12 Questions / Comments / Concerns

Post by ecartz »

BPickle wrote: Fri Mar 11, 2022 1:09 am PHP 8 may have changed its mail() function a little
Given that your proposed solution is to hard code CRLF, it seems more likely that this is specific to your configuration than PHP 8. Try changing admin > Configuration > E-Mail Options > E-Mail Linefeeds from LF to CRLF. That setting exists precisely because some systems require different configuration.

Note that CRLF is the proper setting for the email in transport. It's just that some Linux senders expect to receive their input with LF and expand it to CRLF. As a result, a CRLF becomes a CRCRLF, because they don't check existing values.

We can't change from a string to an array here until we drop support for PHP 7.0 and 7.1.
BPickle
Posts: 20
Joined: Tue Apr 06, 2021 2:08 pm
Been thanked: 4 times

Re: 1.0.8.12 Questions / Comments / Concerns

Post by BPickle »

I didn't read that configuration entry well enough. Sorry about that. Didn't notice it said it was just for headers.
BPickle
Posts: 20
Joined: Tue Apr 06, 2021 2:08 pm
Been thanked: 4 times

Re: 1.0.8.12 Questions / Comments / Concerns

Post by BPickle »

If a customer changes the address at checkout_shipping_address.php, it works fine, but if a customer changes the address at checkout_payment_address.php, it throws a fatal error.
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Text::input() must be of the type string, null given, called in ... includes/modules/customer_data/cd_firstname.php on line 102 and defined in ... includes/system/versioned/1.0.8.2/text.php:34
The offending line in checkout_payment_address.php is:

Code: Select all

$customer_details = $customer_data->process($customer_data->get_fields_for_page('address_book'));
The same line in checkout_shipping_address.php is fine.

The reason the error is showing up in cd_firstname.php is because I already added (string) to the relevant places in cd_country.php and cd_company.php which forced the null to become a string before being passed to the Text::input() function.

The problem was actually in line 54 of templates/default/includes/pages/checkout_payment_address.php where the value given was "submit" rather than "select." Change that to "select" and the issue disappears.

The checkout_shipping_address.php template adds that hidden input element right after the form tag, and does it correctly. Making the two templates more like each other in the next release might be a good idea, or else line 54 could be permanently changed in just the checkout_payment_address.php template.

Additionally, ./checkout_payment_address.php itself must be made more like ./checkout_shipping_address.php

Code: Select all

    } elseif (isset($_POST['address'])) {
      // process the selected billing destination
      $reset_payment = isset($_SESSION['billto']) && ($_SESSION['billto'] != $_POST['address']) && isset($_SESSION['payment']);
      $_SESSION['billto'] = $_POST['address'];

      if ($customer->fetch_to_address($_SESSION['billto'])) {
        if ($reset_payment) {
          unset($_SESSION['payment']);
        }
        Href::redirect($Linker->build('checkout_payment.php'));
      } else {
        unset($_SESSION['billto']);
      }
    }
  }
should be changed to:

Code: Select all

    }
  } elseif (isset($_POST['address']) && Form::validate_action_is('select')) {
      // process the selected billing destination
    $reset_payment = isset($_SESSION['billto']) && ($_SESSION['billto'] != $_POST['address']) && isset($_SESSION['payment']);
    $_SESSION['billto'] = $_POST['address'];

    if ($customer->fetch_to_address($_SESSION['billto'])) {
      if ($reset_payment) {
        unset($_SESSION['payment']);
      }

      Href::redirect($Linker->build('checkout_payment.php'));
    } else {
      unset($_SESSION['billto']);
    }
  }
Post Reply