Yoast WordPress SEO conflict with Community Events

Home Forums Calendar Products Community Events Yoast WordPress SEO conflict with Community Events

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #126101
    Stephen
    Participant

    Hello,
    When a Community Event is added, if the Yoast SEO Meta is added before the draft has been published, it copies the Meta from the Event to the Organizer and Venue. I’ve tired updating to 3.5 on a development site as well, and I have the same issue.
    Any way around this?

    #126721
    Casey
    Participant

    agencydominion,
    Thanks for reaching out! I’m not very familiar with the Yoast SEO plugin, but I would reach out to the developer and see if there’s a way to disable the SEO meta from being added for certain post types (Organizer and Venue in this case). Give that a shot and then let me know if we can help further.

    Thanks! πŸ™‚

    -Casey-

    #130728
    Casey
    Participant

    I just wanted to follow up and see if you’re all set here or if you still have further questions. Just let me know if you need further help or if I should go ahead and close out this thread. Thanks! πŸ™‚

    -Casey-

    #130743
    Stephen
    Participant

    Hey Casey,
    No, I still haven’t figured it out, perhaps your development team can reach out to the Yoast SEO plugin developer to figure out the issue. I’m surprised you haven’t heard for Yoast SEO it has almost 10 million downloads: https://wordpress.org/plugins/wordpress-seo/

    I would imagine that someone else has used this combinations of plugins.
    Thanks!

    #130821
    Casey
    Participant

    agencydominion,
    I’m definitely familiar with what Yoast does, but I don’t have much personal experience with the plugin, so I couldn’t speak to specific conflicts with it. I’ll task one of our developers with taking a quick glance at this to see if this is something conflicting in the Community add-on or an issue within Yoast. Please stand by. Thanks! πŸ™‚

    -Casey-

    #131321
    Casey
    Participant

    agecydominion,
    I just heard back from one of our developers, and here’s what they had to say:

    This is definitely a bug in Yoast. Specifically, in WPSEO_Metabox::save_postdata(), it fails to check if the passed $post_id matches $_POST[‘post_ID’] before proceeding to update $post_id with data from $_POST.

    If they want to try to hack around it, they can hook into publish_tribe_events, find the anonymous object that yoast used to hook up the WPSEO_Metabox callbacks, and then remove_action the save_postdata callback.

    So, it sounds like your best bet is to reach out to Yoast and see if they have any more insight into this on their end. Feel free to let us know if you have any other questions! Thanks! πŸ™‚

    -Casey-

    #135517
    Stephen
    Participant

    Hi Casey,
    We found that it wasn’t an issue with Yoast, it just made the problem worst. We have found an issue in the function publishAssociatedTypes which is on line 2836 of the-events-calendar.class.php

    The issue is that the wp_update_post( $venue_post ); and wp_update_post( $org_post ); functions, in addition to updating the Venue and Organizer post status, will also copy all metadata from the Event into the Venue / Organizer.

    There is info detailing this behaviour on http://codex.wordpress.org/Function_Reference/wp_update_post

    Our solution would be to replace:

    wp_update_post( $venue_post );

    with:

    global $wpdb;
    $wpdb->update(
    $wpdb->posts,
    array(
    ‘post_status’ => ‘publish’
    ),
    array( ‘ID’ => $venue_post->ID ),
    array(
    ‘%s’,
    ),
    array(
    ‘%d’
    )
    );

    and

    wp_update_post( $org_post );

    with:

    global $wpdb;
    $wpdb->update(
    $wpdb->posts,
    array(
    ‘post_status’ => ‘publish’
    ),
    array( ‘ID’ => $org_post->ID ),
    array(
    ‘%s’,
    ),
    array(
    ‘%d’
    )
    );

    Is this something your team is aware of?

    Thanks

    #135536
    Casey
    Participant

    Stephen,
    Unfortunately, we’ll have to agree to disagree here, since our plugin is using WordPress’s core API function, and it’s never a good idea to modify the database directly. The fix that you proposed will also break numerous things, most notably caching.

    Since there’s not an issue when Yoast is deactivated, I would reach out to their team to see if they’re aware of the previous issue that was raised by our developer.

    Thanks and let us know if you have further questions!

    -Casey-

    #135542
    Stephen
    Participant

    Hi Casey,
    We deactivated WordPress SEO, and the issue still remained with all the other custom post meta on an event.

    #135546
    Casey
    Participant

    Stephen,
    Can you try deactivating all other plugins to see if that resolves the issue? If so, then try reactivating them one-by-one to determine if another plugin is the culprit. Give that a try and let me know what you discover. Thanks! πŸ™‚

    -Casey-

    #140068
    Casey
    Participant

    I just wanted to follow up and see if you’re all set here or if you still have further questions. Just let me know if you have further questions or if I should go ahead and close out this thread. Thanks! πŸ™‚

    -Casey-

    #146799
    Stephen
    Participant

    Hi Casey,
    We built custom meta boxes into our theme, and the issue affected them as well. Our solution worked to fix that. You can close the thread, but I wouldn’t say it is resolved.
    Thanks

    #147012
    Casey
    Participant

    Thanks for the clarification here Stephen. Since I can’t offer any further help here, I’ll go ahead and close out this thread. Feel free to start a new thread if you have further questions, or need further assistance. Thanks! πŸ™‚

    -Casey-

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Yoast WordPress SEO conflict with Community Events’ is closed to new replies.