Neu JTL 5.6.1 Settings page not saving

payfro

Aktives Mitglied
4. Dezember 2023
3
0
Hello,

We found a critical bug on JTL 5.6.1.

Behavior: Plugin Settings not showing on the settings page even though they are in the database.

Running a diff on GenericModelController.php will show the changes

Bash:
diff shop-v5-6-1/includes/src/Router/Controller/Backend/GenericModelController.php shop-v5-5-0/includes/src/Router/Controller/Backend/GenericModelController.php

123c123
< if ($this->item !== null && $this->updateFromPost($this->item, Text::filterXSS($_POST)) === true) {
---
> if ($this->updateFromPost($this->item, Text::filterXSS($_POST)) === true) {
The condition `$this->item !== null && ` breaks the settings page.
 

NoOne

Sehr aktives Mitglied
16. März 2024
673
230
That's not very probable. If $this->item would be null, that probably would end up with a fatal error for $this->updateFromPost. It's more probable that your plugin does something wrong.

Edit: Or it's a Cache-Problem.
 

payfro

Aktives Mitglied
4. Dezember 2023
3
0
Hello,

Thank you for the support.

After disabling cache, we found that turning these variables to true was the cause.

define('PLUGIN_DEV_MODE',true);
define('SMARTY_DEBUG_CONSOLE',true);
define('SHOW_DEBUG_BAR',true);

There is a clear behavioural smell (5.5.0 vs 5.6.1) that there is a difference when these variables are set in /includes/config.JTL-Shop.ini.php

I will leave then post up for future reference.
 

Ähnliche Themen