J4 Issue ? ?
avatar astridx
astridx
22 Jun 2018

I'm making my first attempts to turn a j3 component into a j4 component.

Steps to reproduce the issue

For this I installed my component and made basically the steps Allon explained in this video: https://www.youtube.com/watch?v=jUc5sMqb22E

In addition I had a look at the 4.0-dev weblinks branch: https://github.com/joomla-extensions/weblinks/tree/4.0-dev/src/administrator/components/com_weblinks

After that I had for the backend J3 template-files in the folder administrator/component/com_mycom/views/VIEWNAME/tmpl and J4 template-files in the folder administrator/component/com_mycom/tmpl/VIEWNAME This works well for me so far.

After that I made the same for the frontend.

Actual result

In the frontend I noticed that in the template manager two overrides are displayed.

templates customise atum test administration

Once the files are listed in the J3 template directory (component/com_mycom/views/VIEWNAME/tmpl ) and then the files in the J4 template directory (/component/com_mycom/tmpl/VIEWNAME).

Expected result

Actually, I thought that only the files in the directory /component/com_mycom/tmpl/VIEWNAMEare offered as override in J4.

System information (as much as possible)

Current 4.0-dev Branch on Ubuntu 18.04

Additional question

The question I have is whether it is allowed to create tmpl-files in the directory /tmpl/VIEWNAME and at the same time in the (J3-directory) views/VIEWNAME/tmpl.

This works in the backend for me. But maybe I miss a problem.

avatar astridx astridx - open - 22 Jun 2018
avatar joomla-cms-bot joomla-cms-bot - change - 22 Jun 2018
Labels Added: ? ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 22 Jun 2018
avatar joomla-cms-bot joomla-cms-bot - labeled - 22 Jun 2018
avatar astridx astridx - change - 22 Jun 2018
The description was changed
avatar astridx astridx - edited - 22 Jun 2018
avatar astridx astridx - change - 22 Jun 2018
The description was changed
avatar astridx astridx - edited - 22 Jun 2018
avatar astridx astridx - change - 22 Jun 2018
The description was changed
avatar astridx astridx - edited - 22 Jun 2018
avatar astridx astridx - change - 22 Jun 2018
The description was changed
avatar astridx astridx - edited - 22 Jun 2018
avatar astridx astridx - change - 22 Jun 2018
The description was changed
avatar astridx astridx - edited - 22 Jun 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Jun 2018
Category Code style
avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Jun 2018
Status New Discussion
avatar astridx astridx - change - 22 Jun 2018
The description was changed
avatar astridx astridx - edited - 22 Jun 2018
avatar brianteeman brianteeman - change - 22 Jun 2018
Labels Added: J4 Issue
avatar brianteeman brianteeman - labeled - 22 Jun 2018
avatar laoneo
laoneo - comment - 26 Jun 2018

This is a bug. Actually there is no cleanup made after upgrade and then are both folders in the system.

avatar astridx
astridx - comment - 28 Jun 2018

@laoneo
What do you mean with cleanup? Where should this be done?

avatar astridx
astridx - comment - 28 Jun 2018

@laoneo
I think I found what you mean. Do you mean this method:

public function deleteUnexistingFiles()

In this method all Joomla! core views-folders are deleted.
In Joomla 4, third party extensions may not contain a folder views with templates anymore, too?

avatar wilsonge wilsonge - change - 19 Aug 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-08-19 15:58:51
Closed_By wilsonge
avatar wilsonge wilsonge - close - 19 Aug 2018
avatar wilsonge
wilsonge - comment - 19 Aug 2018

You can do one or the other. You shouldn't have both. The 3.x locations will continue to be supported as long as you want to support J3.x. When you choose to upgrade to the J4 way of doing things with namespaces you'll totally remove the views folder

Add a Comment

Login with GitHub to post a comment