• Resolved xmiinc

    (@xmiinc)


    Finally got around to doing some edits on my site, when I by accident discovered that all my Page links (not regular posts) return an “Edit this page.” plaintext link instead of the text contained in the Page. wtf? When I click on it, it opens a blank page for writing in the Admin console.

    I hadn’t changed anything with respect to the links to Pages, and confirmed the php.

    I even modded the link from ‘../?page_id=xxx’ to ‘../?p=xxx’ and a regular post loads fine.

    The Pages themselves still exist as they show up in my Management console under the Pages tab, so the db is OK.

    I’ve traced where the displayed text is coming from (wp-content>themes>default>page.php) but not why the conditional statement appears to be failing and throwing this string. Its just a static page after all, and I’ve only really been messing with CSS on respective php files, along with adding a few HTML tags to format postmetadata.

    I’m now focusing on the htaccess file on the host server. I do NOT use permalinks, and it currently has permission 0644, along with all the other files in my root directory. But I’m not clear on what permissions it should have.

    Can anyone confirm whether these permissions are correct for a standard access website?

    Thanks in advance…

Viewing 4 replies - 1 through 4 (of 4 total)
  • Sean

    (@aristophanes)

    644 sounds right to me. It doesn’t sound like a .htaccess problem either.

    Do you have any formatting that is specific to pages in page.php? (i.e. Is it different to index.php?)

    One thing you could try is to temporarily rename pages.php (since you said you traced the problematic statement there) and see if the page loads okay using index.php (WP will default to index if it can’t find page). If it works, then just find the discrepancy in pages.php and replace it with the code in index.php

    Hope that helps.

    Thread Starter xmiinc

    (@xmiinc)

    Excellent idea, hadn’t thought of that! Now its giving me a more standard error…as if I’d asked for a private/restricted post or something. It’s a clue, at least.

    Those Pages were last edited about a year ago, and they worked then fine. And honestly, I haven’t done much of anything with the site since then, other than author posts.

    There are a couple of what I thought were minor html formatting attributes I added to index.php and archive.php earlier today that I could roll back and see if they somehow affected Pages behavior…?

    But I’m going to eat first b4 investigating further. I’ve been at this too many hours ;). I’ll report back when I find something. Thx again!

    Thread Starter xmiinc

    (@xmiinc)

    well…I rolled back the two minor formatting tweaks I put in the code (adding a couple of
    ‘s in sidebar.php, and a &nbsp in archive.php) but clicking any of my Pages still gives me the “Edit this entry” link which leads to a blank post page in the admin console. This even though the link itself shows the correct path to a Page when rolled over. Something’s getting mangled somewhere, though all I’ve been doing otherwise is messing with CSS… Can bad css mangle code?

    Here’s the conditional statement from page.php that is throwing up the ‘Edit this…’ message. As commented, I once replaced letters with arrow characters. It worked like this for the past couple of years. Is there anything that could be causing my current problem?

    <?php get_header(); ?>
    
    	<div id="content" class="narrowcolumn">
    
        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    		<div class="post">
    		<h2 id="post-<?php the_ID(); ?>"><?php the_title(); ?></h2>
    			<div class="entrytext">
    
    <!-- modded the_content() text to characters........................................... -->
    		<?php the_content('<p class="serif">&raquo;&raquo;&raquo;</p>'); ?>
    
    		<?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
    
    			</div>
    		</div>
    	  <?php endwhile; endif; ?>
    	<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
    	</div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>
    Thread Starter xmiinc

    (@xmiinc)

    big DOH! here…found out what was going on. I noticed the Pages associated with a category that I can’t delete (id=1) but don’t want to use, and therefore had made invisible a few months back…

    Sorry for the hot air…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘htaccess and Pages problem?’ is closed to new replies.