links from Grid Field to Tab/Form Application broken since this morning's updates

All,

This morning I opened my scriptcase development environment to a message that there were updates available. When I checked it showed over 300+ updates, despite the fact that updated this past Monday. Anyway, I went ahead and did the updates before I got into anything involved from a development perspective.

I’ve spent the entire day troubleshooting existing code and not creating a single new form, grid, chart, or other view. It seems that one of the updates this morning broke linked fields within grid applications that go to tab applications. This is the entirety of how navigation occurs in my current project… a grid application appears with records, the user clicks the record they want and a tab application appears with detail. They click on a tab and then within that tab on a single record form application link in another grid application view to see a specific thing, etc.

Example (if it were working):

  • the grid application view is under Accounting - Invoices in my horizontal menu application.
  • A grid application appears with a list of invoices, sorted by status and age.
  • The user clicks on an invoice ID on the left of one of the records to view/edit that invoice
  • A tab application appears with tabs for General, Items, and Payments on it.
  • The user goes to the Items tab and a new grid application appears with records for items in the invoice.
  • The user clicks on an item number on the left to view/edit.
  • A form application appears letting them edit that invoice item.
What's happening:
  • the grid application view is under Accounting - Invoices in my horizontal menu application.
  • A grid application appears with a list of invoices, sorted by status and age.
  • [B]The user clicks on an invoice ID on the left of one of the records[/B] to view/edit that invoice [B]*BROKEN - Nothing Happens Anymore*[/B]
  • A tab application appears with tabs for General, Items, and Payments on it.
  • The user goes to the Items tab and a new grid application appears with records for items in the invoice.
  • [B]The user clicks on an item number on the left[/B] to view/edit. [B]*BROKEN - Nothing Happens Anymore*[/B]
  • A form application appears letting them edit that invoice item.
Here's an example link from one of these broken items that no longer works: javascript:nm_gp_submit5('/scriptcase/app/twma/appaccounting_invoices_edit/', '/scriptcase/app/twma/appaccounting_invoices_list/', '@SC_par@1@SC_par@appaccounting_invoices_list@SC_p ar@ec2862fa6a477e65720f63ffdf1a1cf8', '_self', 'inicio', '0', '0', '', 'appaccounting_invoices_edit', '1')

I went and looked at another grid view where the code has not been generated since this morning. Here’s what it looks like:
javascript:nm_gp_submit5(’/accounting-invoices-edit/’, ‘/accounting-invoices-list-all/’, ‘nmgp_lig_edit_lapis?#?S?@?invoice_id?#?20150518-140?@?’, ‘_self’, ‘inicio’, ‘0’, ‘0’)

I’ve checked my error logs on my development server. I don’t see any syntax errors or the like. Here’s what I see: [INDENT][root@webdev logs]# pwd
/opt/NetMake/v8/components/apache/logs
[root@webdev logs]# tail -f error_log[/INDENT]

<b>Warning</b>:  PHP Startup: Unable to load dynamic library '/opt/NetMake/v8/components/apache/ext/oci8.so' - /opt/NetMake/v8/components/apache/ext/oci8.so: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library '/opt/NetMake/v8/components/apache/ext/pdo_pgsql.so' - /opt/NetMake/v8/components/apache/ext/pdo_pgsql.so: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library '/opt/NetMake/v8/components/apache/ext/php_imap.dll' - /opt/NetMake/v8/components/apache/ext/php_imap.dll: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library '/opt/NetMake/v8/components/apache/ext/oci8.so' - /opt/NetMake/v8/components/apache/ext/oci8.so: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  PHP Startup: Unable to load dynamic library '/opt/NetMake/v8/components/apache/ext/pdo_pgsql.so' - /opt/NetMake/v8/components/apache/ext/pdo_pgsql.so: cannot open shared object file: No such file or directory in <b>Unknown</b> on line <b>0</b><br />
[Sat Mar 26 19:25:02.842052 2016] [:error] [pid 10196] [client 192.168.121.1:35901] FastCGI: server "/opt/NetMake/v8/components/apache/cgi-bin/php.fcgi" stderr: PHP Fatal error:  Call to a member function GetTag() on a non-object in /opt/NetMake/v8/wwwroot/scriptcase/devel/class/generator/nmFontePHPForm.class.php on line 13943, referer: http://dev.magnusit.com/scriptcase/devel/iface/open_app.php?rand=220ad73c116abafb

So, some stuff about missing some dynamic libraries (I’ll fix), but no syntax errrors indicating a code problem from the generated scriptcase source code.

Why not use Link -> Application for edits instead of Link -> Field, you might ask? Because someone on the scriptcase dev team decided somewhere in the past that I should only be allowed to link grid applications -> grid applications in this view. So I can’t see the Tab or Grid applications when I attempt to do this. Grrrrr!!!

If I switch the Link -> Field properties from “open in same window” to "“open in new window”, I can see the tab application. Something in the linkage got screwed up here.

scriptcase, please fix!

Thanks in advance,

Paul

FYI, I have now forwarded the link for this post along with my Scriptcase Diagnosis page on to bug@scriptcase.net

Paul

I don’t want to play ‘the wise guy’, but I always create a full binary backup of my scriptcase instance before upgrading. You cannot easily revert back changes to a previous version and - like in your case - when things mess up you’re running into a lot of nasty issues.

To recover I would recommend the following: export all your projects AND create a binary backup (just to be able to recover your application settings if necessary) Just xcopy the full netmake directory into temp, on your external hd or whatever.

Then reinstall scriptcase in full. Request a new serial on your account page if you need to. Then activate and restore your projects. That should well fix your issues.

Hope this helps.

@aducom, thank you for the suggestions. I found a simpler solution, though.

Whatever NetMake broke in the “Links -> Links -> New Link” wizard on a grid application can be replicated using a scriptcase macro in onRecord. So I tested it in one grid application and then I applied it across the invoicing module’s grid applications (appaccounting_invoices_list, appaccounting_invoices_items_list, and appaccounting_invoices_payments_items). Here’s an example from my onRecord section:

sc_link(payment_date, appaccounting_invoices_payments_edit, invoice_id=[invoice_id];payment_id={payment_id}, “View/Edit Payment Details”, “_self”);

This seems to resolve the issue for me. I’d believe it to be my bad coding if it weren’t for the fact that it worked fine on Friday evening and then Saturday morning I do updates, am forced to regenerate code to continue, and then BOOM there’s a bug.

Your advice on doing a full backup before doing updates is good advice. Further since this runs in a VMware virtualized environment, I can do a snapshot of the VM prior to upgrading. I was admittedly being lazy on Saturday morning when I just went ahead and did the updates without making a specific backup first. Another option (had I realized the bug was there in time) was that I could have gone to our corporate backup from Friday night and restored it.

It’s hard to tell sometimes what causes certain issues. But I’m glad you resolved it. We are running on vps, so we have to do with a binary backup.

After upgrading delete your scriptcase session data on your browser.