User tests: Successful: Unsuccessful:
Pull Request for Issue #16375 (only keepalive fallback part).
The keepalive js fallback is not working correctly when there is no system.keepalive
json. This PR intends to add better fallback for those wild scenarios.
Pre-requisites:
Reproducing the issue:
Test if proposed keepalive fallback works:
Keepalive should always work even if there is no system.keepalive
json.
Keepalive does not work in this scenario because of a js error.
@dgt41 @Fedik can you also check this one and confirm there is no problem in adding the joomla install uri paths trough script options in behavior.core, ie, all the pages that use the core bahaviour (this would also be used in #15529).
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries JavaScript |
Labels |
Added:
?
|
After PR, I still get a js error:
Uncaught TypeError: Cannot read property 'system.keepalive' of null
at Object.e.getOptions (core.js?449d852…:1)
at HTMLDocument.<anonymous> (keepalive.js?449d852…:1)
@andrepereiradasilva I guess there still bug with Joomla.loadOptions
there
if (!Joomla.optionsStorage) {
Joomla.optionsStorage = options;
}
need to be:
if (!Joomla.optionsStorage) {
Joomla.optionsStorage = options || {};
}
Can you add it here or I do new PR?
@dgt41 I thought that is your PR
we can update, after this one will be merged
another strange thing,
with this patch, if cache is enabled, the core.js loaded but there no any <script type="application/json" class="joomla-script-options">
in the head.
maybe it somehow related to JCache::set(get)Workarounds
?
upd. debug off
, and only on "Progressive caching"
Can you add it here or I do new PR?
please do a PR i prefer you do that Joomla.optionsStorage part - i will test it so it can be RTC and merged fast (hope @dgt41 tests it too
this one stays in standby until your is merged
another strange thing,
with this patch, if cache is enabled, the core.js loaded but there no any <script type="application/json" class="joomla-script-options"> in the head.
maybe it somehow related to JCache::set(get)Workarounds ?
that is the first problem of the issue that originated this PR see #16375 (comment)
But that's another issue not related to js.
@andrepereiradasilva there is pull #16488
which should fix:
Uncaught TypeError: Cannot read property 'system.keepalive' of null
at Object.e.getOptions (core.js?449d852…:1)
at HTMLDocument.<anonymous> (keepalive.js?449d852…:1)
Current pull should work after #16488
I am still getting the js error after both PRs are applied in the frontend.
Uncaught TypeError: Cannot read property 'system.keepalive' of null
at Object.Joomla.getOptions (core.js?cf50a49…:1)
at HTMLDocument.<anonymous> (keepalive.js?cf50a49…:1)
I have tested this item
I have tested this item
works as described, with #16488
Status | Pending | ⇒ | Ready to Commit |
RTC after two successful tests.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-06-13 14:51:11 |
Closed_By | ⇒ | rdeutz |
@andrepereiradasilva I did not tested, but looks good to me