Home › Forums › Calendar Products › Community Events › Yoast WordPress SEO conflict with Community Events
- This topic has 12 replies, 2 voices, and was last updated 9 years, 12 months ago by Casey.
-
AuthorPosts
-
April 1, 2014 at 7:58 am #126101StephenParticipant
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?April 2, 2014 at 6:21 am #126721CaseyParticipantagencydominion,
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-
April 10, 2014 at 2:19 pm #130728CaseyParticipantI 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-
April 10, 2014 at 2:23 pm #130743StephenParticipantHey 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!April 10, 2014 at 2:45 pm #130821CaseyParticipantagencydominion,
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-
April 11, 2014 at 11:52 am #131321CaseyParticipantagecydominion,
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-
April 17, 2014 at 1:21 pm #135517StephenParticipantHi 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.phpThe 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
April 17, 2014 at 1:58 pm #135536CaseyParticipantStephen,
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-
April 17, 2014 at 2:01 pm #135542StephenParticipantHi Casey,
We deactivated WordPress SEO, and the issue still remained with all the other custom post meta on an event.April 17, 2014 at 2:02 pm #135546CaseyParticipantStephen,
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-
April 22, 2014 at 8:50 pm #140068CaseyParticipantI 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-
April 30, 2014 at 2:19 pm #146799StephenParticipantHi 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.
ThanksApril 30, 2014 at 8:00 pm #147012CaseyParticipantThanks 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-
-
AuthorPosts
- The topic ‘Yoast WordPress SEO conflict with Community Events’ is closed to new replies.