John Huebner
Forum Replies Created
-
Forum: Plugins
In reply to: [Manual Related Posts] [Plugin: Related] Conflict with SEO All In One PackYou can see the explanation of why this plugin is causing the problem in the thread I posted in the seoaiop support. http://wordpress.org/support/topic/plugin-all-in-one-seo-pack-data-disappears-on-pagepost-edit?replies=5#post-3138931
Has to do with altering the global post id.
I rewrote the function that displays the related meta field on the post page. the important bit is after the query, rather that use the_post(), which overwrites the global post id I just loop through the results returned by the query.
// Creates the output on the post screen
public function displayMetaBox() {global $post;
$post_id = $post->ID;// Get related posts if existing
$related = get_post_meta($post_id, ‘related_posts’, true);if (!empty($related)) {
echo ‘<div id=”related-posts”>’;
foreach($related as $r) {
$p = get_post($r);
?>
<div class=”related-post” id=”related-post-<?php echo $r; ?>”>
<input type=”hidden” name=”related-posts[]” value=”<?php echo $r; ?>”>
<span class=”related-post-title”><?php echo $p->post_title; ?> (<?php echo ucfirst(get_post_type($p->ID)); ?>)</span>
Delete
</div>
<?php
} // end foreach post
echo ‘</div>’;
} // end if !empty$query = array(
‘nopaging’ => true,
‘post__not_in’ => array($post_id),
‘post_status’ => ‘publish’,
‘posts_per_page’ => -1,
‘post_type’ => ‘any’,
‘orderby’ => ‘title’,
‘order’ => ‘ASC’
);$p = new WP_Query($query);
$count = count($p->posts);
if ($count > 0) {
?>
<p>
<select id=”related-posts-select” name=”related-posts-select”>
<option value=”0″>Select</option>
<?php
foreach ($p->posts as $thePost) {
?>
<option value=”<?php
echo $thePost->ID; ?>”><?php echo
$thePost->post_title.’ (‘.ucfirst(get_post_type($thePost->ID)).’)’; ?></option>
<?php
}
?>
</select>
</p>
<?php
} // end if count
wp_reset_query();
wp_reset_postdata();
}I have tried editing the latest version of aioseo and I have downloaded and tried your hacked version of aioseo, both had the same results.
Title tags on category pages == empty
Description tags added twice to all category pagesThis is unacceptable.
I have to completely agree with this, especially since we are using the most up to date version of the aioseo and the changes listed on your installation instructions make no sense. This means that we cannot update a plugin or we must wait for you to publish changes.
This also means that, without notice, someone can update aioseo and we need to go and fix it over and over again.
This was very poorly thought out.
I have it fixed, What I did was to put the post data into a local array and loop through that to show the options. Seemed like the easiest and fastest way to fix it.
Thanks much, I had actually narrowed it down to the loop you are referring to as being the problem and was just about to post that because I was not seeing how it can be fixed or why it was a problem. I’m assuming the reason for the other side effects also has to do with showing data for the last post used in the plugin as well. Really nice work.
I’d love to just change out the plugin for a better one, however, that is more work than I have time to put in since all the related values would need to be redone.
Not sure what direction I’ll take to fix it, but at least I have a better idea of where I’m headed at the moment.
Thanks again
I have also posted this in the support forum for that plugin, but it does not look very active there.
Well, I’ve made progress, set up a dev site and started deactivating plugins.
This is the one that is interfering:
Related: https://github.com/matthiassiegel/Related
These are the effects of the interference when this plugin in activated (in order of appearance on the admin page/post page)
1) Revisions list is truncated to 7 oldest (not even the most recent, but the oldest revisions)
2) Current Title, Description and Keywords do not appear in fields of All in One SEO Pack area
3) Title Attribute field completely missing from the All in One SEO Pack area
4) Menu Label field completely missing from the All in One SEO Pack areaI will now begin trying to figure out if I can fix this. I can’t deactivate this plugin on the live site because the live site relies heavily on this plugin.
I’d still appreciate any help, while I have a lot of PHP experience, I have very little experience debugging WP plugins.
Forum: Everything else WordPress
In reply to: why is the domain name storedSorry to disagree, but this is not a valid reason. When linking to something/anything on a site from a page on the same site, the domain name is not required.
/link/to/some/file.css
works just as well as
http://www.somesite.com/link/to/some/file.css
The first is relative from the site root (I call these absolute)
The second is a fully qualified URL (what most people call absolute)I know well that relative URLs do not work or would not work in a product like WP. But what I call absolute (relative from the site root) work perfectly fine. The only time you need a fully qualified URL is when you are linking to something on a different site.
I’m running the newest version of the all in one pack.
The theme appears to be sorta custom. It looks like the developer copied the twenty-ten theme and then made changes to it for the site.
The problem is that I can’t disable any of the existing plugins or change the theme on the site. The main reason being that I don’t know what effect this would have on the site and I can’t take the chance of screwing anything else up. It’s a live site, so what I can do is pretty limited.
I figured that the information is being stored correctly because it appears on the live page. For some reason it is just not being redisplayed on the admin page when you edit a page/post.
I could probably copy the entire thing to a test server, do the whole migration thing and do testing there, lots of work in this. I was just hoping that this has happened before and there might be an easy fix.