403 error on save in elementor
-
on save the template with post widget and filter widget “Failed to load resource: the server responded with a status of 403 ()” and
web-cli.min.js?ver=3.29.2:3 {readyState: 4, getResponseHeader: ƒ, getAllResponseHeaders: ƒ, setRequestHeader: ƒ, overrideMimeType: ƒ, …}
cant save the template, no works
-
Hi @sermalefico,
Thanks for reporting the issue. A 403 error typically indicates that the server is actively blocking access, usually due to permissions, security rules, or misconfigurations. Here are a few things you can check:
Check File/Folder Permissions, you can verify this via FTP or your hosting file manager, usually 755 for folders and 644 for files.
Inspect the .htaccess file, as a misconfigured .htaccess file in your WordPress folder might be causing this. Try renaming it .htaccess_backup and regenerate a fresh one via WordPress Settings > Permalinks.
Clear Browser Cache: Old browser data can sometimes trigger errors. Clear your cache or try a different browser.
Disable Firewall Temporarily: If you are using a plugin such as Wordfence, you can try disabling it temporarily.
You can also try to enable the WP_DEBUG in your wp-confing file, to check error logs for specific clues about the 403 error.
If the issue persists, I’d recommend contacting your hosting provider. Share the exact time of the error and the affected URL, they can usually pinpoint the cause in their logs.
Let me know what you find or if you need help with any of the above steps.
Best,
DaraYes, that’s true. I think I’ve fixed it, but on another website I’m working on locally, the pagination doesn’t return posts when clicked. {success: false, data: {message: “Failed to fetch content”}} data : {message: “Failed to fetch content”} success : false
Hi @sermalefico,
Glad to hear you resolved the 403 error. Regarding the new pagination issue on your local site, I would a bit more info, as this could involve either the post widget or filter widget pagination. Could you clarify:
-Which widget is affected? Is it the BPFWE post widget or is it from the pagination generated by the filter widget?
-Is this happening on an archive, single page, or another CPT, and what query type was in use?
-Backend/frontend: is the issue only happen in the Elementor backend, or does it also occur on the frontend as well?If it’s backend-specific, can you share any extra URL parameters you notice when the error occurs. This issue may happen in the backend due to URL arguments added by Elementor, but usually works fine on the live site/frontend. To test, you can check if the pagination works on the frontend, you can also try to manually remove the arguments from the URL.
Another cause for this could be a slug conflict. For example, a page named “product” and an archive slug /product/.
Let me know if you have more details, so I can help you narrow down this issue.
Best,
DaraI still can’t get pagination to work… I’ve updated to the latest version, and I’m using the Hello theme, Woo, all in a clean install. It seems that the first interaction before filtering causes pagination to not work. It also seems that once filtered, pagination works, but when you return to the initial value, it breaks again. Another thing is that the Sort widget doesn’t respect what was previously filtered.
Hi @sermalefico,
Thanks a lot for your detailed report and the screen recording, that really helped pinpoint the problem.
After reviewing everything, I can confirm that the pagination issue you’re experiencing is related to the way the post widget handles the same-domain pagination. I use
wp_safe_remote_get()to get the page content instead of the jQuery$.get(). This works well under normal conditions, but can fail silently if the request is being blocked.This could be the case if:
- The site is behind a “Coming Soon” or “Under Construction” mode
- HTTP Basic Auth or maintenance plugins are active
- Redirects or IP restrictions are in place
Could you please try temporarily disabling anything that could potentially block access to the website (coming soon plugin, password protection, etc.), including custom functions/.htaccess rules, and then check if pagination works again?
Optionally, you could try modify the AJAX file under
/inc/classes/class-bpfwe-ajax.phpand replace the request block with a modified version, from line 600 to 606:$response = wp_safe_remote_get( $page_url, [ 'cookies' => $cookies, 'timeout' => 30, 'redirection' => 3, 'blocking' => true, 'headers' => [ 'User-Agent' => 'Mozilla/5.0 (WordPress AJAX Fetch)', 'Cache-Control' => 'no-cache', ], ] );This version adds a custom User-Agent, allows redirects, and uses a longer timeout.
Let me know if this work for you.
Best,
DaraHi @nomade123456 ,
Thank you so much for your prompt and detailed reply. I really appreciate you confirming the use of wp_safe_remote_get() and outlining the potential failure points.
I have verified my setup, and I can confirm that I am not using any “Coming Soon” plugins, HTTP authentication, or any .htaccess rules that would cause a block. The issue occurs in a clean local development environment (Laragon) that uses a self-signed SSL certificate.
After further investigation, I was able to confirm that the root cause in this specific environment is indeed SSL certificate validation. The wp_safe_remote_get() call fails because PHP cannot verify the local certificate against a trusted Certificate Authority (CA).
I tested the modification you suggested (increasing the timeout, adding headers, etc.), but as suspected, it did not resolve the issue since it doesn’t address the SSL verification.
However, I have found the solution that works perfectly in the local environment: adding ‘sslverify’ => false to the request arguments.
$response = wp_safe_remote_get(
$page_url,
[
'cookies' => $cookies,
'timeout' => 15,
'sslverify' => false // <-- This is the key line that fixes it
]
);I completely understand that sslverify => false is not a suitable solution for a production environment. For this reason, and based on this entire analysis, I would like to reiterate my previous suggestion:
Would you consider refactoring the pagination logic to use a direct WP_Query (similar to how the post_filter_results function works) instead of an internal HTTP request?
This would not only solve this SSL issue definitively and elegantly but would also make the pagination more efficient and robust across all environments, eliminating this class of errors entirely.
If you decide to keep the current architecture, an intermediate solution could be to implement conditional logic so that ‘sslverify’ => false is only applied in non-production environments, for example, by checking wp_get_environment_type().
Thank you again for your help and your excellent support.
Best regards,
Sermalefico
Hi @sermalefico,
You’re absolutely right, in hindsight, my original pagination approach was definitely overcooked. With the filter in place, the solution was simple and will be included in the next version.
Thanks for your insightful feedback and suggestions.
Regards,
DaraHi @sermalefico,
Thanks again for your suggestions. I’ve implemented the improvements you recommended in the latest version to address the pagination and SSL issues.
If you encounter anything else or need further assistance, feel free to reach out anytime.
Best regards,
Dara
The topic ‘403 error on save in elementor’ is closed to new replies.