1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Error displayed on my wordpress site

Discussion in 'WordPress' started by pratik, Feb 21, 2023.

  1. #1
    Hello,

    I have recently setup a wordpress site and I am getting an error on the front end.

    }catch (ex){}
    https://quirke.one

    Can someone help me hide this error from the front end.


    Thanks.
     
    pratik, Feb 21, 2023 IP
  2. raksmart-hosting

    raksmart-hosting Peon

    Messages:
    21
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    3
    #2
    The error message you provided is a generic JavaScript catch block, which doesn't give much information about the actual error that is occurring on your website. To troubleshoot the error and hide it from the front end, you can try the following steps:

    1. Check the browser console: Open your website in a web browser and check the browser console for any error messages that are displayed. The console may provide more specific information about the error that is causing the catch block to be triggered.

    2. Disable plugins: Try disabling all of your WordPress plugins and see if the error message goes away. If it does, then you can re-enable each plugin one by one to identify the plugin that is causing the error.

    3. Check your theme: If the error message is still displayed after disabling all of your plugins, try switching to a default WordPress theme, such as Twenty Twenty-One. If the error goes away, then your theme may be the cause of the error.

    4. Update WordPress and plugins: Make sure that you are running the latest version of WordPress and all of your plugins. Outdated software can cause compatibility issues and errors.

    5. Contact your web hosting provider: If you are still unable to identify and resolve the error, contact your web hosting provider for assistance. They may be able to identify any server-side issues that are causing the error message to be displayed.
    By following these steps, you should be able to identify and resolve the error that is causing the catch block to be displayed on your website. Once the error is resolved, the catch block should no longer be displayed on the front end.
     
    raksmart-hosting, Feb 22, 2023 IP
  3. pratik

    pratik Notable Member

    Messages:
    2,305
    Likes Received:
    114
    Best Answers:
    0
    Trophy Points:
    200
    #3
    I did tried these steps but nothing worked :(
     
    pratik, May 15, 2023 IP
  4. pratik

    pratik Notable Member

    Messages:
    2,305
    Likes Received:
    114
    Best Answers:
    0
    Trophy Points:
    200
    #4
    Still facing the same error! Any WordPress experts out here to help me on this please
     
    pratik, Jun 25, 2023 IP
  5. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #5
    To me that looks like you've got your brackets wrong and the text is being treated as normal html. I couldn't see it on your site. Can you post a screen shot please?
     
    sarahk, Jun 25, 2023 IP
    pratik likes this.
  6. pratik

    pratik Notable Member

    Messages:
    2,305
    Likes Received:
    114
    Best Answers:
    0
    Trophy Points:
    200
    #6
    Here is the screenshot. The text appears on top left hand side
     

    Attached Files:

    pratik, Jun 25, 2023 IP
  7. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #7
    ok, thanks, so your page is displaying code that should be hidden. I'm guessing it's this:
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
    
      gtag('config', 'G-8RRET2MJ9Q');
    </script>
    
    <meta name="p:domain_verify" content="3bc8c3731d24ba8f0734d99f31f7a50e"/> }catch (ex){}</script>        <style type="text/css" id="wp-custom-css">
                .single-product span.sku_wrapper {
        display: none !important;
    }        </style>
            <style type="text/css" data-type="vc_custom-css">.image_max_width .vc_figure {
        max-width: 60%;
    }</style><noscript><style> .wpb_animate_when_almost_visible { opacity: 1; }</style></noscript></head>
    
    Code (markup):
    See how after the meta tag there's suddenly javascript?
    Even though it's in the head it's obviously junk and somehow got pasted in.
     
    sarahk, Jun 25, 2023 IP
  8. pratik

    pratik Notable Member

    Messages:
    2,305
    Likes Received:
    114
    Best Answers:
    0
    Trophy Points:
    200
    #8
    Thanks for identifying the error. I deleted all the custom headers using theme options, but still the error is seen :(
    I guess I have to edit the theme files?
     
    pratik, Jun 26, 2023 IP
  9. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #9
    I guess so.
     
    sarahk, Jun 26, 2023 IP
  10. Spartan14

    Spartan14 Active Member

    Messages:
    1,011
    Likes Received:
    97
    Best Answers:
    1
    Trophy Points:
    98
    #10
    I think its a very good idea to contact your host and ask for help ,did you try doing that ?
     
    Spartan14, Jun 26, 2023 IP
  11. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #11
    The hosting company isn't going to care. It's a simple template fix. If the theme has support that might be the way to go.
     
    sarahk, Jun 26, 2023 IP
  12. pratik

    pratik Notable Member

    Messages:
    2,305
    Likes Received:
    114
    Best Answers:
    0
    Trophy Points:
    200
    #12
    I got it corrected. It was a theme error.
    @Spartan14 Hosting company did not help :(
     
    pratik, Jul 9, 2023 IP