1.0.8.5 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.5 Questions / Comments / Concerns

Post by vmn »

I have admin customers hooks, which reuse the $customers_query result set as well as $cInfo.

My previous Phoenix version was 1.0.8.2 and I jumped to 1.0.8.5.

After the upgrade these hooks stopped working. After some debugging I found the following working solutions.

customers siteEnd hook:

1.0.8.2:
class hook_admin_customers_vmn_injectSiteEnd {
public function listen_injectSiteEnd() {
global $action,$customers_query;
if (empty($action)) {
$customers = $customers_query->data_seek(0);
$table_index = 0;
while ($customers = $customers_query->fetch_assoc()) {
...
$table_index++;
}
...
}
}

1.0.8.5:

class hook_admin_customers_vmn_injectSiteEnd {
public function listen_injectSiteEnd() {
global $action,$table_definition;
if (empty($action)) {
$table_definition['split']->query->data_seek(0);
$table_index = 0;
while ($customers = $table_definition['split']->query->fetch_assoc()) {
...
$table_index++;
}
...
}
}

customers infoBox hook:

1.0.8.2

function listen_infoBox($parameters) {
global $cInfo, $currencies, $action;
$contents = &$parameters['contents'];

if (($cInfo ?? null) instanceof objectInfo) {
...
}
}

1.0.8.5

function listen_infoBox($parameters) {
global $table_definition, $currencies, $action;
$contents = &$parameters['contents'];

$cInfo = $table_definition['info'];
if (($cInfo ?? null) instanceof objectInfo) {
...
}
}


Any comments are appreciated!

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

Re: 1.0.8.5 Questions / Comments / Concerns

Post by vmn »

In admin/specials.php infoBox contents, the expiry date is shown as the current date, if the db value is null. This happens in Date class, where the input is checked for null value.
vmn
Posts: 40
Joined: Mon Mar 08, 2021 8:59 am
Has thanked: 3 times
Been thanked: 1 time

Re: 1.0.8.5 Questions / Comments / Concerns

Post by vmn »

There are no productActionSave admin hook calls any more.

Instead, one should use insertProductAction and updateProductAction hooks.

It looks like hook calls related to form actions (e.g. delete_product_confirm) are automatically generated, others should be excplicitly coded.
Last edited by vmn on Wed Sep 29, 2021 3:40 pm, edited 1 time in total.
User avatar
Cary
VIP Member
VIP Member
Posts: 20
Joined: Fri Mar 12, 2021 9:36 pm
Has thanked: 2 times
Been thanked: 3 times

Re: 1.0.8.5 Questions / Comments / Concerns

Post by Cary »

I can't seem to find a solution to this issue so I'm posting it here since I believe it's related to the 1.0.8.5 update. Testing the site and everything else appears to be working properly but I get the following error when I create a new account (create_account.php): PHP Fatal error: DB: [1062] Duplicate entry '6156' for key 'customers_info.PRIMARY' in /public_html/includes/system/versioned/1.0.8.1/database_core.php on line 44

The email is a new account and I get a white screen (Error 500) but I can leave the page and enter the primary domain and everything appears to work properly. Even checking out with a test order appears to work properly. I think it's only related to the new account creation process.
- Cary
User avatar
Cary
VIP Member
VIP Member
Posts: 20
Joined: Fri Mar 12, 2021 9:36 pm
Has thanked: 2 times
Been thanked: 3 times

Re: 1.0.8.5 Questions / Comments / Concerns

Post by Cary »

Another item: When I search the customers list, the first page lists the first group of customers with the search term. But the link at the bottom (Select Page) excludes the search term if there is a second page. So admin/customers.php?search=Joe shows the first 20 customers with "Joe" in the name/email but the link at the bottom shows admin/customers.php?page=2 which shows all the customers, with or without Joe as a search term. I think this link needs to include the search term like search=Joe. The following seems to work if typed manually: admin/customers.php?search=Joe&page=2
- Cary
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.5 Questions / Comments / Concerns

Post by ecartz »

Cary wrote: Mon Sep 27, 2021 9:22 pm Another item: When I search the customers list, the first page lists the first group of customers with the search term. But the link at the bottom (Select Page) excludes the search term if there is a second page. So admin/customers.php?search=Joe shows the first 20 customers with "Joe" in the name/email but the link at the bottom shows admin/customers.php?page=2 which shows all the customers, with or without Joe as a search term. I think this link needs to include the search term like search=Joe. The following seems to work if typed manually: admin/customers.php?search=Joe&page=2
TY. https://github.com/CE-PhoenixCart/Phoen ... df6a51ec12
User avatar
Cary
VIP Member
VIP Member
Posts: 20
Joined: Fri Mar 12, 2021 9:36 pm
Has thanked: 2 times
Been thanked: 3 times

Re: 1.0.8.5 Questions / Comments / Concerns

Post by Cary »

Thank you @ecartz for the search correction. The other item (Duplicate Entry) is a mistake I made since I imported data from another site and failed to increase the auto_increment value. Thanks for the prompt response!
- Cary
Post Reply