Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Bug: zzzzsys_session

Questions related to using nuBuilder Forte.
Post Reply
alf1976
Posts: 75
Joined: Tue Dec 26, 2017 8:58 pm

Bug: zzzzsys_session

Unread post by alf1976 »

Hi Steven

I run nuBuilder on a synology webstation. Its all been working fine until an update yesterday.
Since the update i couldn't:
See any add / delete and clone buttons.
See nuDebug Results / Form properties / Form object list options
Update kept "Something's wrong. Try logging in again..."
and a few other issues

Eventually i traced the problem through the zzzzsys_debug

Code: Select all

2018-10-11 00:04:47 - SQL Error in <b>nuRunQuery</b>

<br>

[0] : 
===USER==========

globeadmin

===PDO MESSAGE=== 

SQLSTATE[HY000]: General error: 1364 Field 'sss_time' doesn't have a default value

===SQL=========== 

INSERT INTO zzzzsys_session SET sss_access = ?, zzzzsys_session_id = ?

===BACK TRACE====

/volume1/web/nuBuilder/nusession.php - line 187 (nuRunQuery)

/volume1/web/nuBuilder/nuapi.php - line 4 (require_once)

Once i amended the table to set a default value on this field everything worked fine.

Please can you amend the amend the update procedure so went it updates the table definition it assigns a default setting to sss_time

At the moment i am having to repeat this procedure after doing a system update

Kinds regards
Andrew
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Bug: zzzzsys_session

Unread post by admin »

Andrew,

I believe I have fixed it.

Let me know if it works for you now.


Steven
alf1976
Posts: 75
Joined: Tue Dec 26, 2017 8:58 pm

Re: Bug: zzzzsys_session

Unread post by alf1976 »

Hi Steven,

i have also experienced the same problem on zzzzsys_object and zzzzsys_php. Both have fields that lack defaults values that nuBuilder does not populate when inserting.

zzzzsys_php has sph_php, sph_run, sph_zzzzsys_form_id and sph_hide - discovered when inserting an beforesave event

zzzzsys_object had sob_lookup_autocomplete and sob_lookup_php. discovered when cloning a form object


Andrew
alf1976
Posts: 75
Joined: Tue Dec 26, 2017 8:58 pm

Re: Bug: zzzzsys_session

Unread post by alf1976 »

Hi Steven,

Another one in

zzzzsys_file

Field 'sfi_system' doesn't have a default value
alf1976
Posts: 75
Joined: Tue Dec 26, 2017 8:58 pm

Re: Bug: zzzzsys_session

Unread post by alf1976 »

another one

Field 'syt_help' doesn't have a default value in zzzzsys_tab
alf1976
Posts: 75
Joined: Tue Dec 26, 2017 8:58 pm

Re: Bug: zzzzsys_session

Unread post by alf1976 »

another one,

sus_language in zzzzsys_user
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Bug: zzzzsys_session

Unread post by admin »

Andrew,

I don't get these problems.

I believe it is to do with your setup.

This might help.

https://stackoverflow.com/questions/187 ... ault-value

Steven
alf1976
Posts: 75
Joined: Tue Dec 26, 2017 8:58 pm

Re: Bug: zzzzsys_session

Unread post by alf1976 »

Hi Steven,

That helps. Upon further examination i found this too.

https://mariadb.com/kb/en/library/sql-mode/

It appears that from version MariaDB 10.2.4 strict mode is active as default. The last update my diskstation did took the version upto 10.3.7.

Code: Select all

SELECT REPLACE(@@SQL_MODE, ',', '\n')
Runnng the above in phpMyAdmin does confirm that my MariaDb has the 'STRICT_TRANS_TABLES' flag active.

The page also describes how to remove the flag, which in theory, should resolve the problem.

Why this may be a simple solution, i'm not sure if it is the best solution. if newer installs of mariadb has this flag set as default then more users, in particular new users, will experience the same issues as me. This appears to be already happening https://forums.nubuilder.cloud/viewtopic.php?f=19&t=9715.

I am more than happy to leave it strict mode and report errors as i find them if you are willing to correct them

Please let me know how you wish to proceed.

Andrew
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Bug: zzzzsys_session

Unread post by admin »

Andrew,

Thanks for the offer but I have just set a default value of NULL to all but fields with Primary Keys.

And pushed the changes to Github.

If you could test it on your box, that would be great.


Steven
alf1976
Posts: 75
Joined: Tue Dec 26, 2017 8:58 pm

Re: Bug: zzzzsys_session

Unread post by alf1976 »

hi Steven,

will do. i will let you know how it goes.

Andrew
Post Reply