• Resolved frankaell

    (@frankaell)


    The site I’m working on uses the Flex Mag theme, and includes infinite scrolling. When logged in users view pages (this is wp-admin logged in users) and scrolls down enough to activate the infinite scrolling (which isn’t very far), swcfpc items with unique ids get reloaded which causes a whole lot of errors:

    16623:1 Uncaught SyntaxError: Identifier 'swcfpc_ajax_url' has already been declared

    Uncaught SyntaxError: Identifier 'swcfpc_toolbar_cache_status_tries' has already been declared

    These errors (among others) causes the page layout to completely fall apart.

    Unfortunately there isn’t a way to disable infinite scrolling for only logged in users on the theme, and I can’t find any way to stop these elements from loading when logged in (I’m assuming they’re necessary to prevent caching being done when users are logged in).

    We’ve only switched very recently to Super Page Cache (only around a week), but the the issues its been causing for logged in users means I’ll have to disable the plugin because it’s making previewing/reviewing page content unusable for the people that produce content on the site.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    Hi @frankaell,
    First of all, that should not happen unless your infinite scroll code is loading the whole webpage on scroll (which is super wired), beside even if it happen, this should not cause any layout issues as this plugin has nothing to do with layout.

    Can you share one of your webpage URL where I can test the infinite scrolling and see what’s going on?

    Thread Starter frankaell

    (@frankaell)

    My hunch is that it is loading the full page unfortunately:

    https://www.mediaweek.com.au/tv-ratings-may-7-2023-masterchef/?swcfpc=1

    Here’s the link, though since you won’t be logged in, there won’t be a way to replicate it.

    I’ve edited the theme file to set infinite scrolling to false when logged in – though not a long-term solution (since the change will be removed if we ever update the theme)

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @frankaell,
    As I can see you are currently using the swcfpc cache buster query parameter. If you are using the latest version of the plugin I would suggest you to take advantage of the new system where you can use the plugin without the cache buster: https://gist.github.com/isaumya/af10e4855ac83156cc210b7148135fa2

    Try that out and se if it resolves your issue.

    Thread Starter frankaell

    (@frankaell)

    I’ll give it a go – in the intermediary, I’ve just overwritten the option when the user is logged in so that infinite scrolling will not turn on for logged in users.

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @frankaell,
    That’s great. Let me know your findings. ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Major display issues for logged in users (Infinite scrolling)’ is closed to new replies.