• Resolved astereo

    (@astereo)


    I’m in need of help very quickly…

    I run a full site on WordPress, and only recently I began running into some trouble. I was forced to restore the WP database back in mid-May, but I didn’t do much posting because I was busy working on a new design. Since the new redesign launch I’ve been posting much more, and I noticed a lot of problems. Posts will occasionally disappear (Ex: I posted an interview with Jonathan Snook, and after 5 minutes, it wasn’t showing any interview content except the picture I was using on the interview page). I also had to go back and re-posts some old posts to get them to display right in the new design, even though they should have without needing to do this. All this seems to point to database issues, so I’m considering doing a fresh install of WordPress..

    Only problem is, my site has over 300 posts, 1,700 comments, tons of images, 20 categories, and a bunch of pages. Simply backing up the database in phpmyadmin would most likely not solve the problem, because it would just be replacing everything with the corrupted tables. Next, WordPress’ export function I know doesn’t link images with the correct post (or something like that). I’ve seen a plugin that adds in some of these extras functions, but now I can’t seem to find it again. And, either way, would the WordPress export / import be any better than re-uploading the databases, or would it result in the same type of problems? I really need a solution. Thanks in advance!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter astereo

    (@astereo)

    It could also be a problem with the WordPress uploader…looking at the XML, it seems to be linking posts to uploaded items instead of actual post content…but I’m not sure if simply reupload WP Upload files will do anything…

    <item>
    <title>Jonathan Snook</title>
    <link>https://www.devlounge.net/interviews/jonathan-snook/</link>
    <pubDate>Sat, 30 Jun 2007 13:27:49 +0000</pubDate>
    <dc:creator>aj</dc:creator>
    
    		<category><![CDATA[Homepage News]]></category>
    
    <guid isPermaLink="false">https://www.devlounge.net/wp-content/uploads/2007/06/snooklarge.gif</guid>
    <description></description>
    <content:encoded><![CDATA[SNOOKPSLA]]></content:encoded>
    <wp:post_id>971</wp:post_id>
    <wp:post_date>2007-06-30 08:27:49</wp:post_date>
    <wp:post_date_gmt>2007-06-30 13:27:49</wp:post_date_gmt>
    <wp:comment_status>open</wp:comment_status>
    <wp:ping_status>open</wp:ping_status>
    <wp:post_name>jonathan-snook</wp:post_name>
    <wp:status>inherit</wp:status>
    <wp:post_parent>103</wp:post_parent>
    <wp:menu_order>0</wp:menu_order>
    <wp:post_type>attachment</wp:post_type>
    <wp:postmeta>
    <wp:meta_key>_utw_tags_0</wp:meta_key>
    <wp:meta_value>no tags</wp:meta_value>
    </wp:postmeta>
    <wp:postmeta>
    <wp:meta_key>_wp_attachment_metadata</wp:meta_key>
    <wp:meta_value>a:5:{s:5:"width";i:220;s:6:"height";i:120;s:14:"hwstring_small";s:23:"height='69' width='128'";s:4:"file";s:67:"/home/dlounge/public_html/wp-content/uploads/2007/06/snooklarge.gif";s:5:"thumb";s:24:"snooklarge.thumbnail.gif";}</wp:meta_value>
    </wp:postmeta>
    <wp:postmeta>
    <wp:meta_key>_wp_attached_file</wp:meta_key>
    <wp:meta_value>/home/dlounge/public_html/wp-content/uploads/2007/06/snooklarge.gif</wp:meta_value>
    </wp:postmeta>
    	</item>
    Thread Starter astereo

    (@astereo)

    Any help?

    It’s probably better to figure out what’s wrong than hoping a rebuild or export/import solves it.

    Why did you have to restore the DB in May? Perhaps the problem started then?

    Thread Starter astereo

    (@astereo)

    Seems like the post disappearing problem had to do with some odd problem with my Interviews page overwritting individual posts. (See https://www.devlounge.net/interviews). As you can see, I had edited the Interviews page in WordPress with new images and links everytime I published a new interview. Not sure why, but that would frequently cause the actual interview article to be overwritten with just the image that was posted on the Interviews page itself.

    Anyways, I’m now updating the Interviews page manually, and I took out all the WordPress loop code from it (so I’m just hand coding new stuff into it). The only other problem now is when posts sometimes (not all the time) cause the design to screw up, and the sidebar to end up below the content and not styled. I don’t think there’s anything wrong with my single post template, but here it is anyway. If something seems out of place, let me know.

    <?php get_header(); ?>
    
    <div id="slim"></div>
    
    <div id="page">
      <div class="content">
        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
        <div class="post" id="post-<?php the_ID(); ?>">
          <h2>
            <?php the_title(); ?>
          </h2>
          <div class="meta">
            <p>
              <?php the_time('l, F jS, Y') ?>
              <?php the_time() ?>
              by
              <?php the_author(); ?>
              <img src="<?php bloginfo('template_directory'); ?>/assets/print.png" alt="Print this Article" /> <a href="javascript:print()">Print this page</a> <img src="<?php bloginfo('template_directory'); ?>/assets/comment.png" alt="Comments" /> <a href="#comment">Comment</a></p>
          </div>
          <div class="entry">
            <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?> <img src="<?php bloginfo('template_directory'); ?>/assets/dltab.gif" alt="End of Article. Copyright Devlounge." />
            <?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
          </div>
        </div>
    <div style="clear: both"></div>
    <?php comments_template(); ?>
    
    	<?php endwhile; else: ?>
    
    		<p>Sorry, no posts matched your criteria.</p>
    
    <?php endif; ?>
    </div>
    <?php get_sidebar(); ?>
    <div style="clear: both"></div>
    </div>
    <?php get_footer(); ?>
    Thread Starter astereo

    (@astereo)

    And heres the comments template which could also be contributing to the odd display problems

    <?php if (!empty($post->post_password) && $_COOKIE['wp-postpass_'.COOKIEHASH]!=$post->post_password) : ?>
    
    <p id="comments-locked">Enter your password to view comments.</p>
    <?php return; endif; ?>
    <?php if ($comments) : ?>
    <?php
    	/* Count the totals */
    	$numPingBacks = 0;
    	$numComments  = 0;
    
    	/* Loop throught comments to count these totals */
    	foreach ($comments as $comment) {
    		if (get_comment_type() != "comment") { $numPingBacks++; }
    		else { $numComments++; }
    	}
    
    	/* Used to stripe comments */
    	$thiscomment = 'odd';
    ?>
    <?php 
    
    	/* This is a loop for printing comments */
    	if ($numComments != 0) : ?>
    <div class="comments">
      <?php foreach ($comments as $comment) : ?>
      <?php if (get_comment_type()=="comment") : ?>
      <div class="one">
    <li id="comment-<?php comment_ID(); ?>">
        <div class="head">
          <div class="comment-author">
            <img src="<?php bloginfo('template_directory'); ?>/assets/cmember.png" alt="Comment Author" /> <?php comment_author_link() ?>
          </div>
          <div class="comment-date">
            <img src="<?php bloginfo('template_directory'); ?>/assets/ctime.png" alt="Post Time" /> <?php comment_date() ?> at <?php comment_time('g:i a'); ?> <a href="#comment-<?php comment_ID() ?>" title="Permalink to this comment">(permalink)</a></div>
          <div style="clear: both"></div>
        </div>
        <div class="comment">
    <?php if ($comment->comment_approved == '0') : ?>
    			<div class="alert">Your comment is awaiting moderation, there is no need to repost.</div>
    			<?php endif; ?>
          <?php comment_text(); ?>
        </div>
    </li>
    	</div>
        <?php endif; endforeach; ?>
        <div style="clear: both"></div>
      <?php endif; ?>
    </div>
    <div style="clear: both"></div>
    <div class="permas">
    <?php
    
    	/* This is a loop for printing pingbacks/trackbacks if there are any */
    	if ($numPingBacks != 0) : ?>
      <?php foreach ($comments as $comment) : ?>
      <?php if (get_comment_type()!="comment") : ?>
      <li id="comment-<?php comment_ID() ?>">
        <?php comment_type(__('Comment'), __('Trackback'), __('Pingback')); ?>
        :
        <?php comment_author_link(); ?>
        on
        <?php comment_date(); ?>
      </li>
      <?php endif; endforeach; ?>
    <?php endif; ?>
    </div>
    <?php else : 
    
    	/* No comments at all means a simple message instead */
    ?>
    <div class="nocomment">
    <h3>No Comments Yet</h3>
    <p>We like hearing what you have to say. Please consider commenting.</p>
    </div>
    <?php endif; ?>
    <?php if (comments_open()) : ?>
    <div class="theform">
    <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
    <p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</p>
    <p><label for="openid_url_comment_form">You can login with your OpenID!</label><br/>
     <input style="background: url(<?php echo OPENIDIMAGE; ?>) no-repeat;
     background-position: 0 50%;" type="text" name="openid_url" id="openid_url_comment_form" size="22" />
     <input name="submit" type="submit" value="Login" /></p>
    <?php else : ?>
    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
      <?php if ( $user_ID ) : ?>
      <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout &raquo;</a></p>
      <?php else : ?>
      <p>
        <input type="text" class="field" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" />
        <label for="author"><small>Name
        <?php if ($req) echo "(required)"; ?>
        </small></label>
      </p>
      <p>
        <input type="text" name="email" class="field" id="email" value="<?php echo $comment_author_email; ?>" size="22" />
        <label for="email"><small>Mail (will not be published)
        <?php if ($req) echo "(required)"; ?>
        </small></label>
      </p>
      <p>
        <input type="text" class="field" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" />
        <label for="url"><small>Website</small></label>
      </p>
      <?php endif; ?>
      <p>
        <textarea name="comment" id="comment" class="tb">
    </textarea>
      </p>
      <p>
        <input name="submit" type="submit" id="submit" value="Submit Comment" />
        <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
      </p>
      <script type="text/javascript">
      var blogTool               = "WordPress";
      var blogURL                = "<?php echo get_option('siteurl'); ?>";
      var blogTitle              = "<?php bloginfo('name'); ?>";
      var postURL                = "<?php the_permalink() ?>";
      var postTitle              = "<?php the_title(); ?>";
      <?php if ( $user_ID ) : ?>
          var commentAuthor          = "<?php echo $user_identity; ?>";
      <?php else : ?>
          var commentAuthorFieldName = "author";
      <?php endif; ?>
      var commentAuthorLoggedIn  = <?php if ( !$user_ID ) { echo "false"; }
                                         else { echo "true"; } ?>;
      var commentFormID          = "commentform";
      var commentTextFieldName   = "comment";
      var commentButtonName      = "submit";
      var cocomment_force        = false;
      </script>
      <?php do_action('comment_form', $post->ID); ?>
    </form>
    </div>
    <div class="rules">
    <p> Note: If you are commenting here for the first time, your comment will be sent into a moderation queue before being published. Please use your email address in order to identify yourself for your future comments. <strong>Clean XHTML:</strong> Use standards ready code tags in your comments. For example, cite a comment or phrase from an article with < blockquote > tags.</p></div>
    <?php endif; // If registration required and not logged in ?>
    <?php else : // Comments are closed ?>
    <p id="comments-closed">Sorry, comments for this entry are closed at this time.</p><?php endif; ?><div style="clear: both"></div>
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Big problems on big blog, need help’ is closed to new replies.