Open dragan1700 opened 4 years ago
@ryancramerdesign - even though this issue seems to be due to it trying to render the template, rather than the field, I wonder if this issue is also at least a bit related to https://github.com/processwire/processwire-issues/issues/511
It would be great if you could also test that again while you are looking into this one because so many of us are using Tracy's Console panel for code testing and this is the one area where there seems to be problems.
FYI - this (https://github.com/adrianbj/TracyDebugger/blob/7d1209394d34c00991296159187754a0b6bd9ce5/includes/CodeProcessor.php#L120-L153) is where the Console Panel instantiates a new template file and renders it.
Short description of the issue
The call to $child->render('offer_matrix'); is not resulting in rendering of a field, but rather a page - it's looking for "offer_matrix" in site/templates/, instead of "offer_matrix.php" in site/templates/fields/. This works as expected in a regular PW template, but it doesn't when run inside Tracy Debugger console (and perhaps also when PW is bootstrapped - but I did not test that at this point).
inside offer-index-dev.php, the relevant place where the error is triggered:
Expected behavior
I would expect that PW renders the field templates like it does when run from inside a "normal" PW template. Especially in the case where I use the absolute path, incl. file-suffix.
Actual behavior
Exception: Invalid output file location or specified file does not exist. on line: 518 in /home/mydomain/www/dev.mysite/wire/modules/PageRender.module
The call to $child->render('offer_matrix'); is not resulting in rendering of a field, but rather a page - it's looking for "offer_matrix" in site/templates/, instead of "offer_matrix.php" in site/templates/fields/.
Steps to reproduce the issue
Setup/Environment