meshedup
Member
Posted 9 months ago #
WordPress version: 3.4.1
WordPress SEO version: 1.2.5
I did this: Uncheck the "Disable the author archives" box in SEO -> Title and Metas -> Other
I expected the plugin to do this: To enable author pages for each author (author.php).I also tried clearing Wp-cache many times.
Instead it did this: The plugin still redirects author page links to homepage even after unchecking the respective settings box
Site i am referring to : http://shrewdgeek.com
http://wordpress.org/extend/plugins/wordpress-seo/
WP: 3.4.1
WP SEO: 1.2.8.3
I'm experiencing the same. No other plugins active. Using the default theme TwentyEleven.
[update]
As a temporary solution remove the disable-author option of the function archive_redirect in /plugins/wordpress-seo/frontend/class-frontend.php. Leaving it like this:
function archive_redirect() {
global $wp_query;
$options = get_wpseo_options();
if ( ( isset( $options['disable-date'] ) && $options['disable-date'] && $wp_query->is_date ) || ( isset( $options['disable-post_formats'] ) && $options['disable-post_formats'] && $wp_query->is_tax( 'post_format' ) ) ) {
wp_redirect( get_bloginfo( 'url' ), 301 );
exit;
}
}
meshedup
Member
Posted 8 months ago #
thanks brasofilo,
Atleast some replied with some kind of working solution.I don't know why the developer doesn't reply to support queries.
Glad someone replied - Thanks, yes this worked. Silly to have to do this, but glad it worked
Dzynit
Member
Posted 7 months ago #
This also worked for me, but definitely isn't a good solution. On upgrade, the problem will come back and the plugin will have to be re-edited again.
There must be an issue on save when the needed checkboxes in admin are unchecked - that they are not updating the database options correctly.
If anyone is willing to tinker with their database to get a permanent solution that doesn't require editing the plugin all the time, please post what you did here.
Dzynit
Member
Posted 6 months ago #
I had trouble last week trying to reply an update to my previous post. Brasofilo's suggestion above didn't fully work for me. I had to comment out the entire archive_redirect function.
Comment out lines 903 – 913 of the plugins/wordpress-seo/frontend/class-frontend.php file
// function archive_redirect() {
// global $wp_query;
// $options = get_wpseo_options();
// if (
// ( isset( $options['disable-date'] ) && $options['disable-date'] && $wp_query->is_date ) ||
// ( isset( $options['disable-author'] ) && $options['disable-author'] && $wp_query->is_author ) ||
// ( isset( $options['disable-post_formats'] ) && $options['disable-post_formats'] && $wp_query->is_tax( 'post_format' ) )
// ) {
// wp_redirect( get_bloginfo( 'url' ), 301 );
// exit;
// }
Uffe Fey
Member
Posted 5 months ago #
I confirm this bug is present in 1.2.8.7. I am pretty sure the problem is related to settings not being saved or read properly.
matthiaswh
Member
Posted 5 months ago #
I (finally) found the source of this bug. The author archive redirecting to the homepage is saved in the options under the key 'disable-author'. The problem for me was that this key was in two different options records: wpseo & wpseo_titles. This is most likely due to the author changing the location where this setting is saved at some point, but the upgrade process didn't clear the old record.
To fix this:
1. In the WordPress admin go to SEO -> Titles & Meta, click the Other tab & ensure Disable The Author Archives is unchecked.
2. Go to your database and find the options table for your site (wp_options or wp_XX_options most likely)
3. Find both rows with option_name set to wpseo and wpseo_titles
4. If the key "disable-author" is set in either of them you can remove it entirely, or change the value of it to "off"
If it is on, the option_value for either/or both of those rows will include: s:14:"disable-author";s:2:"on"; That's the part you can remove.
Dzynit
Member
Posted 4 months ago #
The option_name in the wp-options table to search for is wpseo. Obviously the checkbox is no longer working. If it was set to "on" before this issue started, the only way at this point is to edit it directly in the database. (Which is a better solution than editing the plugin as I showed in my previous post.) I hope this is corrected soon though, because we have a couple sites that do not have database access as I'm sure many people either don't or aren't familiar enough with editing them.
isolde100
Member
Posted 4 months ago #
I have the same problem. Author pages not working. The most recent update has not fixed this. Sigh . . . still waiting for BUG fix.
kprimdal
Member
Posted 4 months ago #
Workaround, add this to the functions.php in the current theme folder:
// Remove bug in WordPress SEO by Yoast where Author achive is not working
global $wpseo_front;
remove_action( 'wp', array( $wpseo_front, 'archive_redirect' ), '10' );
kprimdal
Member
Posted 4 months ago #
Will however also have influence and enable date archive if that was enabled, but then just add a new function without the Author Arhcive check
thehrisworld
Member
Posted 2 months ago #
didn't find anything in any of the tables with options in the name...
commented the 10 lines out as noted by Dzynit, and receive a T_PUBLIC error (not familiar with PHP)...
tried kprimdal's suggestion in the functions.php file and all it did was appear on the top of every page and post...
Google is ramping up the rel=author and if push comes to shove, I'm going to deactivate WordPress SEO in favor of another until this bug gets fixed...
isolde100
Member
Posted 1 month ago #
Kprimdal,
Your solution, which was working until the latest update of Yoast SEO, is no longer working. Any new solution?
Even with the latest plugin version, I still have to edit the setting directly in the wp_options database table as matthiaswh described above. I've not found any other work-arounds if you don't have access to edit the database.
Niramaya
Member
Posted 3 weeks ago #
Have been dealing with identical issue but for date-based archives. No luck getting feedback from dev and as I'm just now seeing this thread, I worry that tinkering with code may not yield desired result. Has anyone found a reasonable fix? Thanks for *any* pointers!
My post: http://wordpress.org/support/topic/plugin-auto-disables-date-based-archives?replies=1
If you're comfortable editing in the database, the same solution from matthiaswh will work for you. The date-based is in the same place in the wp_options table and it's right after the disable-author part.
Hello I have the same problem