Output var_dump() before DOCTYPE html tag

Here are the steps to reproduce the issue:

  1. Put the following code inside “rowRendered” server event in “models/Trademarks.php” file: var_dump(Route());
  2. Login using username/password: admin/master to the generated demo web application in your localhost,
  3. Click on “trademarks” menu item on the sidebar, you will see the output of var_dump code is located inside the “trademarks” List page,
  4. Click on “Edit” option from one of the records in that List page, then you will see in the Edit page, the output of var_dump is located before the DOCTYPE html tag if you view the page source of browser. Shouldn’t it inside the Edit page as well as the List page above?
  5. The same issue also happened for the Add, View, Search (advanced search) pages.

v2021 uses MVC, in a List page, there are more than one records, row rendering is done inside the view. For other pages, there is only one record, row rendering is done inside the class (not view). If you echo in Row_Rendered, you actually output before the view and hence the result.

arbei wrote:

row rendering is done inside the class (not view)

It should be rendered inside the view, too (even it is only one record), as well as the List page.