- Issue created by @dastan56
- Issue was unassigned.
- πΊπΈUnited States bluegeek9
Hi @dastan56,
The visitor block was removed, but a new release has yet to be made.
Which version of PHP are you using?
The trailing comma is a change with phpcs. The trailing comma is now encouraged.
π Remove the Visitor block Fixed
yes sorry, i did further debugging and found that the tracking script was instead causing the issue so when i checked Disable tracking under advanced settings then the slider loaded in safari, basically the script prevents the $(window).on('load', function(){ from executing in the md_slider init-md-slider.js file and hence the slider is not loaded
these are the versions i use
Drupal Version: 10.3.2
PHP Version 8.2.22Visitors: 8.x-2.19
md_slider: 1.5.4i further worked on it, and changed this code in service ScriptService.php on line 433 from this:
$script .= " document.addEventListener('readystatechange', () => { // The first readyStateChange will be : interactive // The second readyStateChange will be : complete if (document.readyState === 'complete') { tracker(); } }); ";
to this:
$script .= " window.addEventListener('load', function() { tracker(); });
seems to fix the issue, now the md_slider loads in the safari, and the visit is also counted, but it causes another, issue the counter is cached for anonymous users, so although the visit is counted but the number is updated only when the cache is cleared, is this ok? should i create a patch for it please let me know
- πΊπΈUnited States bluegeek9
The cache for anonymous users is intentional. I will look into the javascript event issue.
- Status changed to Needs review
3 months ago 6:49pm 25 August 2024 - Merge request !156Issue #3470146 by dastan56, bluegeek9: Change Event Listener from readystatechange to load β (Merged) created by bluegeek9
-
bluegeek9 β
committed 328c893d on 8.x-2.x
Issue #3470146: Change Event Listener from readystatechange to load
-
bluegeek9 β
committed 328c893d on 8.x-2.x
- Status changed to Fixed
2 months ago 1:42pm 20 September 2024 Automatically closed - issue fixed for 2 weeks with no activity.