#54690 Updating code in HTML Code block yields server error

Landing Forums JupiterX WordPress Theme Updating code in HTML Code block yields server error

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • Deep Sky Vineyard

    I am trying to update some integration code on all of this clients wine vintage pages (shopping cart pages). Apparently Apple/Google, etc. changed the way that their browsers handle cookies and this shopping cart vendor had to update their integration code.

    When I attempt to update the code in the HTML Code element and save the page, I receive a Server Error (403 error). (see attached screenshot)

    I have inserted the old code and new code in a zip file and attached that as well.

    The pages in question are the “Our Wine – 20xx” pages. The code in the file belongs to the “Our Wine – 2017” page.

     

    Deep Sky Vineyard

    I accidentally hit submit instead of attach file. Here is the code in question…

    Deep Sky Vineyard

    I just wanted to give you all a heads up. For whatever reason, the WordPress/Elementor “Custom HTML” element does not like any of that code, old or new. I even updated WordPress, every plugin, and even made the latest PHP available in an effort to eliminate those as potential issues.

    I had to manually insert the new code directly into the MySQL table for the respective shopping cart post/pages for each of the vintages of our Deep Sky Vineyard wines of our WordPress website.

    I don’t know if, with the latest version of Elementor and Jupiter X stuff, there is something awry with being able to add custom HTML/Script code in the Custom HTML element…but adding the respective code directly into the respective MySQL table seems to have fixed our issues.

    Hopefully I won’t have to do this too often before a fix becomes available.

    If anyone can offer any insight as to why this was an issue and if there might be a fix on the horizon, I would greatly appreciate it…

    Deep Sky Vineyard

    This turned out to be a Wordfence WAF issue. I have resolved this on my own, and I will post here the steps I took to resolve it in case you all would like to add it to your resources.
    <div><b><span style=”font-size: large;”>Fixing Server Error (403 error) by Whitelisting in Wordfence</span></b></div>
    <div></div>
    <div>If you are editing in WordPress, working with widgets/elements (Elementor), and get an error while attempted to save or update your page, you are running into Wordfence’s firewall. It’s meant to protect your WordPress site from outside attacks, but sometimes can become a bit over-aggressive and block you as well. It does have a learning mode that will allow more things in the first week after you set everything up, but if you don’t add widgets/elements in that time, it will block the action because it doesn’t recognize it.</div>
    <div></div>
    <div>If you are using Elementor, the error will look something like thi. Similar errors may happen with other WordPress page builders, and the fix is the same:</div>
    <div>
    <div></div>
    <div>ServerError(403 error).png</div>
    </div>
    <div></div>
    <div>To fix this, go to WordFence in your WordPress admin and whitelist the save request so it can include widgets.</div>
    <div></div>
    <div><b>Method 1 – Whitelist admin-ajax.php</b></div>
    <div>

    1. Go to Wordfence > All Options
    2. Go down to the Whitelisted URLs section
    3. Enter <span style=”color: #990000;”>/wp-admin/admin-ajax.php</span> in the URL box
    4. Select <span style=”color: #990000;”>Param Type: POST Body</span> from the dropdown (if it’s not already selected)
    5. Enter <span style=”color: #990000;”>actions</span> for the Param Name
    6. Click the Add button
    7. Click Save Changes in the upper top right corner of the Wordfence settings

    </div>
    <div>Wordfence1.png</div>
    <div></div>
    <div><b>Method 2 – Whitelist by recent traffic</b></div>
    <div></div>
    <div>If the first method didn’t work or there is a different request involved, you can find this traffic at the time you receive the 403 error and whitelist that.</div>
    <div></div>
    <div>
    <div>Wordfence2.png</div>
    </div>
    <div>

    1. Go to Wordfence
    2. Click on the Tools menu item
    3. Click on the Live Traffic tab (if it isn’t already where you end up). This view shows all of the recent traffic to your site
    4. Filter the traffic to “Blocked By Firewall”
    5. Click on the request you just made to save the page in your page builder–it will usually be the most recent request and from your general locale
    6. Double check that it was actually you making the request
    7. Whitelist the request

    </div>
    <div>Wordfence3.png</div>
    <div></div>
    <div>That’s it! You should be all set to continue adding your custom code, widgets, elements, whatever.</div>

    Nodari Support Team

    Hey there

     

    First of all, thank you for sharing your solution, it’s highly appreciated, indeed, I can recall similar problems its a known issue with the wordfence and Elementor 🙂

    Thank you once again and have a great day

Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.
Login