J4-rc5: getView() compatibility

21 views
Skip to first unread message

MonkeyT

unread,
Aug 1, 2021, 11:02:27 PM8/1/21
to Joomla! General Development
I have an existing J3.2+ custom component which uses a Joomla View to construct content for a few dynamic emails.  It calls the View using the controller's getView() method, loads data into variables of the View object and gets the customized content using the View class's loadTemplate method.

As I've tried to update the component to J4, I've discovered that the custom Controller (which extends BaseController) seems to use the LegacyFactory class to create the View, which fails because my J4 class is both in the wrong folder and is named HtmlView instead of view.html.php .

I've worked around this by. manually loading the MVCFactory class and using its CreateView() method instead.

Is there any reason the BaseController-based classes in J4-rc5 are using LegacyFactory instead of MVCFactory?

and, is the standard BaseController's getView() method misbehaving for anyone else?
Reply all
Reply to author
Forward
0 new messages