SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    Keep Moving Forward gold trophysilver trophybronze trophy
    Shaun(OfTheDead)'s Avatar
    Join Date
    Nov 2005
    Location
    Trinidad
    Posts
    3,746
    Mentioned
    45 Post(s)
    Tagged
    0 Thread(s)

    Wordpress Pages Work, but 404 Error on Posts in Some Browsers

    Hello!

    I have a baffling problem I've never encountered before.

    I'm developing a new Wordpress website, doing almost everything I've done a dozen times before on the same server, but somehow I'm getting a 404 error when trying to view Posts. And only posts. Pages work fine. And here's the baffling part, it's different across the browsers! Why should a server configuration error be browser-specific?

    It seems I could view my single Posts just fine on Firefox, but on Internet Explorer, Chrome and Android Mobile, I'm getting the 404s.

    I have a single.php file made.

    I tried uploading the site to a different server. I tried re-saving the Permalinks settings inside of Wordpress. I tried manually deleting and retyping the .htaccess file. I tried copying a working .htaccess file from another website.

    I even tried going back to the default Permalinks setting, which, maddeningly, doesn't work either! Somehow the Pages are still working cross-browser just fine (website.com/index.php?page_id=123) but still getting 404s in IE, Chrome, mobile when trying to view Posts (website.com/index.php?p=123)!

    argh! I have no idea what to do!

    Any further suggestions anyone?

    What might the problem be? And why would it be different across browsers?!
    Trying to fill the unforgiving minute
    with sixty seconds' worth of distance run.

    Update on Sitepoint's Migration to Discourse

  2. #2
    Keep Moving Forward gold trophysilver trophybronze trophy
    Shaun(OfTheDead)'s Avatar
    Join Date
    Nov 2005
    Location
    Trinidad
    Posts
    3,746
    Mentioned
    45 Post(s)
    Tagged
    0 Thread(s)
    Wait! I know what's wrong!

    For this website I'm using Posts in a different way than I'm used to; Which is all of the Posts represent upcoming events and therefore have future dates.

    Therefore, when trying to view a single Post that Wordpress thinks is scheduled (therefore not yet published) while not logged in, it'd return a 404 error. The reason it's been showing on Firefox? I'm logged into Wordpress on Firefox.

    So now what I really need to figure out is how to force Wordpress to display those schedules Posts!
    Trying to fill the unforgiving minute
    with sixty seconds' worth of distance run.

    Update on Sitepoint's Migration to Discourse

  3. #3
    Keep Moving Forward gold trophysilver trophybronze trophy
    Shaun(OfTheDead)'s Avatar
    Join Date
    Nov 2005
    Location
    Trinidad
    Posts
    3,746
    Mentioned
    45 Post(s)
    Tagged
    0 Thread(s)
    aha! Here we go. A plugin that changes the status of scheduled posts from 'future' to 'published'.

    http://wordpress.org/plugins/no-future-posts/
    Trying to fill the unforgiving minute
    with sixty seconds' worth of distance run.

    Update on Sitepoint's Migration to Discourse

  4. #4
    Keep Moving Forward gold trophysilver trophybronze trophy
    Shaun(OfTheDead)'s Avatar
    Join Date
    Nov 2005
    Location
    Trinidad
    Posts
    3,746
    Mentioned
    45 Post(s)
    Tagged
    0 Thread(s)
    - Thanks for your help, Shaun.

    - No problem Shaun!
    Trying to fill the unforgiving minute
    with sixty seconds' worth of distance run.

    Update on Sitepoint's Migration to Discourse

  5. #5
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,140
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)
    Glad you two got it sorted.

    The links for Scheduled posts shouldn't be getting shown until they're Published (except in the ACP), no?

  6. #6
    Keep Moving Forward gold trophysilver trophybronze trophy
    Shaun(OfTheDead)'s Avatar
    Join Date
    Nov 2005
    Location
    Trinidad
    Posts
    3,746
    Mentioned
    45 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mittineague View Post
    Glad you two got it sorted.

    The links for Scheduled posts shouldn't be getting shown until they're Published (except in the ACP), no?
    It's a website about hiking and to make things more user-friendly for the administrator, I renamed 'Posts' to 'Hikes' and wanted to use the publish date as the date for when the events are carded.

    I'd originally found a way to make wp_query display links to the future posts like this:


    Code:
    	// Create WP_Query
    		$args = array(
    			'category_name' => 'my-category',
    			'post_status' => 'future',
    			'orderby' => 'date',
    			'order' => 'ASC',
    			'posts_per_page' => 3
    		);
    	
    		$my_query = new WP_Query($args);
    Although I need to throw that out now that I have that plugin installed (linked above).

    The 'post_status' on the database for scheduled posts is now no longer 'future', so I'll have to find some way to search records by the date instead.
    Trying to fill the unforgiving minute
    with sixty seconds' worth of distance run.

    Update on Sitepoint's Migration to Discourse


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •