CDD generating 503 service Unavailable error

madpad

Member
I have List1 where a calc field calculates how many weeks pregnant a woman is based on form inputs. I have another List2 that has multiple fields (id, Week, Description, etc) relating to each week of pregnancy. List2_id = List2_Week.

In List1, I am using a CDD element to get the description from List2 based on the week calculated.

Everytime I open the form, it is generating a 503 service unavailable error. Any feedback would be much appreciated.
 
Can you point us at the page. There's probably not much I can tell from the front end, but I'll take a look.

Does the 503 come back instantly, or after a lengthy delay?

-- hugh
 
OK, I'm not entirely sure why it's giving the 503 or the "unable to service your request due to maintenance downtime or capacity problems". I tested here, and having a CDD watching a calc element works. But it's definitely the "watching a calc" which is the problem on your site - if I change "weeks_pregnant" to be a simple field, it works.

However ... even if it did work with your calc, there's other problems. You have lots of calcs which use other calcs in their code, as placeholders. You really can't do that in Fabrik, as there's no guarrantee as to what order the calc will be executed. So if calc1 relies on calc2, but calc1 runs before calc2 ... the result will be wrong.

Also ... calcs only update the database when you save the form. So in your case, you create and save the form, all the calcs run (and for the sake of argument, lets say by chance they all execute in the right order to your trimester, weeks_pregnant, days_pregnant etc values are correct), and the data is saved, and the "weeks_pregnant" is (say) 5.

Now wait a week and load the list. As you have "calc on save only" set to No, your calcs will be re-calculated on the fly as the list renders, and the values will appear in the rendered list correct, weeks 6. BUT ... in the database itself, the weeks_pregnant will still be 5, because you haven't edited/saved the form. Which is going to mess up the CDD, which on page load is working from the value in the table, not the re-calculated value that gets rendered.

So ... you kind of need to re-think the way this form works.

-- hugh
 
Thanks for the insights, Hugh. Reality is the form/list does have multiple calc elements that eventually will feed into a report. Will figure out an alternative to this technique.
Thanks again for reviewing this.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top