? Success

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
9 Oct 2016

Pull Request for Issue #9638 (js part).

Summary of Changes

Following #11289 merge, this PR replaces all deprecated script methods signature usage across the CMS.

Also:

  • adds script version to all js files to solve #9638
  • use the api in conditional ie statements (html5.js) ### Testing Instructions
  • Code review.
  • Apply patch and navigate in the frontend/backend. Confirm all is working fine and check all external js files are loaded and with script version ### Documentation Changes Required

None.

pinging @dgt41

avatar andrepereiradasilva andrepereiradasilva - open - 9 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 9 Oct 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 9 Oct 2016
Labels Added: ?
avatar andrepereiradasilva andrepereiradasilva - edited - 9 Oct 2016
avatar joomla-cms-bot joomla-cms-bot - change - 9 Oct 2016
Category Administration Components Media Manager Templates (admin) Front End
avatar andrepereiradasilva andrepereiradasilva - change - 9 Oct 2016
Title
[3.7.x] Add script version to all js files and replace deprecated script sjgnatures usage
[3.7.x] Add script version to all js files and replace deprecated script signatures usage
avatar andrepereiradasilva andrepereiradasilva - change - 9 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 9 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - edited - 9 Oct 2016
avatar andrepereiradasilva
andrepereiradasilva - comment - 9 Oct 2016

@PhilETaylor @ggppdk @mbabker can you also check and confirm this will solve the js browser cache on update problem.

avatar andrepereiradasilva andrepereiradasilva - change - 9 Oct 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 9 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 10 Oct 2016
Title
[3.7.x] Add script version to all js files and replace deprecated script sjgnatures usage
[3.7.x] Add script version to all js files and replace deprecated script signatures usage
avatar andrepereiradasilva
andrepereiradasilva - comment - 20 Oct 2016

so ... still no volunteers to review and/or test this?

avatar brianteeman
brianteeman - comment - 20 Oct 2016

Once we are over the release I am planning to test

On 20 October 2016 at 00:07, andrepereiradasilva notifications@github.com
wrote:

so ... still no volunteers to review and/or test this?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#12373 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8R9ZdykQfLsdKnsYvE-aA9aKt6smks5q1rDbgaJpZM4KSGTs
.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
https://brian.teeman.net/ http://brian.teeman.net/

avatar brianteeman
brianteeman - comment - 20 Oct 2016

If I forget please remind me

On 20 October 2016 at 00:31, Brian Teeman brian@teeman.net wrote:

Once we are over the release I am planning to test

On 20 October 2016 at 00:07, andrepereiradasilva <notifications@github.com

wrote:

so ... still no volunteers to review and/or test this?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#12373 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8R9ZdykQfLsdKnsYvE-aA9aKt6smks5q1rDbgaJpZM4KSGTs
.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
https://brian.teeman.net/ http://brian.teeman.net/

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
https://brian.teeman.net/ http://brian.teeman.net/

avatar andrepereiradasilva
andrepereiradasilva - comment - 26 Oct 2016

pinging @brianteeman

avatar brianteeman
brianteeman - comment - 26 Oct 2016

Thanks for the ping - I will test tomorrow

avatar zero-24 zero-24 - change - 27 Oct 2016
Milestone Added:
avatar brianteeman
brianteeman - comment - 29 Oct 2016

Am I correct in thinking that with this PR every css and js file should have a version string? If that is correct then this PR is not working correctly

For example go to administrator/index.php?option=com_content
and check all the css and js files being loaded

None of the css files in the /media/jui/css folder have version strings but everything else seems to

I am seeing the same behaviour in other pages I have checked such as administrator/index.php?option=com_media
Again none of the css files in the following folders have version strings
/media/jui/css folder
/media/media/css folder
/media/system/css

And on /administrator/index.php
Everything has version strings except for
/media/plg_quickicon_extensionupdate/js/extensionupdatecheck.js

Awaiting clarification if they are supposed to have version strings before continuing testing

avatar andrepereiradasilva
andrepereiradasilva - comment - 29 Oct 2016

CSS not yet. only JS for now

For CSS we still have a long way:
1. First this (#12375) needs to be proper tested and merged
2. Them we need to make a similiar PR to this, but for CSS

avatar andrepereiradasilva
andrepereiradasilva - comment - 29 Oct 2016

/media/plg_quickicon_extensionupdate/js/extensionupdatecheck.js

this one is probably a later merge (after this PR was done that did not used the new method signature)
will check

avatar brianteeman
brianteeman - comment - 29 Oct 2016

CSS not yet. only js
that was confusing as i see all the other css with version strings - sorry

How can I test that the version strong changes?

avatar andrepereiradasilva
andrepereiradasilva - comment - 29 Oct 2016

that was confusing as i see all the other css with version strings - sorry

Yes, the ones that used the JDocument::addStyleSheetVersion() (https://github.com/joomla/joomla-cms/search?q=addStyleSheetVersion), normally only the template files uses this.

How can I test that the version strong changes?

The fastst way to test this is:
1. make a code review
2. navigate joomla frontend, backend, installation pages with chrome dev bar open (Network tab -> JS) and check all js are loaded with version strings.

See this video:
vers

Anyway there is no big issue with one or another js not adding the js string those can be corrected later.

avatar brianteeman
brianteeman - comment - 29 Oct 2016

How can I test that the version string changes?

Sorry I wasnt clear. I meant how can I test that the string itself will change when we want it to

avatar andrepereiradasilva
andrepereiradasilva - comment - 29 Oct 2016

oh in update? it that what you mean?

avatar brianteeman
brianteeman - comment - 29 Oct 2016

yes - how can i simulate a change so that I can ensure that the strings are updated - otherwise they are just meaningless strings ;)

avatar andrepereiradasilva
andrepereiradasilva - comment - 29 Oct 2016

The auto media version string is build with the getLongVersion, so if you have a different joomla version. See https://github.com/joomla/joomla-cms/blob/staging/libraries/cms/version/version.php#L244.

To real test it i think you need to change joomla to some other version.
Let me check a easy way to do this...

avatar andrepereiradasilva
andrepereiradasilva - comment - 29 Oct 2016

Do this:
1. download https://github.com/joomla/joomla-cms/releases/download/3.6.4/Joomla_3.6.3_to_3.6.4-Stable-Patch_Package.zip
2. Go to admin, check the page source and the version string we are using before the update.
3. Them use that zip in Upload & Update in joomla update component
4. Check the page source and notice the version string changed, so from a browser eprspective they are different files, so the browser will not load them from cache.

avatar andrepereiradasilva andrepereiradasilva - change - 29 Oct 2016
Title
[3.7.x] Add script version to all js files and replace deprecated script signatures usage
Add script version to all js files and replace deprecated script signatures usage
avatar andrepereiradasilva andrepereiradasilva - edited - 29 Oct 2016
avatar andrepereiradasilva andrepereiradasilva - change - 29 Oct 2016
Title
[3.7.x] Add script version to all js files and replace deprecated script signatures usage
Add script version to all js files and replace deprecated script signatures usage
avatar joomla-cms-bot joomla-cms-bot - change - 29 Oct 2016
Labels Added: ?
avatar andrepereiradasilva
andrepereiradasilva - comment - 29 Oct 2016

ok @brianteeman updated the PR to include the ones added in latest merges.

@dgt41 can you also review test this so it can fgo in 3.7.0 and start avoiding js cache browser issues on update (like the one in modules recently ...)?

avatar dgt41 dgt41 - test_item - 29 Oct 2016 - Tested successfully
avatar dgt41
dgt41 - comment - 29 Oct 2016

I have tested this item successfully on 1e2ccee

On Review and testing front end - back end random pages.


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

avatar brianteeman brianteeman - change - 29 Oct 2016
Labels Removed: ?
avatar brianteeman
brianteeman - comment - 29 Oct 2016

Can you remove this file from thePR
joomla-cms/layouts/joomla/layouts - Atalho.lnk

avatar andrepereiradasilva
andrepereiradasilva - comment - 29 Oct 2016

@brianteeman removed the file and the empty line

avatar brianteeman
brianteeman - comment - 29 Oct 2016

Thanks. Will try to find time to test again soon

avatar andrepereiradasilva andrepereiradasilva - change - 31 Oct 2016
The description was changed
avatar brianteeman
brianteeman - comment - 2 Nov 2016

Applied the PR and there is now a query string on all JS
in my case a123aee48ee7c097706e58056b57f833

BUT
Increased Joomla version in version.php and the string did NOT change

avatar andrepereiradasilva
andrepereiradasilva - comment - 2 Nov 2016

Do this:
1. download https://github.com/joomla/joomla-cms/releases/download/3.6.4/Joomla_3.6.3_to_3.6.4-Stable-Patch_Package.zip
2. Go to admin, check the page source and the version string we are using before the update.
3. Them use that zip in Upload & Update in joomla update component
4. Check the page source and notice the version string changed, so from a browser eprspective they are different files, so the browser will not load them from cache.

avatar brianteeman brianteeman - test_item - 2 Nov 2016 - Tested successfully
avatar brianteeman
brianteeman - comment - 2 Nov 2016

I have tested this item successfully on a7d4452


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

avatar andrepereiradasilva
andrepereiradasilva - comment - 2 Nov 2016

@dgt41 can you just marked as tested again (or test again the latests changes if you feel the need) so we can finnaly put this RTC?

avatar dgt41 dgt41 - test_item - 2 Nov 2016 - Tested successfully
avatar dgt41
dgt41 - comment - 2 Nov 2016

I have tested this item successfully on a7d4452


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

avatar dgt41 dgt41 - change - 2 Nov 2016
The description was changed
Status Pending Ready to Commit
avatar joomla-cms-bot joomla-cms-bot - edited - 2 Nov 2016
avatar joomla-cms-bot joomla-cms-bot - change - 2 Nov 2016
Labels Added: ?
avatar dgt41
dgt41 - comment - 2 Nov 2016

RTC
@rdeutz @wilsonge can you merge this before it goes out of sync again?

avatar mbabker mbabker - change - 2 Nov 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-11-02 15:52:20
Closed_By mbabker
avatar mbabker mbabker - close - 2 Nov 2016
avatar mbabker mbabker - merge - 2 Nov 2016
avatar zero-24 zero-24 - close - 2 Nov 2016
avatar mbabker mbabker - reference | e7dfe5a - 2 Nov 16
avatar mbabker mbabker - merge - 2 Nov 2016
avatar mbabker mbabker - close - 2 Nov 2016
avatar zero-24 zero-24 - change - 2 Nov 2016
Labels Removed: ?
avatar andrepereiradasilva
andrepereiradasilva - comment - 2 Nov 2016

thanks!

avatar andrepereiradasilva andrepereiradasilva - head_ref_deleted - 2 Nov 2016

Add a Comment

Login with GitHub to post a comment