• Resolved joncon62

    (@joncon62)


    Hi Edgarrojas, I’m seeing some js errors in the console when a form is viewed as a guest, ie not logged in. The error I’m seeing is:

    Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'ImageType')

    This error doesn’t show when logged in. You can see the error on my live site by visiting https://snappytickets.co.uk/contact/

    Any idea what this could be?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author EDGARROJAS

    (@edgarrojas)

    Hello!

    That sounds to be a chache issue, if you have a cache/minify/optimize plugin please disable it or refresh its cache.

    Regards!

    Thread Starter joncon62

    (@joncon62)

    Ah good call, I’m using litespeed cache with js minification enabled. It looks like it was minifying your already minified assets in the dist folder. If I exclude RNMain from minification the errors go away.

    Isn’t the convention to name minified assets with .min in their filenames? I’m wondering if litespeed uses this to determine whether to minify the file. Your minified assets don’t include .min

    • This reply was modified 1 year, 2 months ago by joncon62.
    Plugin Author EDGARROJAS

    (@edgarrojas)

    Sorry i am not sure how litespeed works so i can’t tell, perhaps you can ask this in their support portal? If renaming the files would help with litespeed i can rename the files on a future update.

    Regards!

    Thread Starter joncon62

    (@joncon62)

    I asked Litespeed how they determine if files need minifying and they confirmed it is by filename, so minified files should have .min in the filename. Here is their full answer.

    yes, by default it takes all , except that has?.min.?in name , and certain attribute like?data-no-optimize?or?data-cfasync?will also bypass

    I’m sure other optimising plugins do similar so renaming the minified files (js and css) would be good for compatibility.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘uncaught error when not logged in’ is closed to new replies.