Load AOS only for anonymous/per role

Created on 28 May 2024, 7 months ago
Updated 15 July 2024, 5 months ago

I don't know why, but I got many issues, AOS is completely broken for admin, is not loading items, they load blank/white stuck at opacity 0. There are no errors, caches cleared, etc.

But it works fine as anonymous, items fade down all nicely on scroll.

I figured I don't need it to work for admin, all that matters is anonymous visitors of the website and as long it works for them.

Unless someone knows what I'm talking about and has solution. Thanks.

Feature request
Status

Fixed

Version

1.0

Component

Feature request

Created by

🇱🇹Lithuania vibrasphere

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @vibrasphere
  • 🇵🇱Poland mahyarss

    Which version of Drupal are you using?

    After installing the AOS JS module, have you cleared all caches?
    In the Performance section, can you disable the Aggregate CSS files and Aggregate JavaScript files options, refresh the page, and check if the issue is resolved?

    Are there any errors in the browser console or Drupal logs? Even minor logs can be helpful.

  • 🇱🇹Lithuania vibrasphere

    That's the point, I did all that, no errors and best part I get same/similar issue with other AOS modules, e.g. https://www.drupal.org/project/animate_on_scroll

    I'm losing my mind here.

    I might record some video.

  • 🇵🇱Poland mahyarss

    I had a similar issue before due to the large number of CSS and JavaScript files being loaded in the head section of the browser. It appears there is a limit to the number of files that can be loaded in the head of the page. I believe the reason this issue does not occur for anonymous users but does occur when logged in, especially as an admin, is because more files are added and loaded in the head section for logged-in users. This can cause problems due to the higher volume and number of files.

    To confirm this, you should try the module on a fresh installation of Drupal without any additional modules or specific themes installed. This will help determine if the problem still exists under these conditions.

  • 🇱🇹Lithuania vibrasphere

    I don't think it's the CSS/JS file amount, because I still get same with aggregation on with all files compressed into one.

    Also I don't think 'Load AOS library' option work under admin/config/user-interface/aosjs/settings ON or OFF it always loads the aos.js that comes with the module no matter what.

    With all selectors disabled and the setting to load library turned off it still loads the aosjs/lib/v2/aos.js and aos.css

  • Status changed to Needs review 7 months ago
  • 🇵🇱Poland mahyarss

    I'll check back to see if I can find the problem

  • Status changed to Fixed 7 months ago
  • 🇵🇱Poland mahyarss

    'Load AOS library' option bug fixed also i changed AOS init JavaScript file.
    Please check new release

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • 🇱🇹Lithuania vibrasphere

    The enable/disable option is working now thanks, but I still have problems with making fading on scroll working, etc. It could be problems with other modules maybe, like Flexslider (got multiple sliders) or maybe it's the Bootstrap sub-theme.

    Anyways, thanks for all the work.

    edit: I just noticed it doesn't work/fade when scrolling down, but it does fade down when I scroll back up from bottom to top, so it's like working backwards, the other way around, lol.

Production build 0.71.5 2024