v1.0.8.1 Questions / Comments / Concerns

Ask the community for help and support.
Owl
Posts: 31
Joined: Sun Feb 28, 2021 8:03 pm
Has thanked: 13 times

Re: v1.0.8.1 Questions / Comments / Concerns

Post by Owl »

not sure if this info helps in anyway but...

Versão do servidor: 10.2.36-MariaDB-cll-lve - MariaDB Server
Versão do protocolo: 10

cpsrvd 11.94.0.4
Versão do cliente de base de dados: libmysql - 5.6.43
Extensão de PHP: mysqliDocumentação curlDocumentação mbstringDocumentação
versão do PHP: 7.3.27


This is a very frequently used server. Im afraid that alot of people that pretends to use Phoenix will be unable to.

Maybe you could create 2 diferent versions, in my humble opinion, to solve this.

Tags:
loop
VIP Member
VIP Member
Posts: 230
Joined: Thu Mar 25, 2021 12:26 pm
Has thanked: 7 times
Been thanked: 3 times

Re: v1.0.8.1 Questions / Comments / Concerns

Post by loop »

does in version 1.0.8.1 now works, that i can put a custom function in the admin/includes/functions folder and it autoloads? thank you all for great release!
ecartz
Lead Developer
Lead Developer
Posts: 2637
Joined: Tue Nov 05, 2019 6:02 pm
Has thanked: 4 times
Been thanked: 181 times

Re: v1.0.8.1 Questions / Comments / Concerns

Post by ecartz »

loop wrote: Tue Mar 30, 2021 7:54 am does in version 1.0.8.1 now works, that i can put a custom function in the admin/includes/functions folder and it autoloads? thank you all for great release!
No. In 1.0.8.1, you can use a hook that listens to admin.system.startApplication and returns a path to load. E.g.

Code: Select all

class hook_admin_system_whatever {

  public function listen_startApplication() {
    return DIR_FS_ADMIN . 'includes/functions/whatever.php';
  }

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

Re: v1.0.8.1 Questions / Comments / Concerns

Post by vmn »

I have onclick events defined in some buttons.

This used to work before 1.0.8.?.

tep_draw_bootstrap_button('Luo PDF', 'fas fa-plus', null, null, ['params' => 'onclick="enable_email(0);"'],($pdf_found ? 'btn btn-light' : 'btn btn-success'));

Now the new button class system renders the button element as:

<button params="onclick="enable_email(0);"" class="btn btn btn-light" type="submit"> <span class="fas fa-plus" aria-hidden="true"></span> Luo PDF</button>
(this was copied from the browser view page source)

This works in 1.0.8.1

tep_draw_bootstrap_button('Luo PDF', 'fas fa-plus', null, null, [ 'onclick' => "enable_email(0);"],($pdf_found ? 'btn btn-light' : 'btn btn-success'));

<button onclick="enable_email(0);" class="btn btn btn-light" type="submit"> <span class="fas fa-plus" aria-hidden="true"></span> Luo PDF</button>

Is this a bug, or a new feature, i.e. should I change the old "params" definition?
ecartz
Lead Developer
Lead Developer
Posts: 2637
Joined: Tue Nov 05, 2019 6:02 pm
Has thanked: 4 times
Been thanked: 181 times

Re: v1.0.8.1 Questions / Comments / Concerns

Post by ecartz »

vmn wrote: Tue Mar 30, 2021 9:50 am Is this a bug, or a new feature, i.e. should I change the old "params" definition?
If you change from tep_draw_bootstrap_button to

Code: Select all

new Button('Luo PDF', 'fas fa-plus', ($pdf_found ? 'btn btn-light' : 'btn btn-success'), [ 'onclick' => 'enable_email(0);']);
then you will definitely be using a new feature and won't have to worry about whether or not the treatment in the legacy compatibility function is a bug.

You also won't have to then replace the tep_draw_bootstrap_button call in the future, which you would otherwise have to do.
vmn
Posts: 40
Joined: Mon Mar 08, 2021 8:59 am
Has thanked: 3 times
Been thanked: 1 time

Re: v1.0.8.1 Questions / Comments / Concerns

Post by vmn »

TY.
This is the complete definition of my button in the new syntax using multiple parameters:

tep_draw_bootstrap_button('Luo PDF', 'fas fa-plus', null, null, ['onclick' => 'enable_email(0);' ,'aria-haspopup' => 'true', 'data-placement'=> 'bottom', 'data-toggle' => 'popover', 'data-content' => 'Talleta lasku PDF - muodossa'] , 'btn ' . ($pdf_found ? 'btn-light' : 'btn-success'));

There are quite a few php files using the old syntax on the catalog side, e.g.:
templates/default/includes/components/product_listing.php
vmn
Posts: 40
Joined: Mon Mar 08, 2021 8:59 am
Has thanked: 3 times
Been thanked: 1 time

Re: v1.0.8.1 Questions / Comments / Concerns

Post by vmn »

I managed to get my catalog images and flags back in admin when DEFAULT_IMAGE is set or not set.

original includes/system/versioned/1.0.8.1/image.php:
...
public function __toString() {
if (defined('DEFAULT_IMAGE') && !Text::is_empty(DEFAULT_IMAGE) && !is_file($this->prefix . $this->get('src'))) {
$this->set('src', DEFAULT_IMAGE);
} elseif ( (empty($this->parameters['src']) || ($this->get('src') === 'images/')) && (IMAGE_REQUIRED === 'false') ) {
return '';
}
...

includes/system/override/classes/image.php:
...
public function __toString() {
$src = $this->get('src');
if (defined('DEFAULT_IMAGE') && !Text::is_empty(DEFAULT_IMAGE)) {
if (!Text::is_prefixed_by($src, HTTP_CATALOG_SERVER . DIR_WS_CATALOG)) {
$src = $this->prefix . $src;
} else {
$src = DIR_FS_CATALOG . Text::ltrim_once($src, HTTP_CATALOG_SERVER . DIR_WS_CATALOG);
}
if (!is_file($src)) {
$this->set('src', DEFAULT_IMAGE);
}
} elseif ((empty($src) || ($src === 'images/')) && (IMAGE_REQUIRED === 'false')) {
return '';
}
...
Nigel
Posts: 107
Joined: Mon Jan 11, 2021 1:39 am
Has thanked: 25 times
Been thanked: 6 times

Re: v1.0.8.1 Questions / Comments / Concerns

Post by Nigel »

What is the server collation for 1.0.8.1 ?
Mine shows as utf8mb4_unicode_ci .

Is this correct for the 1.0.8.1?
Last edited by Nigel on Thu Apr 01, 2021 2:48 pm, edited 1 time in total.
plamastus
VIP Member
VIP Member
Posts: 83
Joined: Fri Mar 12, 2021 2:09 am
Has thanked: 1 time
Been thanked: 2 times

Re: v1.0.8.1 Questions / Comments / Concerns

Post by plamastus »

Please help:

I decided to start fresh from 1.0.8 to 1.0.8.1 and now I am getting this error when I start a fresh installation

There was a problem importing the database. The following error had occured:

Specified key was too long; max key length is 1000 bytes

Please verify the connection parameters and try again.


Any ideas?

Thanks,

Patrick
patrick
heatherbell
VIP Member
VIP Member
Posts: 1996
Joined: Mon Oct 07, 2019 4:39 am
Has thanked: 26 times
Been thanked: 175 times

Re: v1.0.8.1 Questions / Comments / Concerns

Post by heatherbell »

plamastus wrote: Thu Apr 01, 2021 2:11 pmAny ideas?
Already answered further up this topic - viewtopic.php?p=3853#p3853
Post Reply