• Resolved joy0114

    (@joy0114)


    Hi,

    I’ve got a very simple wooommerce website which displays same pages for unlogged and logged users.
    The only differences are, of course cart, and a whislist button, and register/login button into menu.
    I’d like to serve maximum of content from public cache to logged users.

    I added a crawler with “customer” role, as all logged users have got this role.

    Recently, I change my hoster.
    With my previous hoster (with Litespeed ADC), I used ESI. And for a nice behavior with the whislist plugin, I added its nonce in “ESI nonce”, like this:

    ["stats_nonce","subscribe_nonce"]
    woosw* private
    woosw_key private
    woosw_* private
    woosw_vars* private
    woosw-security private

    With my present hoster (with Litespeed Enterprise), with same setup, I’ve got several errors:

    Uncaught ReferenceError: __litespeed_var_0__ is not defined
    Uncaught ReferenceError: __litespeed_var_1__ is not defined

    And in <head>:

    <script>var __litespeed_var_0__="[an error occurred while processing this directive]
    ",__litespeed_var_1__="[an error occurred while processing this directive]<script>

    Some issues appear concerning functionalities of theme, no more off-canvas menu for example:

    Uncaught TypeError: Cannot read properties of undefined (reading 'site_layout')
        at 31444d843fff5b34bb72332b835fd86b.js?ver=fd86b:1:19033
        at 31444d843fff5b34bb72332b835fd86b.js?ver=fd86b:1:19812
    (anonymous) @ 31444d843fff5b34bb72332b835fd86b.js?ver=fd86b:1
    (anonymous) @ 31444d843fff5b34bb72332b835fd86b.js?ver=fd86b:1
    jquery.min.js:2 jQuery.Deferred exception: Cannot read properties of undefined (reading 'off_canvas_enable') TypeError: Cannot read properties of undefined (reading 'off_canvas_enable')

    Or account menu (I suppose register/login menu):

    Uncaught TypeError: Cannot read properties of undefined (reading 'hf_account_action_type')
        at accountMenuToggle (31444d843fff5b34bb72332b835fd86b.js?ver=fd86b:1:12947)
        at 31444d843fff5b34bb72332b835fd86b.js?ver=fd86b:1:14047

    In switching of hoster, no configuration has changed on my side.

    But, all things considered, is there any interest in using ESI for me since, for logged-in users, the only private elements are their whislist and the “my account” menu (register/login)?
    Given that I already have a crawler with the “customer” role (i.e. logged-in user).

    Report: TCRMXFPL
    02/21/2024 12:17:07

    NB: with this report, ESI is OFF, otherwise, it lacks an important and needed off-canvas menu.

    Thanks for any advice.
    Best regards

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter joy0114

    (@joy0114)

    Hi,

    Here is debug.log lines concerning ESI:

    02/22/24 10:42:49.996 [x.x.x.107:53935 1 HTG] [ESI] Overwrite wp_create_nonce()
    02/22/24 10:42:50.334 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] ["stats_nonce","subscribe_nonce"]
    02/22/24 10:42:50.334 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] woosw.*
    02/22/24 10:42:50.334 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] woosw_key
    02/22/24 10:42:50.334 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] woosw_.*
    02/22/24 10:42:50.335 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] woosw_vars.*
    02/22/24 10:42:50.335 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] woosw-security
    02/22/24 10:42:50.335 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] wp_rest
    02/22/24 10:42:50.335 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] cmreg_registration_nonce
    02/22/24 10:42:50.335 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] role_nonce
    02/22/24 10:42:50.335 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] wdap-call-nonce
    02/22/24 10:42:50.335 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] seopress_cookies_user_consent_nonce
    02/22/24 10:42:50.335 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] swpmtxnonce
    02/22/24 10:42:50.335 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] wdt.*
    02/22/24 10:42:50.335 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] _vcnonce
    02/22/24 10:42:50.335 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] data-vc-public-nonce
    02/22/24 10:42:50.335 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] rating_nonce
    02/22/24 10:42:50.335 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] timeline_nonce
    02/22/24 10:42:50.335 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] blog_feed_nonce
    02/22/24 10:42:50.335 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] wsf_post
    02/22/24 10:42:50.335 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] edd\-.*
    02/22/24 10:42:50.335 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] edd_.*
    02/22/24 10:42:50.335 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] wpmenucart
    02/22/24 10:42:50.335 [x.x.x.107:53935 1 HTG] [ESI] Appended nonce action to nonce list [action] woocommerce-login
    02/22/24 10:42:50.607 [x.x.x.107:53935 1 HTG] [ESI] param  --- array (
      'action' => 'woosw-security',
      '_ls_silence' => true,
    )
    02/22/24 10:42:50.607 [x.x.x.107:53935 1 HTG] [ESI] md5_string=nonceprivateeyJhY3Rpb24iOiJ3b29zdy1zZWN1cml0eSIsIl9sc19zaWxlbmNlIjp0cnVlfQ==
    02/22/24 10:42:50.607 [x.x.x.107:53935 1 HTG] ?  ??  [BLock_ID] nonce 	[wrapper] wp_create_nonce woosw-security 		[Control] private
    02/22/24 10:42:50.607 [x.x.x.107:53935 1 HTG] ?  <esi:include src='/?lsesi=nonce&_control=private&esi=eyJhY3Rpb24iOiJ3b29zdy1zZWN1cml0eSIsIl9sc19zaWxlbmNlIjp0cnVlfQ%3D%3D&_hash=25f15d7317edbdf0b82683bcfe08163b' cache-control='private' as-var='1' />
    02/22/24 10:42:50.607 [x.x.x.107:53935 1 HTG] ?  Preserved to 8a8b81f2d5ef8417157ac8ca606cb3cd
    02/22/24 10:42:50.617 [x.x.x.107:53935 1 HTG] [ESI] param  --- array (
      'action' => 'woocommerce-login',
      '_ls_silence' => true,
    )
    02/22/24 10:42:50.617 [x.x.x.107:53935 1 HTG] [ESI] md5_string=nonceeyJhY3Rpb24iOiJ3b29jb21tZXJjZS1sb2dpbiIsIl9sc19zaWxlbmNlIjp0cnVlfQ==
    02/22/24 10:42:50.617 [x.x.x.107:53935 1 HTG] ?  ??  [BLock_ID] nonce 	[wrapper] wp_create_nonce woocommerce-login 		[Control] 
    02/22/24 10:42:50.617 [x.x.x.107:53935 1 HTG] ?  <esi:include src='/?lsesi=nonce&esi=eyJhY3Rpb24iOiJ3b29jb21tZXJjZS1sb2dpbiIsIl9sc19zaWxlbmNlIjp0cnVlfQ%3D%3D&_hash=acff65e7eabf2ce6d6c236d38eb5f698' as-var='1' />
    02/22/24 10:42:50.617 [x.x.x.107:53935 1 HTG] ?  Preserved to 25a86189229794b379654a93023ba21e
    02/22/24 10:42:51.043 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] ["stats_nonce","subscribe_nonce"]
    02/22/24 10:42:51.044 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] woosw.*
    02/22/24 10:42:51.044 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] woosw_key
    02/22/24 10:42:51.044 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] woosw_.*
    02/22/24 10:42:51.044 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] woosw_vars.*
    02/22/24 10:42:51.045 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] woosw-security
    02/22/24 10:42:51.045 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] wp_rest
    02/22/24 10:42:51.045 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] cmreg_registration_nonce
    02/22/24 10:42:51.046 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] role_nonce
    02/22/24 10:42:51.046 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] wdap-call-nonce
    02/22/24 10:42:51.046 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] seopress_cookies_user_consent_nonce
    02/22/24 10:42:51.046 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] swpmtxnonce
    02/22/24 10:42:51.046 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] wdt.*
    02/22/24 10:42:51.046 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] _vcnonce
    02/22/24 10:42:51.047 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] data-vc-public-nonce
    02/22/24 10:42:51.047 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] rating_nonce
    02/22/24 10:42:51.047 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] timeline_nonce
    02/22/24 10:42:51.047 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] blog_feed_nonce
    02/22/24 10:42:51.047 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] wsf_post
    02/22/24 10:42:51.048 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] edd\-.*
    02/22/24 10:42:51.048 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] edd_.*
    02/22/24 10:42:51.048 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] wpmenucart
    02/22/24 10:42:51.048 [x.x.x.107:53935 1 0d9] [ESI] Appended nonce action to nonce list [action] woocommerce-login
    02/22/24 10:42:51.458 [x.x.x.107:53935 1 0d9] ESI 0 WP_Widget_Custom_HTML: set off
    02/22/24 10:42:52.064 [x.x.x.107:53935 1 0d9] [ESI] replacing preserved blocks --- array (
      0 => '8a8b81f2d5ef8417157ac8ca606cb3cd',
      1 => '25a86189229794b379654a93023ba21e',
    )

    Do you see a problem anywhere ?

    Thanks a lot.
    Best regards

    Plugin Support qtwrk

    (@qtwrk)

    what if you open URLs as https://your_domain/?lsesi=nonce&esi=eyJhY3Rpb24iOiJ3b29jb21tZXJjZS1sb2dpbiIsIl9sc19zaWxlbmNlIjp0cnVlfQ%3D%3D&_hash=acff65e7eabf2ce6d6c236d38eb5f698

    in browser, what does it show ?

    Thread Starter joy0114

    (@joy0114)

    Hi Qtwrk,

    I suppose I have to access this url when ESI is activated ?
    Am I right ?
    Because at the moment, ESI is deactivated as it prevents some loading.
    And since activating ESI purges the cache, I have to do this at night instead.

    Thanks for your help.
    Best regards

    Thread Starter joy0114

    (@joy0114)

    Ok, I’ve activated ESI again, and result for this url is …

    fa84e135a4

    If ESI is deactivated, result is just the home page.

    I’ve deactivated ESI again because if I keep it running, it will cause problems for visitors.

    Thanks Qtwrk if you have any ideas !

    Plugin Support qtwrk

    (@qtwrk)

    update your nonce list

    stats_nonce
    subscribe_nonce
    woosw* private

    please try the default setting and only enable ESI , see if you still got javascript error.

    Thread Starter joy0114

    (@joy0114)

    Report : OCCBCGSP
    02/28/2024 13:36:46

    This report shows ESI activated.

    With this nonce list content :
    stats_nonce
    subscribe_nonce
    woosw* private

    Same issues, product filter and pop-up for whislist don’t work.

    Page footer gives:

    <!-- Page optimized by LiteSpeed Cache @2024-02-28 14:26:45 -->
    <!-- Page cached by LiteSpeed Cache 6.1 on 2024-02-28 14:26:44 -->
    <!-- X-LiteSpeed-Cache-Control: public,max-age=604800,esi=on -->
    <!-- Full varies: guest_mode:1+webp -->
    <!-- X-LiteSpeed-Tag: 61f_HTTP.200,61f_front,61f_URL./,61f_F,61f_Po.5307,61f_PGS,61f_ -->
    <!-- Object Cache  [total] 12371 [hit_incall] 11820 [hit] 79 [miss_incall] 207 [miss] 265 [set] 228 -->
    <!-- QUIC.cloud CCSS loaded ? /ccss/323ec620c9d8081e11049f454b395bf1.css -->

    And url you ask me to access, gives:
    ed3ce54d84

    Thanks again for your help !
    Best regards

    Plugin Support qtwrk

    (@qtwrk)

    please create a ticket by mail to support at litespeedtech.com with reference link to this topic , we will investigate further.

    Thread Starter joy0114

    (@joy0114)

    Hi Qtwrk,

    Ok, I’m going to do that.
    Thanks.
    Best regards

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘ESI issue’ is closed to new replies.