• Resolved jeng22

    (@jeng22)


    First, awesome plugin!

    I recently encountered an issue where attempting to save the code snippet redirected me to a 403 page. Below are the codes:

    <!--<a class='btn btn-link-small' role="button">Email Quote</a>&nbsp;&nbsp;<a class='btn btn-link-small' id="txtBooking">Make a Booking</a>-->
    
    <a class='btn btn-link-small' role="button" onclick='javascript:emailquote();'>Email Quote</a>  <a class='btn btn-link-small' onclick='booknow()' id="txtBooking">Make a Booking</a>

    Interestingly, the commented code can be saved without any issues. Contrary to suggestions in other threads, I did not find any modsec hits, the firewall is clear, and I am not using a CDN. If needed, I can provide the information from the DevTools Network tab.

    Any help is appreciated. Thanks!

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

    (@gripgrip)

    Hi @jeng22,

    Thank you, we’re happy to hear you enjoy the plugin.

    From the error you are getting and the behaviour you described it’s almost certainly that the code you are trying to add is triggering some security check. Are you using any custom rules in your .htaccess file that might be catching some types of code?

    Thread Starter jeng22

    (@jeng22)

    Hey @gripgrip thanks for your response, the only customizations on my htaccess files are the ones written by another plugin (WP Rocket).

    Other than that it’s just the usual content. I also tried commenting out everything in my htaccess file to check if it works but to no avail.

    Please let me know if you need more info. I can also send the network headers from Google devtools if needed.

    Other things I tried:
    Disabling all other plugins.
    Disabling and reenabling WPCode
    Switching to wp default theme

    Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @jeng22,

    Thank you for the details, usually in such cases it helps to reach out to your hosting provider support to ask them if they can whitelist the pages/endpoints used by WPCode to update the snippets since this is a server-level error – would it be possible to try that? I don’t know what environment you are using for hosting your website but there’s a server level rule that is preventing you from saving that snippet.

    Thread Starter jeng22

    (@jeng22)

    Hey @gripgrip ,
    Unfortunately, I’m not able to do that.

    I have instead thought of a workaround. Posting it here for the people who might experience the same issue and situation.

    Used an alternative approach to call the function using javascript and event listeners, which bypassed the 403 redirection.

    Marked as solved as well. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘conflict’ is closed to new replies.