Support

Account

Forum Replies Created

  • Interesting find, thanks for sharing John 🙂

  • Totally understandable re: shooting in the dark.

    Will try your troubleshooting suggestions soon as I can scrape together some time. Might even setup a fresh test environment for this to see if I can replicate on a different server.

  • No plugin is being used for the custom 404.php (I’m a theme developer FYI), the 404.php template is automatically displayed by WordPress when a page isn’t found as per WordPress’s template hierarchy.

    The custom 404.php only contains the header and footer includes with a short “Page not found, sorry about that” bit sandwiched in the middle.

  • Hi @hube2,

    The .htaccess has the basic WordPress parts:

    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    Good idea to check if any reserved names are being used. Looked into the site’s functions and plugins and everything looks prefixed to remove the chances of conflict with reserved names.

    The 404 URL is http://example.com/wp-admin/admin.php?page=example-settings, and the error page shown is our custom 404.php.

    Edit to add: When hitting the Update button on the settings page, usually `&message=1″ is appended to the URL to display the “Options Updated” notice. This doesn’t happen when the URL field error occurs.

    Thanks for investigating, John.

  • @hube2

    Having the same issue: Not on GoDaddy hosting, fine on localhost, but redirected to 404 on live when using URL fields on the options page. I have also used this setup on other sites, but not had this problem.

    I attempted your debugging steps; there was no array output, the redirect to 404 occurred. If this is a server-level problem I’m completely stumped.

  • I spent yesterday working through this exact same question.

    Here is what I found to work, applied to your case. Any PHP pros are welcome to optimise this. Note that I haven’t figured out the if statements, you should be able to get that working though.

    
    <?php 
    // Get repeater value
    $repeater = get_field('traditional_dining');
    
    // Obtain list of columns
    foreach ($repeater as $key => $row) {
    	$the_website[$key] = $row['website'];
    	$the_name[$key] = $row['name'];
    	$the_address[$key] = $row['address'];
    	$the_phone_number[$key] = $row['phone_number'];
    	$the_map_url[$key] = $row['map_url'];
    }
    
    // Sort the data by restaurant name column, ascending
    array_multisort($the_name, SORT_ASC, $repeater);
    
    // Display newly orded columns
    // Unsure if this is the optimal way to do this...
    foreach( $repeater as $row ) { ?>
    <div class="biz-module">
    	<h2><a href="<?php echo $row['website']; ?>" title="Visit the website for <?php echo $row['website']; ?>"><?php echo $row['name']; ?></a></h2>
    	<h3><a href="<?php echo $row['map_url']; ?>" title="Find <?php echo $row['name']; ?> on the map"><?php echo $row['address']; ?></a></h3>
    	<h4><?php echo $row['phone_number']; ?></h4>
    </div>
    <?php } ?>
    
Viewing 6 posts - 1 through 6 (of 6 total)