None of my Mipages work any more

MiServer is Dyalog's APL-based web development framework

None of my Mipages work any more

Postby Jinny on Mon Dec 16, 2019 1:13 pm

Please could you help as suddenly all of my MiPages have stopped working. I think that the Compose function may be failing to successfully start Callback functions.
Here is the error message and the result for )SI:

*** MiServer Debug ***
DOMAIN ERROR
occurred at: quote[] quote←{0∊⍴⍵:'' ⋄ '⍎"'∊⍨⍬⍴⍵:⍵~'⍎' ⋄ '"',(('"'⎕R'\\\0')⍵),'"'} ⍝ quote unless already quoted or begin


s with ⍎
SI Stack is 15 levels deep

⎕SIGNAL 800 ⍝ to ignore this error and carry on
⎕SIGNAL 801 ⍝ to cut back and debug
)si
· ·
[#.Boot.[MiServer].[Timer].[HtmlEle
Render[220]*
· ·
[#.Boot.[MiServer].[Timer].[HtmlEle
RenderHandlers[11]
· ·
[#.Boot.[MiServer].[Timer].[HtmlEle
Render[5]
· ·
[#.Boot.[MiServer].[Timer].[HtmlEle
RenderCore[7]
· ·
[#.Boot.[MiServer].[Timer].[HtmlEle
Render[3]
· ·
[#.Boot.[MiServer].[Timer].[HtmlEle
RenderCore[7]
· ·
[#.Boot.[MiServer].[Timer].[HtmlEle
Render[3]
· ·
[#.Boot.[MiServer].[Timer]] #.HtmlP
RenderBody[7]
· ·
[#.Boot.[MiServer].[Timer]] #.MiPag
Render[13]
· ·
[#.Boot.[MiServer].[Timer]] #.MiPag
Wrap[2]
· ·
[#.Boot.[MiServer].[Timer]] #.Pages
Wrap[34]
· ·
[#.Boot.[MiServer]] #.MiServer.
HandleMSP[174]
· ·
[#.Boot.[MiServer]] #.MiServer.
HandleRequest[41]
· · #.MiServer.RunServer[41]
· &2
· [#.[LIB]] #.Conga.LIB.Wait[8]
· [#.Boot.[MiServer]] #.MiServer.
RunServer[19]
&1[/color]

This is the response when I load the MiServer workspace. The lack of ability to rebuild the user command cache is NOT new and has been the case for ages while the MiPages have worked okay:
Dyalog APL/W Version 17.0.34605
Serial No : 504467
Unicode Edition
Non-commercial Licence
Mon Dec 16 13:05:11 2019
C:\MiServer.com\miserver.dws saved Sun Dec 15 09:50:27 2019

* Unable to rebuild user command cache: the path of C:\Users\jinny.mcdonald\Documents\Dyalog APL 17.0 Unicode Files\UserCo
mmand20.cache does not exist
MiServer stopped.
MiServer for "c:\HH" started on http://192.168.0.8:8080
Running in Debug mode (configured by setting <Production> in /Config/Server.xml)

Many thanks, Jinny
Jinny
 
Posts: 29
Joined: Sun Jul 01, 2018 10:15 am

Re: None of my Mipages work any more

Postby Adam|Dyalog on Wed Dec 18, 2019 3:42 pm

Hi Jinny,

From the error log you posted, we can't really tell exactly what's going on, but can you tell us if you changed anything right before it all broke? Also, it would be useful to know which exact version (Git commit or release tag) you are using.

Upon inspection, we found some potentially problematic handling of jQuery based widgets, which we've just fixed. Try updating your MiServer to the very latest commit, and check if that solves your problem.

If you're OK with zipping up your site and sending to us, we can take a closer look at your problem too.
User avatar
Adam|Dyalog
 
Posts: 81
Joined: Thu Jun 25, 2015 1:13 pm

Re: None of my Mipages work any more

Postby Jinny on Wed Dec 18, 2019 10:10 pm

Hi Adam,

Many thanks for picking up this problem. I'm not aware of having changed anything prior to the mipages ceasing to function.
I'm using V3.1, i'm not sure how to establish the Git commit or release tag.


I'm afraid that I'm a total ignoramus who just happens to write APL. Does 'updating MiServer' to the very latest commit mean going to this git hub page: 'https://github.com/Dyalog/MiServer' and clicking on the 'clone or download' button?

I'll have a go at zipping the site. Does this mean just the miserver.com directory?

Thanks again, Jinny
Jinny
 
Posts: 29
Joined: Sun Jul 01, 2018 10:15 am

Re: None of my Mipages work any more

Postby Adam|Dyalog on Fri Dec 20, 2019 9:22 am

The [Clone or download] button on https://github.com/Dyalog/MiServer is indeed the right place to get the latest commit. However, if you downloaded like that before, it can be hard to know which commit you've got. The current commit is always displayed right below that button. As of writing, it is 89f4511. You may be able to tell your approximate commit by the date of the MiServer files, e.g. miserver.dws which APL will display when you load the workspace.

What we need you to zip is the folder that contains the files that define your site. They probably have the .mipage extension. You can email to support@dyalog.com
User avatar
Adam|Dyalog
 
Posts: 81
Joined: Thu Jun 25, 2015 1:13 pm

Re: None of my Mipages work any more

Postby Jinny on Mon Dec 23, 2019 7:58 am

Thanks Adam.
I'm sending you the zip file with fingers tightly crossed.
I downloaded the MiServer workspace but I've not got that to work at all.
My original MiServer workspace continues to execute 'Compose' but not pick up any callback functions any more.

Hope you have a lovely Christmas, Jinny
Jinny
 
Posts: 29
Joined: Sun Jul 01, 2018 10:15 am

Re: None of my Mipages work any more

Postby Jinny on Mon Dec 30, 2019 7:51 am

Just to add that I get exactly the same error whether I use my original c:\MiServer.com/miserver.dws or my freshly downloaded C:\MiServer-master\miserver.dws
Jinny
 
Posts: 29
Joined: Sun Jul 01, 2018 10:15 am

Re: None of my Mipages work any more

Postby Jinny on Mon Dec 30, 2019 8:04 am

I've also discovered something that might be helpful. One of my pages (hhlostfile) is still able to run its callbackfunction. It is also the only one of my pages that uses a 'handler'. However, none of the other pages run any more.
Jinny
 
Posts: 29
Joined: Sun Jul 01, 2018 10:15 am

Re: None of my Mipages work any more

Postby Adam|Dyalog on Mon Dec 30, 2019 3:15 pm

Hi Jinny,

Brian and I found a couple of issues preventing your site from working. Of course, this might not be all, but try these steps and let us know how it goes:

The main issue is that your pages use the MiPageTemplateHH1 template, but it isn't found. It should be in hh/Code/Templates/MiPageTemplateHH1.dyalog so we tried adding a skeleton file:
      :Class MiPageTemplateHH1 : MiPage
:EndClass

This made it possible to render your index.mipage:
Image
However, you probably have some things you want included in the template.

We also noticed that you untie all files in index.mipage:
      ⎕funtie ⎕fnums

This is probably not a good idea, as any user loading the page will cause all open files to be closed, even those that MiServer uses internally, e.g. to keep track of user sessions. We imagine that you intended for the following code to give you the tie number:
      :Field Public Shared FNUM

… but you probably found that it wasn't working as you expected. This is because fields must be declared in the class itself, outside of any functions. We recommend doing so at the very top of the class script so these important names are easy to spot for a human reader.

Please let us know if this helps.
User avatar
Adam|Dyalog
 
Posts: 81
Joined: Thu Jun 25, 2015 1:13 pm

Re: None of my Mipages work any more

Postby Jinny on Tue Dec 31, 2019 7:57 am

Hi Adam,

I don't know how I managed to delete that template but returning it seems to have done the trick. HUGE thanks to you and Brian.

I'm also very grateful for the additional advice about file untying and the placement of public field statements. That explains a great deal and one was one of the items on my 'problem list' - I couldn't understand why I was getting 'value error' on the first iteration of a page but that reloading it corrected it!

Can't thank you enough - hope you have a fabulous 2020!
Jinny
Last edited by Jinny on Tue Dec 31, 2019 8:16 am, edited 1 time in total.
Jinny
 
Posts: 29
Joined: Sun Jul 01, 2018 10:15 am


Return to MiServer

Who is online

Users browsing this forum: No registered users and 1 guest