Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong javascript files caching #4272

Closed
Jimmi08 opened this issue Nov 29, 2020 · 4 comments
Closed

wrong javascript files caching #4272

Jimmi08 opened this issue Nov 29, 2020 · 4 comments
Labels
type: bug A problem that should not be happening
Milestone

Comments

@Jimmi08
Copy link
Contributor

Jimmi08 commented Nov 29, 2020

Bug Description

I have confirmed that this happens only with javascript caching, header javascript is not loaded

How to Reproduce

My plugin defines js this way:

		e107::js('fallingholidays', '/js/animation-min.js', 'jquery');
		e107::js('fallingholidays', '/soundmanager2-nodebug-jsmin.js', 'jquery');

it is loaded in the header, not in the footer, which is correct.

After caching ON, the only script in the header is
jquery.min.js
and footer files:

  • jquery.once.min.js
  • cached js file

but inside this file are only footer javascript files...

@Jimmi08 Jimmi08 added the type: bug A problem that should not be happening label Nov 29, 2020
@CaMer0n
Copy link
Member

CaMer0n commented Nov 29, 2020

@Jimmi08 Nevermind, this is the issue. Thanks, ;-)

Do you have 2 cached .js files?

So far I'm unable to reproduce the issue.

Here's a screenshot of the local scripts loaded. I then manually went through each cached js file and crossed off the ones that were present.

image

Where is your plugin code located and is it installed?

Thanks.

@Jimmi08
Copy link
Contributor Author

Jimmi08 commented Nov 29, 2020

@CaMer0n
in plugins e_header.php file.
https://github.com/Jimmi08/Falling-Holidays-eXeSystem/blob/master/fallingholidays/e_header.php

Without caching:
header:

<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery/2.2.4/jquery.min.js"></script>
<script type="text/javascript" src="/fanfiction/hpplugins/fallingholidays/js/animation-min.js?1602062751"></script>
<script type="text/javascript" src="/fanfiction/hpplugins/fallingholidays/soundmanager2-nodebug-jsmin.js?1602062751"></script>

Footer:

<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery.once/2.1.2/jquery.once.min.js"></script>
<script type="text/javascript" src="/fanfiction/e107_web/js/bootstrap-notify/js/bootstrap-notify.js?1602062751"></script>
<script type="text/javascript" src="/fanfiction/e107_web/js/rate/js/jquery.raty.js?1602062751"></script>
<script type="text/javascript" src="/fanfiction/hpthemes/hpkizi/assets/js/vendors.js?1602062751"></script>
<script type="text/javascript" src="/fanfiction/hpthemes/hpkizi/assets/js/DropdownHover.js?1602062751"></script>
<script type="text/javascript" src="/fanfiction/hpthemes/hpkizi/assets/js/app.js?1602062751"></script>
<script type="text/javascript" src="/fanfiction/hpthemes/hpkizi/assets/js/holder.js?1602062751"></script>
<script type="text/javascript" src="/fanfiction/e107_web/js/core/front.jquery.js?1602062751"></script>
<script type="text/javascript" src="/fanfiction/e107_web/js/core/all.jquery.js?1602062751"></script>

After caching:
header:
<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery/2.2.4/jquery.min.js"></script>
footer:
https://cdn.jsdelivr.net/jquery.once/2.1.2/jquery.once.min.js

files loaded in cached js:

e107_web/js/bootstrap-notify/js/bootstrap-notify.js
e107_web/js/rate/js/jquery.raty.js
 hpthemes/hpkizi/assets/js/vendors.js
hpthemes/hpkizi/assets/js/DropdownHover.js
hpthemes/hpkizi/assets/js/app.js
hpthemes/hpkizi/assets/js/holder.js
e107_web/js/core/front.jquery.js 
e107_web/js/core/all.jquery.js

@CaMer0n
Copy link
Member

CaMer0n commented Nov 29, 2020

Thanks @Jimmi08 ! I'll try installing the plugin and see if that helps. Are you testing from the home page?

@CaMer0n CaMer0n added this to the e107 2.3.0 milestone Nov 29, 2020
@CaMer0n
Copy link
Member

CaMer0n commented Nov 30, 2020

@Jimmi08 I installed the plugin and did the same test as above.. crossing off (in red) each JS file loaded by the cache files.
So I'm still unable to reproduce the issue you're having.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A problem that should not be happening
Projects
None yet
Development

No branches or pull requests

2 participants