Welcome to the nuBuilder Forums!

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

Debug Results Form - "Delete All" Topic is solved

Questions related to using nuBuilder Forte.
Post Reply
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Debug Results Form - "Delete All"

Unread post by toms »

Steven,

Could you make the "Delete All" button visible on both the Browse and Edit Form? This allows you to delete all debug entries right from the Browse form without the need to open a record first.
debug_view.PNG
I made this small change to the zzzzsys_debug javascript:

Code: Select all

if(nuFORM.getCurrent().record_id != ''){
    $('.nuActionButton').remove();
    nuAddActionButton('Delete');
// old position:   nuAddActionButton('DeleteAll','Delete All', 'nuDeleteAllAction()');  
}
// new position: 
nuAddActionButton('DeleteAll','Delete All', 'nuDeleteAllAction()'); 
In addition to that, to prevent the debug form from closing after hitting the "Delete All" button, I modified nuajax.js (There might be another way of doing it)

Code: Select all

if (action == "delete" && instruction == "all" && fm.record_id == "")
			{
			    // refresh the browse form
			    nuGetBreadcrumb();
			} else
delete_all_nuajax.PNG
You do not have the required permissions to view the files attached to this post.
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Debug Results Form - "Delete All"

Unread post by toms »

...and the "Delete All" confirm dialog should say "Delete All Records?":

Code: Select all

function nuDeleteAllAction(){
	
    if (confirm("Delete This Record?")) {

		$('#nuDelete').prop('checked', true);
		
		nuUpdateData('delete', 'all');
		
    }
	
}
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Debug Results Form - "Delete All"

Unread post by admin »

toms,

I have put the Button on the Browse now too.

It's on Github and you'll need to run Update.

Can you please test it?

If you want me to change Delete All to Delete All Records, I'll ask you to Add Delete All Records to all the Translations we have.

I think that, if a User doesn't understand Delete All, changing it to Delete All Records, probably won't help much.

Steven
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Debug Results Form - "Delete All"

Unread post by toms »

Steven,

The deleting works just fine. I just noticed a small glitch in the record navigator. "1/0" is shown instead of "0/0" after hitting "Delete All". This issue might occur on any other Browse Form too.
page1_0.PNG
You do not have the required permissions to view the files attached to this post.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Debug Results Form - "Delete All"

Unread post by admin »

toms,

I have changed empty Browse Forms to Page 1 / 1

(and put that on Github)

Steven
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Debug Results Form - "Delete All"

Unread post by toms »

Steven,

The number of pages is now displayed correctly (Page 1 / 1) after deleting all records.
Now if I click the next icon (►) in the record navigator, (Page 0 / 1) is shown. Then, hitting twice the back button (◄) , I see two new entries in the debug list:
nuDebug_Errors.png
===PDO MESSAGE===

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-15, 15' at line 4

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

SELECT zzzzsys_debug_id,deb_message,deb_added
FROM zzzzsys_debug
WHERE 1
ORDER BY zzzzsys_debug_id DESC LIMIT -15, 15

===BACK TRACE====
You do not have the required permissions to view the files attached to this post.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Debug Results Form - "Delete All"

Unread post by admin »

toms,

I think this bug was previously there.

All I changed was this...
page.png
I can't reproduce the error.

Can you give me a way to reproduce it, and tell me of a system Form that I can reproduce it on? (eg. Form, Objects, Translation)

Steven
You do not have the required permissions to view the files attached to this post.
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Debug Results Form - "Delete All"

Unread post by toms »

Steven,

I can reproduce it on both a fresh installation & my productive system.
I recorded a video demonstrating the error.

https://vimeo.com/254289062
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Debug Results Form - "Delete All"

Unread post by admin »

toms,

Ahh, I see what you mean now...

The fix is now on Github.

Steven
Post Reply