Some guidance needed

Hi guys,

I ran into an issue that my rendered page (from the Mollie plugin) only has a simple <form></form> section but not the fully generated html. It works by itself: I can make payments but this is clearly not how it should look :innocent:

I did check the formatting/syntax with haml --check and that seems fine. Any tips? Pointers? I am still discovering how the rails/haml things work so I clearly broke something somewhere but the differences that I can see don’t trigger any light bulb at this stage.

Feel free to message me directly.

Hi, I’d need a bit more context on your question: what exact HTML to do you see, and what do you expect? Also note that plugins often use deface to modify existing templates (but if it’s an engine route, it doesn’t come into play).

Hi Willem,

I am reworking the Mollie plugin as the API has changed. Somehow I broke the existing page. So I get a <form></form> content in the browser instead of a (much larger) <html></html> content including CSS. So it is a bare page, which works, which is the good part. As I am still getting trying to find my feet on how things are tied together, and how the Rails/Haml magic works, I obviously miss something but can’t seem to find what :grin:
I didn’t change the structure of the plugin that much. Only the way the API is accessed and I moved the calculation of the fee to the controller instead of having it in the view as for now only fixed fee payments are supported. But even if I leave the (now unused) javascript, it still doesn’t generate properly. So I must overlook something which happens in the controller which uses new variables and caching to minimize expensive and essentially redundant calls to Mollie.

Are there ways to debug this properly, for instance? The logging seems to suggest the rendering was executed but that doesn’t help much. Other tips on how to approach this to find the issue? The only thing I didn’t do, yet, is revert everything and add my changes 1-by-1 to see where it breaks. But I am curious whether there are more logical ways to triage the problem of the state as is.

It is solved, btw.
Apparently adding a initialize to the class breaks the generation of the page.
I wasn’t aware that this pure Ruby thing would confuse Rails. Albeit adding a super call solves it. And in the end I didn’t need it after all :grin: