J4 'updated files': changes to overrides after J4 version update? Topic is solved

Be informed that this forum is not an official support forum for Joomla! 4.0. Any issues regarding Joomla! 4.0 must be reported at https://issues.joomla.org/.

Joomla! 4.0 is still in its Alpha stage. This forum should be used for sharing information about Joomla! 4.0.

Moderator: ooffick

Post Reply
GillianBPP
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 133
Joined: Wed Oct 01, 2014 10:25 am

J4 'updated files': changes to overrides after J4 version update?

Post by GillianBPP » Wed Jan 30, 2019 11:52 am

I have a test Joomla 4x site on joomla.com and have also uploaded a site template (that I created a while ago from scratch to work with Bootstrap 4) in order to test it alongside the new Cassiopeia site template.

In Joomla! 4x there is a new feature in template files called 'Updated files' which is in a tab next to the existing Edit, Create Overrides and Template Description tabs (see screenshot below).

I am occasionally uploading nightly builds for Joomla! 4.0.0-Alpha7-dev and after one of them noticed that my own template had an alert that two files had changed. On checking this I find that there are apparently changes to two overrides that I had created: /html/com_content/category/blog_item.php and /html/mod_articles_news/_item.php
updated-files.jpg
I thought that the point of template overrides is that they are not affected by Joomla! updates so my first question was: why does the alert apparently say that my override files have been changed? When I compare the 'new' override with the original override, I can't see any difference.

My second question was: is it in fact the original file that the override is based on that has been changed and not the override itself? I think it is.

Creating a second override has shown that in the case of /html/mod_articles_news/_item.php, that it is the 'get module class suffix' that has been removed from the _item.php, so this:

Code: Select all

<<?php echo $item_heading; ?> class="newsflash-title<?php echo $params->get('moduleclass_sfx'); ?>">
has changed to this:

Code: Select all

<<?php echo $item_heading; ?> class="newsflash-title">
My third, unanswered, question is: if it is the original file has been changed, should there be some something to indicate what has actually changed?

Am I being fussy, or should I take this up with the developers on Joomla! Github?

Thank you.
You do not have the required permissions to view the files attached to this post.

User avatar
AMurray
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4951
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: J4 'updated files': changes to overrides after J4 version update?

Post by AMurray » Sun Feb 03, 2019 12:02 am

If that is a suspected bug you should report it on Githb / issues.joomla.org
Regards,
--------------------------------------------------------------
A Murray
Millennium Falcon - it's the ship that made the Kessel run in less than 12 parsecs! The fastest hunk of junk in the galaxy.

GillianBPP
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 133
Joined: Wed Oct 01, 2014 10:25 am

Re: J4 'updated files': changes to overrides after J4 version update?

Post by GillianBPP » Mon Feb 04, 2019 12:03 pm

After investigation on Joomla Github, the second part of my question is confirmed: in this instance, 'get module class suffix' has been removed and there is a valid reason for it.

I will bring up the first and third questions on the Joomla Github to ask that it is made clearer.

User avatar
erickaps
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 101
Joined: Thu Aug 17, 2006 9:27 am
Location: United Kingdom
Contact:

Re: J4 'updated files': changes to overrides after J4 version update?

Post by erickaps » Wed Feb 13, 2019 6:09 pm

@GillianBPP Did you get answers to your questions, perhaps a link from here to your query on Github?

I've always believed that this system is flawed because important updated code to core layout / template files are not introduced into override files.

E.g. in a VirtueMart template file we have

Code: Select all

$menuItemID = shopFunctionsF::getMenuItemId(JFactory::getLanguage()->getTag());
changing to

Code: Select all

$menuItemID = shopFunctionsF::getMenuItemId(vmLanguage::getLanguage()->getTag());
Surely if the new code is not incorporated into the override file it will cause a problem??

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11342
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: J4 'updated files': changes to overrides after J4 version update?

Post by toivo » Thu Feb 14, 2019 8:32 am

Virtuemart - does it now have a version for Joomla 4? In September Virtuemart was ready for Joomla 3.9, ref. http://virtuemart.net/news/490-virtuema ... the-future
Toivo Talikka, Global Moderator

User avatar
erickaps
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 101
Joined: Thu Aug 17, 2006 9:27 am
Location: United Kingdom
Contact:

Re: J4 'updated files': changes to overrides after J4 version update?

Post by erickaps » Thu Feb 14, 2019 9:04 am

I don't know the status of VirtueMart readiness for Joomla 4. What are you suggesting toivo?

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11342
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: J4 'updated files': changes to overrides after J4 version update?

Post by toivo » Thu Feb 14, 2019 9:43 am

This topic is about template overrides in Joomla 4 and you mentioned Virtuemart.

BTW, override files have always been unaffected by version updates, for reasons that look quite clear, IMHO. It is better to leave refactoring of override code to developers, not to any automated process.
Toivo Talikka, Global Moderator


Post Reply

Return to “Joomla! 4 Related”