? ? Pending

User tests: Successful: Unsuccessful:

avatar Anu1601CS
Anu1601CS
26 Aug 2018

With the Google Summer of Code 2018 project Improve override management, we improved the template manager in Joomla! 4. We added a diff view in the override editor. We want to make it possible for every backend user who is allowed to use template manager to see if a template override file is changed during an update. So users can see possible changes in a diff view and decide, if they want to use this changes in there own override file, too.

This is especially important when the changes are security-related.

Features

  1. Diff View
  2. Override - Quick Icon Notification Plugin
  3. Installer - Override Plugin
  4. Updated - Overrides history list.

Summary of Changes

Most of the changes done in com_templates component, added two new plugins first to check updated files after the update and for the quick icon notification.
Added diff view of the core and override file so you can see the changes or difference between both the files.
Added new tab to show updated override file list and you can see which files got an update and then you can change your override according to new changes in core.

What type of problem is going to solve ?
like if I created the override of any extension then our frontend always use override file instead of the core, and then after few days some important bug is fixed or some new changes in functions in an update
of that extension then it's not good for the user because now this application creates an issue.

So, using this user can check new updated file changes and feel good :)

Testing Instructions

Video: https://www.youtube.com/watch?v=l0_jFjswObI
For this, you need an extension which has an update with new changes in extension files.
So,

You can use these components
com_helloworld.0.0.1 https://www.dropbox.com/s/106cgn1lclp9dxm/com_helloworld.0.0.1.zip?dl=0
com_helloworld.0.0.2 https://www.dropbox.com/s/xhl8p0nz3wdvapj/com_helloworld.0.0.2.zip?dl=0

  1. Download this branch/PR then install fresh Joomla using this branch/PR.
  2. Go to the template manager.
  3. Create an override of that extension before the update.
  4. See the diff view of that file by using a toggle button in the top right corner. ** Expected:** No difference.
  5. Now update your extension. ** Expected:** If your created override file got any update in core you can see notification message number of files updated.
  6. Go to template manager check new tab you can see which files are updated.
  7. Click on the name of the file you will get redirect to edit view of that file.
  8. Now you can see the changes in diff view.
  9. Adjust your override file if you want and then you can delete that file list history or mark as checked.

Documentation Changes Required

Repo https://github.com/joomla-projects/gsoc18_override_management/
Documentation https://docs.joomla.org/J4.x:Improved_Override_Management

Mentors: @astridx @laoneo

avatar Anu1601CS Anu1601CS - open - 26 Aug 2018
avatar Anu1601CS Anu1601CS - change - 26 Aug 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Aug 2018
Category Administration com_admin SQL Postgresql com_installer com_joomlaupdate com_templates Language & Strings Repository JavaScript Installation Libraries
avatar Anu1601CS Anu1601CS - change - 26 Aug 2018
Labels Added: ? ?
avatar Anu1601CS Anu1601CS - change - 26 Aug 2018
The description was changed
avatar Anu1601CS Anu1601CS - edited - 26 Aug 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 Aug 2018

I have tested this item ? unsuccessfully on b93b118

After PR applied got at /index.php?option=com_templates&view=templates&client_id=0

screen shot 2018-08-26 at 11 57 21


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21851.
avatar franz-wohlkoenig franz-wohlkoenig - test_item - 26 Aug 2018 - Tested unsuccessfully
avatar Anu1601CS
Anu1601CS - comment - 26 Aug 2018

@franz-wohlkoenig

I have tested this item red_circle unsuccessfully on b93b118
After PR applied got at /index.php?option=com_templates&view=templates&client_id=0

Yes, this an expected behavior if you use PR tester for this because it contains SQL and javascript changes.

You, need to download this branch and make a fresh install of it then it should work fine.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 Aug 2018

You, need to download this branch and make a fresh install of it then it should work fine.

Thanks for Info. Can you please update Test Instructions so Vlunteers know it in your first Comment?

avatar Anu1601CS
Anu1601CS - comment - 26 Aug 2018

you please update Test Instructions so Volunteers know it in your first Comment?

Sure

avatar Anu1601CS Anu1601CS - change - 26 Aug 2018
The description was changed
avatar Anu1601CS Anu1601CS - edited - 26 Aug 2018
avatar Anu1601CS
Anu1601CS - comment - 26 Aug 2018

Please look at the other examples in the core for how to do grid.checkall

@brianteeman Now fine?

avatar brianteeman
brianteeman - comment - 26 Aug 2018

yes that part is

avatar brianteeman
brianteeman - comment - 27 Aug 2018

Is there a reason that the diff view doesnt show line numbers?

image

avatar brianteeman
brianteeman - comment - 27 Aug 2018

See image below for suggested language string change
AND change from p class=lead to h2

image

avatar astridx
astridx - comment - 27 Aug 2018

@richard67 Thank you for your comment.
I think we need this file.
We thought about this question in our poject. You can see our issue here: joomla-projects/gsoc18_override_management#41

This file is not only for updating old entries, but also for checking if there is support in the database - In the task repair database.
https://github.com/joomla-projects/gsoc18_override_management/blob/01b7b917b851c25c271b56e19c6e79735c7e08b7/administrator/components/com_admin/script.php#L4094

avatar richard67
richard67 - comment - 27 Aug 2018

@astridx I know what this file is good for because I am the one who invented it ;-)

avatar brianteeman
brianteeman - comment - 27 Aug 2018

Yes it was my mistake - it should indeed be overridden

avatar richard67
richard67 - comment - 27 Aug 2018

Beside this I must say that in opposite to other PRs which have added new features to 4.0, this PR here looks very well done to me. The utf8mb4 conversion is correct, and the sql schema update scripts look ok to me, too.
As soon as all reviews have finished and changes have been implemented, let me know when it is ready for test. I have a holiday this week and so have time for testing.

avatar richard67
richard67 - comment - 27 Aug 2018

@Anu1601CS please fix code style errors reported by Drone:
FILE: .../github.com/joomla/joomla-cms/components/com_tags/View/Tag/HtmlView.php
FOUND 2 ERROR(S) AFFECTING 2 LINE(S)
364 | ERROR | There must be exactly one blank line between descriptions in function comment
365 | ERROR | There must be exactly one blank line before the tags in function comment

avatar Anu1601CS
Anu1601CS - comment - 27 Aug 2018

@Anu1601CS please fix code style errors reported by Drone:
FILE: .../github.com/joomla/joomla-cms/components/com_tags/View/Tag/HtmlView.php
FOUND 2 ERROR(S) AFFECTING 2 LINE(S)
364 | ERROR | There must be exactly one blank line between descriptions in function comment
365 | ERROR | There must be exactly one blank line before the tags in function comment

@richard67 Thanks for the review but. This file is not a part of my PR so better to fix this in separate PR
@zero-24 can help here drone?

avatar richard67
richard67 - comment - 27 Aug 2018

@Anu1601CS Ah, sorry, I did not notice that the file with the code style errors does not come from your PR.
Regarding the language changes I requested, it looks ok now.

avatar Anu1601CS
Anu1601CS - comment - 27 Aug 2018

Is there a reason that the diff view doesnt show line numbers?

@brianteeman Not big reason because jsdiff library does not support this feature. And, how it was going to help us. Like an editor number line of code change on the size of the browser which is also not stable. Like git

avatar zero-24
zero-24 - comment - 27 Aug 2018

@zero-24 can help here drone?

Drone seams to be happy now :)

avatar Anu1601CS
Anu1601CS - comment - 27 Aug 2018

Thanks @zero-24

avatar Anu1601CS Anu1601CS - change - 27 Aug 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-08-27 13:19:06
Closed_By Anu1601CS
avatar Anu1601CS Anu1601CS - close - 27 Aug 2018
avatar Anu1601CS Anu1601CS - change - 27 Aug 2018
Status Closed New
Closed_Date 2018-08-27 13:19:06
Closed_By Anu1601CS
avatar Anu1601CS Anu1601CS - change - 27 Aug 2018
Status New Pending
avatar Anu1601CS Anu1601CS - reopen - 27 Aug 2018
avatar Anu1601CS
Anu1601CS - comment - 27 Aug 2018

Oops sorry

avatar richard67
richard67 - comment - 27 Aug 2018

@Anu1601CS Could you provide in the testing instructions download links to the 2 versions of the hello world component which you have used in the video? It would be helpful for testers.

avatar richard67
richard67 - comment - 27 Aug 2018

Drone failure seems not to be related to this PR but to system test for libraries/vendor/joomla/test-system/src/acceptance/administrator/components/com_media/MediaListCest.php:createFolderUsingToolbarButton.

@zero-24 Maybe you can help again?

avatar Anu1601CS Anu1601CS - change - 27 Aug 2018
The description was changed
avatar Anu1601CS Anu1601CS - edited - 27 Aug 2018
avatar Anu1601CS
Anu1601CS - comment - 27 Aug 2018

@Anu1601CS Could you provide in the testing instructions download links to the 2 versions of the hello world component which you have used in the video? It would be helpful for testers.

@richard67 I just updated description section > Testing

avatar richard67
richard67 - comment - 27 Aug 2018

@franz-wohlkoenig It seems your test result is hanging somehow. Even after new commits have been made, the issue tracker still shows your unsuccessful test. Any idea what could be wrong with the issue tracker, or who could help? Or maybe you just set your test result to "not tested" in the issue tracker?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21851.

avatar richard67 richard67 - test_item - 27 Aug 2018 - Tested successfully
avatar richard67
richard67 - comment - 27 Aug 2018

I have tested this item successfully on b93b118

Works as shown in the video.
Tested with MySQL DB.
Could not test with PostgreSQL DB because 4.0 install does not work on PostgreSQL DB for reasons not related to this PR.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21851.

avatar richard67
richard67 - comment - 27 Aug 2018

I have tested this item successfully on b93b118

Works as shown in the video.
Tested with MySQL DB.
Could not test with PostgreSQL DB because 4.0 install does not work on PostgreSQL DB for reasons not related to this PR.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21851.

avatar richard67
richard67 - comment - 27 Aug 2018

And no idea why my test result is shown twice in the issue tracker.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21851.

avatar richard67
richard67 - comment - 27 Aug 2018

And no idea why my test result is shown twice in the issue tracker.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21851.

avatar Anu1601CS
Anu1601CS - comment - 27 Aug 2018

And no idea why my test result is shown twice in the issue tracker.

@richard67 Sometimes it happens. Thanks for testing

avatar zero-24 zero-24 - alter_testresult - 27 Aug 2018 - franz-wohlkoenig: Not tested
avatar zero-24
zero-24 - comment - 27 Aug 2018

It seems your test result is hanging somehow. Even after new commits have been made, the issue tracker still shows your unsuccessful test.

Just fixed that.

Drone failure seems not to be related to this PR but to system test for libraries/vendor/joomla/test-system/src/acceptance/administrator/components/com_media/MediaListCest.php:createFolderUsingToolbarButton.

Yes does not seam to be related to this PR i have just rebooted the drone tests: http://ci.joomla.org/joomla/joomla-cms/9421/16 Lets see how far this goes than.

avatar brianteeman
brianteeman - comment - 27 Aug 2018

I will try to find time to review the strings tomorrow but from your video I can see some issues

In this case I think you mean "original" not "core"
image

Here the message is wrong - no overrides have been updated. Not sure yet what it should be but what you are saying is x files that you have overridden have changed and you may need to update the override. The current message doesnt convey that meaning
image

Here the message is wrong again. No "conflicts" have been found. What you are saying is that x files that you have overridden have changed and you may need to update the override. The current message doesnt convey that meaning

image

Finally (for now) your use of the published/unpublished icons in a column marked status to indicate successful is very confusing.

image

avatar richard67
richard67 - comment - 27 Aug 2018

@zero-24 It seems that the issue tracker is hanging for this PR. My last test result has shown am old commit number (same as for franz several commits before), and now after the last commit my valid test result from befor that last commit is still shown. Maybe this PR just has too many commits so the issue tracker can't follow it anymore?
Anyway, my last test result is still valid because commit after that was just a doc block change.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21851.

avatar richard67
richard67 - comment - 27 Aug 2018

@zero-24 It seems that the issue tracker is hanging for this PR. My last test result has shown am old commit number (same as for franz several commits before), and now after the last commit my valid test result from befor that last commit is still shown. Maybe this PR just has too many commits so the issue tracker can't follow it anymore?
Anyway, my last test result is still valid because commit after that was just a doc block change.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21851.

avatar Anu1601CS
Anu1601CS - comment - 27 Aug 2018

@astridx @laoneo Need some opinion. I also think its a little bit confusing.

We have to notify that the core file of override is updated. The user can mark this override history checked or unchecked. And notification in control panel should show number of override core files updated.
@brianteeman Can you please suggest your language strings to clearly express these things ?

avatar brianteeman
brianteeman - comment - 27 Aug 2018

@Anu1601CS

I will try to find time to review the strings tomorrow

avatar Anu1601CS
Anu1601CS - comment - 27 Aug 2018

Thanks @brianteeman :)

avatar laoneo
laoneo - comment - 28 Aug 2018

It is always good when people do review with fresh eyes as you and we mentors are always to deep in the mud already. The points from @brianteeman are valid and I would implement them.

avatar brianteeman
brianteeman - comment - 28 Aug 2018

Updated the list of core extensions joomla-projects/gsoc18_override_management#71

avatar brianteeman
brianteeman - comment - 28 Aug 2018
avatar brianteeman
brianteeman - comment - 28 Aug 2018
avatar richard67
richard67 - comment - 28 Aug 2018

@brianteeman The 2 codestyle issues (ordering of use statements) have already been fixed here in this PR. Will there not be merge conflicts if it is also fixed in the project repository and then someone wants to merge back changes from there into here?

avatar brianteeman
brianteeman - comment - 28 Aug 2018

Change icon for consistency joomla-projects/gsoc18_override_management#74

avatar brianteeman
brianteeman - comment - 28 Aug 2018

image
it is not the override that has been updated

avatar richard67
richard67 - comment - 28 Aug 2018

Maybe "Overridden file(s) updated?"

avatar brianteeman
brianteeman - comment - 28 Aug 2018

No - that still says that its the override that has been updated not the original file that you have created an update for

avatar brianteeman
brianteeman - comment - 28 Aug 2018

image

Note the \ after html when it should obviously be /

avatar astridx
astridx - comment - 28 Aug 2018

Or maybe "Original(s) of Override(s) updated"

avatar richard67
richard67 - comment - 28 Aug 2018

Yes, but then with lowercase in the middle of the sentence, i.e. "Original(s) of override(s) updated"

avatar richard67
richard67 - comment - 28 Aug 2018

But that could be too long for the button.

avatar brianteeman
brianteeman - comment - 28 Aug 2018

@Anu1601CS Some language changes as promised joomla-projects/gsoc18_override_management#76

avatar brianteeman
brianteeman - comment - 28 Aug 2018

link.setAttribute('href', 'index.php?option=com_plugins&task=plugin.edit&extension_id=491');

Really not a fan of hard coding the extension_id here. Can't we use a helper like we do elsewhere to get the id

avatar richard67
richard67 - comment - 28 Aug 2018

I have not tested this item.

Resetting my test result as long as review is ongoing and changes are expected.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21851.

avatar richard67 richard67 - test_item - 28 Aug 2018 - Not tested
avatar Anu1601CS
Anu1601CS - comment - 28 Aug 2018

@Anu1601CS Some language changes as promised joomla-projects/gsoc18_override_management#76

@brianteeman Thank you very much :)

avatar brianteeman
brianteeman - comment - 28 Aug 2018

For the quick icon text I think that this will work
"X overrides to check"

avatar Anu1601CS
Anu1601CS - comment - 28 Aug 2018

For the quick icon text I think that this will work
"X overrides to check"

Yes this is also good.

avatar brianteeman
brianteeman - comment - 28 Aug 2018

@Anu1601CS I think it is the clearest and least ambiguous we can come up with for now. I will leave it to you to make the update

avatar brianteeman
brianteeman - comment - 28 Aug 2018
avatar Anu1601CS
Anu1601CS - comment - 28 Aug 2018

X overrides to check joomla-projects/gsoc18_override_management#77

Thanks but already done here.

avatar brianteeman
brianteeman - comment - 28 Aug 2018

please try and keep your branch and this pr in sync. makes it hard to help otherwise

avatar Anu1601CS
Anu1601CS - comment - 28 Aug 2018

please try and keep your branch and this pr in sync. makes it hard to help otherwise

Ok

avatar Anu1601CS
Anu1601CS - comment - 28 Aug 2018

please try and keep your branch and this pr in sync. makes it hard to help otherwise

@brianteeman Now Done! :)

avatar brianteeman
brianteeman - comment - 29 Aug 2018

Please test installing a language pack eg French

0 Call to undefined method Joomla\Component\Templates\Administrator\Model\TemplateModel::getCoreList()

The problem is in this function


	public function getOverrideCoreList()
	{
		// Get template model
		$templateModel = $this->getModel();
		$result = $templateModel->getCoreList();

		return $result;
	}

avatar Anu1601CS
Anu1601CS - comment - 29 Aug 2018

Please test installing a language pack eg French

0 Call to undefined method Joomla\Component\Templates\Administrator\Model\TemplateModel::getCoreList()

The problem is in this function

public function getOverrideCoreList()
{
	// Get template model
	$templateModel = $this->getModel();
	$result = $templateModel->getCoreList();

	return $result;
}

@brianteeman I am not able to reproduce issue.

I tested in this manner.

  1. System -> install languages

screenshot from 2018-08-29 20-43-32

avatar brianteeman
brianteeman - comment - 29 Aug 2018

Sorry something was missing from my instructions as I tried to simplify it.

I was able to create the problem when updating a language and when installing a language using the install from url. I can now replicate it all the time.

Tomorrow I will try again with a clean install - I am speaking at a user group tonight

avatar Anu1601CS
Anu1601CS - comment - 31 Aug 2018

@brianteeman Any update ?

avatar astridx
astridx - comment - 1 Sep 2018

I tested this PR successful.

  1. I changed to this branch and made a new installation.
  • git fetch joomla pull/21851/head:gsoc
  • git checkout gsoc
  • composer install
  • npm install
  • rm configuration.php
  • open a browser and start installation
  1. After installation I see

control panel test administration
plugins test administration
templates customise cassiopeia test administration

  1. I installed a template, a module and a component. (This extensions are only for testing this PR.)
    com_agosms-1.0.27.zip
    mod_agosm-1.0.27.zip
    tpl_agfirework_20180624_1525.zip

  2. I created an override (and edit this override) of the view agosm in the component for one template (cassiopaia) and an override of the module view in the other template (agfirework).


NOTE:
Sometimes the tabs in template manager are not displayed correctly. You see the content of all tabs on one page. This is not an issue of this pr. If I click on every tab the display is correct again.
errorinview


  1. I see the changes in the "diff view". I see nothing in the "updated files" view, because here the files are only added via update after on one original is updated.
    templates customise agfirework test administration

  2. I made an update of the module via Joomla! Updater and a new install of v.28 of the component with this file:
    com_agosms-1.0.28.zip
    extensions install test administration
    extensions update test administration
    extensions update test administration 1

  3. I checked in template manager the new view updated files (/administrator/index.php?option=com_templates&view=template). Everything is fine. The file that is overridden in template cassiopeia is shown only in this template and the file that is overridden in template agfirework is shown in the view of this template.
    templates customise agfirework test administration 1
    templates customise cassiopeia test administration 2

  4. In control panel I see a red quickicon. If I deactivate the Installer - Override plugin I see a message in the quickicon and if I deactivate the Quick Icon - Joomla! Overrides Update Notification plugin I see no quickion. That is all fine.
    control panel test administration 1
    control panel test administration 2

  5. I am able to check and unckeck an entry in the view updated list. After an action I am redirected to the fist tab. But this is also not an issue of this pr. I think it is a problem of the backend template.
    templates customise agfirework test administration 2

  6. If I check all entries in the view updated list in all templates the quickicon is green again.

  7. I am able to delete a file in the view updated list via toolbar button "delete".
    templates customise agfirework test administration 3
    templates customise agfirework test administration 4

avatar brianteeman
brianteeman - comment - 1 Sep 2018

Awesome detailed report - thanks - I will repeat the tests myself tomorrow

The tab issues are indeed unrelated

avatar Anu1601CS
Anu1601CS - comment - 1 Sep 2018

The tab issues are indeed unrelated

Yes, should i do PR for tab issue @brianteeman

avatar brianteeman
brianteeman - comment - 1 Sep 2018

The tab issue has an open tracker item for it #21855

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 2 Sep 2018

@astridx please mark your Test as successfully:

  • open Issue Tracker
  • Login with your github-Account
  • Click on blue "Test this"-Button above Authors-Picture
  • mark your Test as successfully
  • hit "submit test result"
avatar astridx
astridx - comment - 2 Sep 2018

Now I was able to test a Joomla Update. Thanks to @zero-24 who provided a joomla update especially for this test. In this Joomla Update only the view article in com_content is changed.

  1. I made a new installation on this branch like explained in my last comment.

  2. Then I created an override for com_content view article.
    templates customise cassiopeia test administration 3

  3. After that I set a custom url for joomla update. The custom url is https://www.jah-tz.de/downloads/core/gsoc18_override_management/gsoc18_update_list.xml
    joomla update options test administration 1

  4. When I did this I made a joomlaupdate via https://www.jah-tz.de/downloads/core/gsoc18_override_management/gsoc18_update_list.xml
    joomla update test administration 2
    joomla update test administration 3

  5. Back in template manger I see the changes in diff view and updated files view
    templates customise cassiopeia test administration 4
    templates customise cassiopeia test administration 5

  6. In control pane I see the red quickicon. That is fine. Only the messages could be improved :).
    control panel test administration 3

avatar astridx
astridx - comment - 2 Sep 2018

I have tested this item successfully on b93b118


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21851.

avatar astridx astridx - test_item - 2 Sep 2018 - Tested successfully
avatar astridx
astridx - comment - 2 Sep 2018

@franz-wohlkoenig
I have now correctly marked the test as successful. Since I was involved in the project, others have to decide if it counts.

@richard67
It would be great if you could repeat your test.
If you and @brianteeman also tests successful we would have three :)

avatar infograf768
infograf768 - comment - 2 Sep 2018

Extension id 491 is already used in 3.9 for plg_privacy_content (for a clean install)
That's allright as this PR can be modified to take this into account later for the sql but I agree with
#21851 (comment) that we should not be using a hardcoded id in the js.

avatar astridx
astridx - comment - 2 Sep 2018

@infograf768 Thank you for your opinion. You're right.
But: This PR is complex and it is time consuming to repeat all tests many times. What do you think. Would it be OK to open an issue for "not using a hardcoded id for the plugin" in the case this pr get merged? And we can work later on it?
Advantage: The functionality of this new feature is well tested and improvements could be integrated in small steps. If the steps are smaller, you can focus much better on the single problem.

avatar infograf768
infograf768 - comment - 2 Sep 2018

Would it be OK to open an issue for "not using a hardcoded id for the plugin" in the case this pr get merged? And we can work later on it?

That's a decision to be taken by 4.0 production leadership. ?

avatar astridx
astridx - comment - 2 Sep 2018

@wilsonge
I think you are production leadership for 4.0. What do you think concerning hardcoded id for plugins. Could we do it in an separate issue. By the way: There are many hard coded ids for plugins in the folder administrator/components/com_admin/sql/updates/mysql/... . This is not an argument for accuracy. But we could all correct it together.

avatar brianteeman
brianteeman - comment - 2 Sep 2018

@astridx do you think it should be a warning and not a notice when it says "x overridden files have been updated" ??

avatar astridx
astridx - comment - 2 Sep 2018

@brianteeman
No, I think the notice is good. It does not have to be that the override should be changed. At the moment we ignored it when the original to an override changes. It should only be an indication that something has changed. So no warning only a notice - in my opinion.

Perhaps you meant my comment "Only the messages could be improved" in the last picture of #21851 (comment). I meant the missing language string.

avatar infograf768
infograf768 - comment - 2 Sep 2018

@astridx
Concerning the sql, I do not think it is an issue. When 3.9/3/10 are merged into 4.0, whoever merges should take care of it.

avatar brianteeman
brianteeman - comment - 2 Sep 2018

@astridx no you understood me correctly although I am not sure i agree- and I will review all the strings later today

avatar Anu1601CS
Anu1601CS - comment - 2 Sep 2018

@brianteeman Please take a look at these strings and suggest good if possible.
44949413-ecd75b80-ae30-11e8-892c-bfe8b132be51

  1. Added to list - -> When file history created
  2. Last change by update --> When in next update that file changed again then it should update.
  3. Delete list entry -> For delete of entry.
avatar astridx
astridx - comment - 2 Sep 2018

@brianteeman You asked:

Is there a reason that the diff view doesnt show line numbers?

We decided to use https://github.com/kpdecker/jsdiff for the diff view.
The reason for this was, that we do not need to integrate a new vendor script. jsdiff is already in Joomla. We use jsdiff for content history.

But jsdiff does not provide a line number. We would have to expand this ourselves.
@Anu1601CS Please correct me, if I am wrong.

avatar brianteeman
brianteeman - comment - 2 Sep 2018

When the quickicon is enabled but the override check is not enabled you get a nice message (language string change coming) BUT the link doesnt work. Sorry can't hep with the code but we have other places such as com_finder with similar that you should check

quickicon

avatar laoneo
laoneo - comment - 2 Sep 2018

Would be good if somebody can open an issue for the hardcoded id. Just that it doesn't get forgotten.

avatar astridx
astridx - comment - 2 Sep 2018

@laoneo Shold we open this issue now? We are not sure if this PR get merged.

avatar richard67
richard67 - comment - 2 Sep 2018

@astridx I am not sure if I will have time for such detailled tests as you did. And my plan was to wait with tests until @brianteeman has reviewed the language strings.

avatar brianteeman
brianteeman - comment - 2 Sep 2018

This is still to be fixed
#21851 (comment)

avatar brianteeman
brianteeman - comment - 2 Sep 2018

Rename and delete file - even though not selected they are ??
Should work the same as "delete list entry"

Can't replicate anymore

selected

avatar brianteeman
brianteeman - comment - 2 Sep 2018

Is "Delete List Entry" the same as Marking it as Checked

avatar brianteeman
brianteeman - comment - 2 Sep 2018

COM_TEMPLATES_N_OVERRIDE_CHECKED
COM_TEMPLATES_N_OVERRIDE_DELETED
COM_TEMPLATES_N_OVERRIDE_UNCHECKED

These should all be changed to
COM_TEMPLATES_N_OVERRIDE_CHECKED_1
COM_TEMPLATES_N_OVERRIDE_CHECKED_MORE

See COM_CHECKIN_N_ITEMS_CHECKED_IN_1 as an example for the code to change

The language strings should then be updated to something like
COM_TEMPLATES_N_OVERRIDE_CHECKED_1="1 overridden file checked."
COM_TEMPLATES_N_OVERRIDE_CHECKED_MORE="%d overridden files checked."

avatar astridx
astridx - comment - 2 Sep 2018

@brianteem No, if you mark it as checked you do not see the notice any more. But it is not deleted. You can uncheck it again.
It is similar to disable an item.

avatar brianteeman
brianteeman - comment - 2 Sep 2018

So there needs to be a Checked and Unchecked button in the toolbar in that case

avatar richard67
richard67 - comment - 2 Sep 2018

@astridx The issue with hard-coded extension ID war here:
File build/media_src/plg_quickicon_overridecheck/js/overridecheck.es6.js, line 51

This is not the same as using hard-coded IDs in schema update SQL scripts, it is a JS here.

Does anybody have an idea how to change that?

avatar brianteeman
brianteeman - comment - 2 Sep 2018

(Submitted some PR to the GSOC branch - logging off now)

avatar richard67
richard67 - comment - 2 Sep 2018

I've submitted a new issue to the gsoc18_override_management repo as a reminder for the hard-coded extension ID in the Javascript file.

avatar Anu1601CS
Anu1601CS - comment - 2 Sep 2018

https://github.com/joomla-projects/gsoc18_override_management/blob/a33915f8d99dd945de5248e1bb94dc7c4deb0a17/administrator/components/com_templates/tmpl/template/default.php#L117

Didn't check the purpose of this if statement but it is preventing the display of the title

@brianteeman currently if you open file in jommla 4.0-dev then you can't see any title. So, that's why I added if override file got selected then I am showing titles.

avatar brianteeman
brianteeman - comment - 2 Sep 2018

ok that makes sense but its not working

image

avatar richard67
richard67 - comment - 2 Sep 2018

@brianteeman Here (Linux environment) the title display for the override file works.

avatar richard67
richard67 - comment - 2 Sep 2018

@brianteeman Can it be related to you having a Windows environment and to the backslash problem you found in the paths in the list of changed files?
When $overrideCheck['1'] is equal to html\ and not to html, that could be an explanation why on Windows the title is not shown because the check of the if condition fails.

avatar brianteeman
brianteeman - comment - 2 Sep 2018

yes most likely

avatar richard67
richard67 - comment - 2 Sep 2018

But then $this->source->filename already would be wrong on Windows, and then I have no idea why other things are working or if it is maybe a core problem not related to this PR.

avatar richard67
richard67 - comment - 2 Sep 2018

@brianteeman I've created a PR in the project repo for the issues on Windows:
joomla-projects/gsoc18_override_management#84.
Can you test?

avatar Anu1601CS
Anu1601CS - comment - 2 Sep 2018

@brianteeman In which case its not working #21851 (comment)

May be same windows or Linux problem

avatar richard67
richard67 - comment - 2 Sep 2018

@Anu1601CS Brian and me already discussed that above. It is a problem only on Windows, and that was what my PR against the project repository was about.

avatar richard67
richard67 - comment - 2 Sep 2018

More changes "core file" to "original file" in language strings proposed as PR to the project repo:
joomla-projects/gsoc18_override_management#85

avatar Anu1601CS
Anu1601CS - comment - 2 Sep 2018

@brianteeman @richard67 Check this commit this will remove hardcoded plugin id. i hope this will work for you.
ca8dc67

avatar mbabker
mbabker - comment - 2 Sep 2018

Late to the party here but #20500 is already open regarding the list of hardcoded IDs. Though similar to other RFCs I doubt it's going anywhere.

avatar richard67
richard67 - comment - 2 Sep 2018

@Anu1601CS Commit ca8dc67 looks ok to me.

avatar Anu1601CS
Anu1601CS - comment - 3 Sep 2018

@brianteeman @richard67 Check this commit for non mysql 7eb7ff1

avatar richard67
richard67 - comment - 3 Sep 2018

@Anu1601CS

Check this commit for non mysql 7eb7ff1

I guess you meant "Windows platform" and not "non mysql". That commit has nothing to do with database type.

Not sure if that is the right place to fix it and if it will help with display of the changed files list.

With the missing title it will help.

Let's see if Brian is ok with it, and after you merged the project branch into here so we have here the latest language change I can test again tomorrow evening (central european time).

avatar richard67
richard67 - comment - 3 Sep 2018

@Anu1601CS Forget my previous comment, was about the wrong thing.

avatar richard67
richard67 - comment - 3 Sep 2018

@zero-24 The issue tracker seems to have a problem with this PR. @astridx 's test is still shown as successful even after new commits have been made, and her test is shown with the wrong commit number b93b118, which was long time before many later commits and then her test.

Do you know if this can be fixed? Maybe this PR has so many commits that it confuses the issue tracker?

I will test soon, too, and am almost sure my test will be shown with the same old commit number b93b118.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21851.

avatar Anu1601CS
Anu1601CS - comment - 3 Sep 2018

@brianteeman @richard67 Yes, this PR has too many commits. I would suggest you to merge this PR after next successful tests. And if any issue arises then submit the issue here https://github.com/joomla-projects/gsoc18_override_management/issues i will do my PR here.

What do you think @astridx @laoneo @wilsonge @zero-24 ?

avatar richard67
richard67 - comment - 3 Sep 2018

I have tested this item successfully on b93b118

Tested as described here and here.

In opposite to what the generated test message above sais, I tested on last commit 1468d4e9251f203451b923483278778b57357f45. It seems the issue tracker has a problem to follow the commit history of this PR.

Thanks @astridx for the testing instructions and @zero-24 for the custom Joomla update URL.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21851.

avatar richard67 richard67 - test_item - 3 Sep 2018 - Tested successfully
avatar richard67
richard67 - comment - 3 Sep 2018

@astridx Can you test again or reset your test result? The issue tracker has some problems to notice that new commits have been made after a test.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21851.

avatar zero-24
zero-24 - comment - 4 Sep 2018

And if any issue arises then submit the issue here https://github.com/joomla-projects/gsoc18_override_management/issues i will do my PR here.

I think when the PR is merged any new issue should be raised in the main repo. Merge decision is done by @wilsonge for 4.0 so he need to take a decision here.

avatar astridx
astridx - comment - 5 Sep 2018

I have repeated my tests (https://issues.joomla.org/tracker/joomla-cms/21851#event-388645 and https://issues.joomla.org/tracker/joomla-cms/21851#event-388707). The essentials were successful. So I think I do not have to change something in issue tracker, right?


I found something else to change. (I want to create a PR, but it was not possible for me. I did not see your local repo and branch as a base fork and I do not know how to achieve that.).
Please delete line 184 and change line 185 (https://github.com/joomla/joomla-cms/pull/21851/files#diff-ae4af84085ee35437e316b7653830bc0R184) to
$this->app->enqueueMessage(Text::plural('PLG_INSTALLER_N_OVERRIDE_FILE_UPDATED', $num), 'notice');


avatar richard67
richard67 - comment - 5 Sep 2018

@astridx If you want to make a PR against the branch of this PR you just enter the URL of the repo in the adress bar of your browser: https://github.com/Anu1601CS/joomla-cms/. Then you can select the gsoc branch and make a PR. Selecting that repo as base in the compare view of the joomla/joomla-cms repo does indeed not work.

@Anu1601CS There is still the change from the last comment by Quy (see here) to be done, i.e. change the comment from "Trigger event before joomla." to "Trigger event before Joomla update." . Beside this I suggest that you check again also other comments and change "joomla" to "Joomla", because "Joomla" is a name and so starting with uppercase letter.

avatar Anu1601CS
Anu1601CS - comment - 5 Sep 2018

@richard67 See this commit 0abf606

avatar astridx
astridx - comment - 5 Sep 2018

@richard67 Thank you very much for explaining. But I did this. Nevertheless I was not able to select the gsoc branch from Anu1601CS.
comparing joomla staging astridx gsoc joomla joomla cms

avatar richard67
richard67 - comment - 5 Sep 2018

@Anu1601CS Oh, seems I missed that. Sorry. All ok.

avatar Anu1601CS
Anu1601CS - comment - 5 Sep 2018

I found something else to change. (I want to create a PR, but it was not possible for me. I did not see your local repo and branch as a base fork and I do not know how to achieve that.).
Please delete line 184 and change line 185 (https://github.com/joomla/joomla-cms/pull/21851/files#diff-ae4af84085ee35437e316b7653830bc0R184) to
$this->app->enqueueMessage(Text::plural('PLG_INSTALLER_N_OVERRIDE_FILE_UPDATED', $num), 'notice');

@astridx
Current condition is like this
screenshot from 2018-09-05 23-43-23

but according to your suggested changes it looks liks
screenshot from 2018-09-05 23-44-26

So, i thought to make number background white to make number clear and good.

avatar richard67
richard67 - comment - 5 Sep 2018

@astridx As I wrote you have to be in Anu1601CS's repository. But your screenshot shows you are in the core (joomla) repository. There is it normal that some user repositories are not found for selecting the base.
But if you go to https://github.com/Anu1601CS/joomla-cms/, then select there the gsoc branch, and then navigate to the file and edit it in the browser it works.
unbenannt.

avatar richard67
richard67 - comment - 5 Sep 2018

To the maintainers: My test is still valid because since then only CS changes.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21851.

avatar richard67
richard67 - comment - 5 Sep 2018

To the maintainers: My test is still valid because since then only CS changes.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21851.

avatar astridx
astridx - comment - 5 Sep 2018

@Anu1601CS
I think you need to put the html for making the number nice into the language string. If I am right, you need to use a number as second parameter in the function plural:

public static function plural($string, $n)

avatar brianteeman
brianteeman - comment - 5 Sep 2018

I did comment earlier about switching to plural strings - the markup for styling the number should not however go in the language string if at all possible

avatar astridx
astridx - comment - 5 Sep 2018

@brianteeman Sorry, I could not find your earlier comment. So it is OK use a string as second parameter of this function?

avatar richard67
richard67 - comment - 5 Sep 2018

@astridx @brianteeman 's comment is there: #21851 (comment). Is hard to find because initially hidden by GitHub because of very long comment history of this PR.

avatar astridx
astridx - comment - 5 Sep 2018

@richard67
Thank you very much.
First: I have to take a closer look to creating a PR against the branch of another PR.
Second: I searched for "plural". So I could not find it via search.

@brianteeman In this comment you have suggested using plural, right? The function plural have to be given a number as a second parameter. How can we add html, if we should not do it via language string? I found no example ...

avatar infograf768
infograf768 - comment - 6 Sep 2018

Please do not add any html in a plural string.
It is perfectly OK if the number, which can be literal in the case of 1, i.e. for example in French

COM_REDIRECT_N_LINKS_UPDATED="%d liens mis à jour."
COM_REDIRECT_N_LINKS_UPDATED_1="Un lien a été mis à jour"

is not specifically formatted as it is anyway in a phrase.
It would make it more complex than necessary.

Note: the way you did it "would" be the way to go, but I am not sure we should anyway have html in that kind of file.

$span = '<span class="badge badge-light">' . $num . '</span>';
$this->app->enqueueMessage(Text::plural('PLG_INSTALLER_N_OVERRIDE_FILE_UPDATED', $span), 'notice');
avatar laoneo
laoneo - comment - 6 Sep 2018

I would say, that after the language strings cleanup is done. We merge it and then we can finalize further issues directly in this repo. Or are there any more blockers detected?

avatar brianteeman
brianteeman - comment - 6 Sep 2018

@laoneo agreed

avatar astridx
astridx - comment - 6 Sep 2018

To the maintainers: My test is still valid because since then only one change that I have suggested have occurred. At the time, I also tested these changes.

avatar laoneo laoneo - change - 6 Sep 2018
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-09-06 11:00:20
Closed_By laoneo
avatar laoneo laoneo - close - 6 Sep 2018
avatar laoneo laoneo - merge - 6 Sep 2018
avatar laoneo
laoneo - comment - 6 Sep 2018

Thank you very much @Anu1601CS and @astridx. You guys did an awesome job!! And of course to the whole GosC team who helped whenever we have been struggling.

avatar Anu1601CS
Anu1601CS - comment - 6 Sep 2018

Thank you very much @astridx @laoneo @brianteeman @richard67 @zero-24 @Quy
For the review and reading such a huge code and finding my mistakes :)

avatar infograf768
infograf768 - comment - 6 Sep 2018

small typo:
#22024

Add a Comment

Login with GitHub to post a comment