1.0.8.3 Questions / Comments / Concerns

Ask the community for help and support.
vmn
Posts: 40
Joined: Mon Mar 08, 2021 8:59 am
Has thanked: 3 times
Been thanked: 1 time

Re: 1.0.8.3 Questions / Comments / Concerns

Post by vmn »

Hi,
still problems with catalog side images in admin, if DEFAULT_IMAGE is set.
Now the tep_info_image function correctly shows category and product images, but the tep_image doesn't. The language flags do not show either.

My fix for 1.0.8.2 still works:

in admin/includes/functions/html_output.php

in function tep_image

replace:
$image->set_prefix(DIR_FS_ADMIN);

with:
if (Text::is_prefixed_by($src, HTTP_CATALOG_SERVER)) {
$image->set_web_prefix(HTTP_CATALOG_SERVER . DIR_WS_CATALOG);
}
else {
$image->set_prefix(DIR_FS_ADMIN);
}
Last edited by vmn on Sun May 23, 2021 5:47 pm, edited 1 time in total.

Tags:
vmn
Posts: 40
Joined: Mon Mar 08, 2021 8:59 am
Has thanked: 3 times
Been thanked: 1 time

Re: 1.0.8.3 Questions / Comments / Concerns

Post by vmn »

Vanilla installation with zone fixes reported here:

I changed the store country to Finland (no zones). Then I tried to update the store zone with an empty value.

[23-May-2021 19:16:20 Europe/Helsinki] PHP Fatal error: Uncaught TypeError: Argument 1 passed to Text::prepare() must be of the type string, null given, called in /opt/lampp/htdocs/shop/admin/includes/functions/database.php on line 93 and defined in /opt/lampp/htdocs/shop/includes/system/versioned/1.0.8.2/text.php:63
Stack trace:
#0 /opt/lampp/htdocs/shop/admin/includes/functions/database.php(93): Text::prepare(NULL)
#1 /opt/lampp/htdocs/shop/admin/configuration.php(22): tep_db_prepare_input(NULL)
#2 {main}
thrown in /opt/lampp/htdocs/shop/includes/system/versioned/1.0.8.2/text.php on line 63


This change in admin/configuration.php seemed to fix it:

switch ($action) {
case 'save':
//VMN$configuration_value = tep_db_prepare_input($_POST['configuration_value'] ?? NULL);
$configuration_value = tep_db_prepare_input($_POST['configuration_value'] ?? '');

I reproduced the error also in vanilla 1.0.8.1 and 1.0.8.2. It used to work in 1.0.7.16.
gsmiley007
Posts: 82
Joined: Sun Mar 14, 2021 9:28 pm
Has thanked: 9 times
Been thanked: 2 times

Re: 1.0.8.3 Questions / Comments / Concerns

Post by gsmiley007 »

For people running mysql under 5.7.

To support older versions of MySQL, one could go through and change the following columns to VARCHAR(191):

/install/phoenix.sql

administrators.user_name
configuration.configuration_key
pages.slug

And change the index for customers.email_address to
CODE: SELECT ALL

UNIQUE KEY uq_customers_email_address (customers_email_address(191))

This works from version 1.0.8.1 to 1.0.8.3. I can't get it working in 1.0.8.4
mingleefoo
Posts: 3
Joined: Thu Nov 11, 2021 8:52 am

Delete category

Post by mingleefoo »

Hello
I have this problem when i delete a category:


Fatal error: Uncaught TypeError: array_filter(): Argument #2 ($callback) must be a valid callback, non-static method Categories::remove() cannot be called statically in C:\xampp\htdocs\oscvr\admin\includes\actions\catalog\delete_category_confirm.php:31 Stack trace: #0 C:\xampp\htdocs\oscvr\admin\includes\actions\catalog\delete_category_confirm.php(31): array_filter(Array, 'Categories::rem...') #1 C:\xampp\htdocs\oscvr\admin\includes\segments\process_action.php(18): require('C:\\xampp\\htdocs...') #2 C:\xampp\htdocs\oscvr\admin\catalog.php(32): require('C:\\xampp\\htdocs...') #3 {main} thrown in C:\xampp\htdocs\oscvr\admin\includes\actions\catalog\delete_category_confirm.php on line 31

the url display is :
http://localhost/oscvr/admin/catalog.ph ... irm&cPath=

i see cPath= "nothing" ?
when i delete a product i have no problem
i work with php 8

Any idea ?

Thx
ecartz
Lead Developer
Lead Developer
Posts: 2637
Joined: Tue Nov 05, 2019 6:02 pm
Has thanked: 4 times
Been thanked: 181 times

Re: Delete category

Post by ecartz »

mingleefoo wrote: Thu Nov 11, 2021 8:59 am Fatal error: Uncaught TypeError: array_filter(): Argument #2 ($callback) must be a valid callback, non-static method Categories::remove() cannot be called statically in C:\xampp\htdocs\oscvr\admin\includes\actions\catalog\delete_category_confirm.php:31 Stack trace: #0 C:\xampp\htdocs\oscvr\admin\includes\actions\catalog\delete_category_confirm.php(31): array_filter(Array, 'Categories::rem...') #1 C:\xampp\htdocs\oscvr\admin\includes\segments\process_action.php(18): require('C:\\xampp\\htdocs...') #2 C:\xampp\htdocs\oscvr\admin\catalog.php(32): require('C:\\xampp\\htdocs...') #3 {main} thrown in C:\xampp\htdocs\oscvr\admin\includes\actions\catalog\delete_category_confirm.php on line 31
TY. https://github.com/CE-PhoenixCart/Phoen ... 8a92bde12b
mingleefoo wrote: Thu Nov 11, 2021 8:59 am i work with php 8
While PHP 8 isn't in the "tested" list, the software should work with it. I actually have a PHP 8 site that I plan to publish in the near future, so at this point, it's simply a matter of announcing that compatibility. In this case, it may have changed a warning into a fatal, but the code shouldn't warn either. Anyway, this change should fix it.
mingleefoo
Posts: 3
Joined: Thu Nov 11, 2021 8:52 am

Re: 1.0.8.3 Questions / Comments / Concerns

Post by mingleefoo »

Thx for the reply
If you want i can post all the bugs i find with php 8.0.12 my version CE is 1.0.8.7
mingleefoo
Posts: 3
Joined: Thu Nov 11, 2021 8:52 am

Re: 1.0.8.3 Questions / Comments / Concerns

Post by mingleefoo »

SOLVED

Just a forget i think ;-)
just replace

public function remove($category_id)
by
public static function remove($category_id)

in admin/includes/classes/categories.php line 82
Post Reply