WordPress.org

Forums

All in One SEO Pack
[resolved] AIOSEO commandeered custom field entries (10 posts)

  1. nashvillegeek
    Member
    Posted 2 years ago #

    We are using Advanced Custom Fields in a multisite installation. In our custom field, there is a titled 'description'. When we activated AIOSEO, all of the 'description' custom field entries moved to the AIOSEO 'description' field. This is frustrating because there are hundreds of entries. Any idea on how to get those fields back to where they are supposed to be? I have never seen anything like this happen before.

    Also, there is a notice we've never seen that says, "Your database meta needs to be updated. 27 old fields remaining (Back up your database before updating.)"

    Could this possibly resolve the problem?

    Thanks

    http://wordpress.org/extend/plugins/all-in-one-seo-pack/

  2. Peter Baylies
    Member
    Plugin Author

    Posted 2 years ago #

    nashvillegeek,

    Yes, this is a feature... All In One SEO Pack used to use a meta field named description at one point, so this exists for backwards compatibility to migrate over old fields. That notice is your notification that those fields exist, and your mechanism for updating them. It does require that you press that button to update those fields, however.

  3. nashvillegeek
    Member
    Posted 2 years ago #

    Thank you for your response, Peter. Apparently, the button was pressed, which moved those fields from our custom post type description fields to the AIOSEO description field, which was not a desirable outcome. The database was backed up prior to the pressing of the button and work forged ahead for a few days. Now we see the button again, and many description fields in AIOSEO instead of their original place. If pressed, are you saying that the new entries will be moved into AIOSEO, as well? I need to prevent this from happening on other sites in the network.

    Do you have any suggestions on how to revert the moved entries back to their appropriate custom field without losing the entries which were entered after the button press? Perhaps a script that has the opposite affect. It seems I will need to rename our custom field name to avoid conflict with this feature of your plugin. Not sure of the impact that will have on previous entries.

    I appreciate any guidance.

  4. Peter Baylies
    Member
    Plugin Author

    Posted 2 years ago #

    nashvillegeek,

    I'd suggest restoring all of those description fields from your backup; the problem is that those description fields now have the same name as all the other AIOSEO description fields, so there's no good way to tell one from the other. Not having metadata with generic names like 'title' or 'description' is probably a good idea too, as some other plugins will try to use this as well. And yes, pressing that button will move those new entries as well.

  5. nashvillegeek
    Member
    Posted 2 years ago #

    Lesson learned. Can you tell me where I can find the description field those entries were moved to in the database? i.e. the AIOSEO description field

    thanks

  6. Peter Baylies
    Member
    Plugin Author

    Posted 2 years ago #

    nashvillegeek,

    The field is _aioseop_description in your postmeta table; the actual code for the update looks like this:

    $wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_aioseop_description' WHERE meta_key = 'description'");

  7. nashvillegeek
    Member
    Posted 2 years ago #

    Thank you. I can just reverse those meta keys to revert, and then rename the custom field meta to something more cryptic before using All In One SEO.

    Thank you for your help.

  8. Peter Baylies
    Member
    Plugin Author

    Posted 2 years ago #

    nashvillegeek,

    You're welcome, good luck with it!

  9. nashvillegeek
    Member
    Posted 2 years ago #

    That worked seamlessly. We could do this because we hadn't input any SEO descriptions yet.

    $wpdb->query("UPDATE $wpdb->postmeta SET meta_key = 'description' WHERE meta_key = '_aioseop_description'");

    then, to preserve custom field entries in the future, renamed custom field 'description' to something else:

    $wpdb->query("UPDATE $wpdb->postmeta SET meta_key = 'your_own_prefix_description' WHERE meta_key = 'description'");

    I actually did the updates in phpMyAdmin so the query was:

    UPDATE postmeta SET meta_key = 'description' WHERE meta_key = '_aioseop_description'

    Thanks again!

  10. Peter Baylies
    Member
    Plugin Author

    Posted 2 years ago #

    nashvillegeek,

    Awesome, that's fortunate!

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