All in One SEO Pack
datas hide from page editor (2 posts)

  1. samy.garfield
    Posted 4 years ago #


    I filled the all fields, in seo's form in the page editor. The pages are generated with that datas, but those datas hide from seo's form in the page editor.

    Any idea?


  2. bkjproductions
    Posted 4 years ago #

    I am having the same trouble since upgrading to WP 3.3.2.
    Editing an existing post (in my case, a custom post type), the text that was previously entered in the AIOSEO fields does not appear. If I put in new text, it does not appear when the page re-loads after a submit.
    BUT, if I go back to the List view of posts, the changed text shows up in the columns. Fortunately, if I do not touch the AIOSEO fields during editing, data is not lost.

    However, creating a NEW post (since WP 3.3.2 upgrade) causes different behavior. The text appears in both places: List view of posts or Edit post page.

    I think something has changed about how WP is dealing with the current post and revisions? Looking in AIOSEO's source code aioseo_functions.php around line 338, it's using a global $post.
    On an existing post that is pre-WP 3.3.2, this value is
    $post_id: 106007
    when in reality the post ID is 1060 (when I view the GET parameter)

    On a post created post-WP 3.3.2, this value is
    $post_id: 122624 for both the global $post->ID and GET.
    global $post;
    $post_id = $post;
    if (is_object($post_id)) $post_id = $post_id->ID;

    So I have put in this change:

    global $post;
    $post_id = $post;
    echo "post_id: " . $post_id->ID . "
    if (is_object($post_id)) $post_id = $post_id->ID;
    $post_id = intval(@$_GET['post']);
    echo "post_id: $post_id

    There is a bit of a risk here, perhaps, because I'm taking the ID from the GET parameter, but that IS the thing that's currently being edited. I'm turning whatever it might be into an integer just in case.
    Knock on wood this will work without losing data!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • All in One SEO Pack
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic