Home › Forums › Add-ons › Options Page › Options page save redirecting to 404 › Reply To: Options page save redirecting to 404
Since I am not seeing any problem with url fields on options pages, I can pretty confidently say that it is not ACF. I was trying to give you some things to look at to figure out why you are having this problem.
If you’re game, we can do some debugging to see what’s happening.
Step 1) Open the options page where you are seeing this problem, after the page loads, leave it open in your browser and go on to step 2
Step 2) Open the file /wp-admin/admin.php, the top of the file will look something like this
<?php /** * WordPress Administration Bootstrap * * @package WordPress * @subpackage Administration */ /** * In WordPress Administration Screens * * @since 2.3.2 */
After the opening PHP tag and a new line and insert
<?php echo '<pre>'; print_r($_POST); die; /** * WordPress Administration Bootstrap * * @package WordPress * @subpackage Administration */ /** * In WordPress Administration Screens * * @since 2.3.2 */
Step 3) Return to your browser, enter a value that you know is going to cause a redirect in the browser. Click update.
If the problem is something in WP you will see the posted array output. If you get redirected then the redirect is happening before the page is loaded and is happening on the server level before the updated gets to WP.
Do the test and let me know what happens.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
CPT registration is coming to ACF! We demoed the new feature during the most recent session of ACF Chat Fridays. Check out the summary for the details. https://t.co/k2KQ3WWBAz— Advanced Custom Fields (@wp_acf) March 7, 2023
© 2023 Advanced Custom Fields.