nuDebug() secret output?

nuDebug() secret output?

Postby clinterman » Thu Jan 03, 2013 1:46 am

I have a form which holds a table called store_review. It has 2 fields
- ID autoincrement
- STORE_ID implemented as a lookup to another table (STORE)

I left ID-field of the form because it will be pre-populated with dbGetUniqueID, which is not numeric. So my current form only holds the lookupfield. When I insert a new record and press save, the record doesn't get saved. Maybe because store_id doesn't hold a value or isn't marked as "dirty" / changed.

So I went to the Before and After save sections of the form properties and put in:
nuDebug("Before saving".$_POST['store_id']);

nuDebug("After saving".$_POST['store_id']);

Then moved to PHP Debug button but that form doesn't show zzsys_trap records that are of type $trap_sql. The nuDebug did write something to zzsys_trap based on the datetimestamp. But what did it write? Its a secret! How to decode the contents of zzsys_trap $trap_sql records?
Posts: 24
Joined: Thu Apr 05, 2012 3:23 pm

Re: nuDebug() secret output?

Postby admin » Thu Jan 03, 2013 7:12 am


Records starting with $TRAP_sql are system generated and used by the Print Button to reproduce a html table that can be exported.

If you go to the Debug Button on the setup tabs, you should see the results you are looking for with $TRAP_sql records filtered out.

Site Admin
Posts: 3138
Joined: Mon Jun 15, 2009 9:53 am

Re: nuDebug() secret output?

Postby Fike » Tue May 09, 2017 4:56 am

I've just found out why sometimes I was not able to print the HTML table when using the Print Button at some Browse forms.

The $TRAP_sql records generated when using the print button pick the 'Before browse' code of the form

When the user presses the Print Button, the browseprint.php file gets this code and executes it IN A SINGLE LINE using the eval() function in order to build the table of that form.

However when the 'Before browse' php code contains double-slash comments (//) the eval() function breaks after the first comment becuase the code was retrieved IN A SINGLE LINE.

Therefore I just needed to remove the double-slash comments at the 'Before browse' tab, in order to make the Print Button work correctly.

Hope this helps someone still using nuBuilder v2.

Kind regrads,

Posts: 79
Joined: Fri Oct 21, 2011 4:43 am

Return to General