Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix yoast breadcrumbs front #1079

Merged
merged 2 commits into from
Nov 21, 2021
Merged

Fix yoast breadcrumbs front #1079

merged 2 commits into from
Nov 21, 2021

Conversation

herrvigg
Copy link
Collaborator

From #1077 by @Komarovski

Hello everyone, I've made some frontend fixes for Yoast SEO module that prevent outputting wrong language data in breadcrumbs from indexable tables and also added filters for schema, opengraph and next|prev links.

Tested on: Wordpress version: 5.8.1 qTranslate XT version: 3.11.0 Yoast SEO version: 17.4

Copy link
Collaborator Author

@herrvigg herrvigg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few questions

modules/wp-seo/wp-seo-front.php Outdated Show resolved Hide resolved
modules/wp-seo/wp-seo-front.php Outdated Show resolved Hide resolved
modules/wp-seo/wp-seo-front.php Outdated Show resolved Hide resolved
modules/wp-seo/wp-seo-front.php Outdated Show resolved Hide resolved
@herrvigg herrvigg added the module: yoast Integration with yoast label Nov 14, 2021
@herrvigg
Copy link
Collaborator Author

herrvigg commented Nov 21, 2021

Pushed a few fixes. I don't use these features myself so I trust you. I think we can merge this.

@herrvigg herrvigg merged commit 39d0843 into master Nov 21, 2021
@herrvigg
Copy link
Collaborator Author

Merged in master so more people can test. If you spot new errors let us know.

@herrvigg
Copy link
Collaborator Author

Perhaps we should keep your comments somewhere in the wiki, the first part fort he indexation might be useful for the users:

Use indexation only in backend on "publish/update" events to save all languages data in indexable tables.
If you allow indexation on the frontend - then indexable table will save data of the first visited page, all other languages data will be missed/filtered/gone/didn't saved.
After all this fixes everyone need to install "Yoast Test Helper", go to "Instruments -> Yoast Test" and reset "Indexables & migrations table", then go to "SEO -> Instruments" and start SEO data optimization.
This filters "wpseo_should_save_indexable", "wpseo_indexing_data" - right now works only on frontend, so using of "!is_admin()" is pointless, but maybe in future this filters will work on backend, that's why I have leaved "!is_admin()" below.
Unfortunately I didn't found how to totally disable indexable feature, Yoast documentation is very poor to quickly understand how everything works.
Also be advised that after Yoast have added indexables - now you also need to provide breadcrumb titles and its translations even if they are same as in title. If you wouldn't provide breadcrumb title & translation - Yoast will only index current language title.

@herrvigg herrvigg deleted the yoast/breadcrumbs branch November 27, 2021 12:04
@herrvigg
Copy link
Collaborator Author

herrvigg commented Dec 1, 2021

After all this fixes everyone need to install "Yoast Test Helper",

@Komarovski what is the impact if we don't do so?

@Komarovski
Copy link
Contributor

After all this fixes everyone need to install "Yoast Test Helper",

@Komarovski what is the impact if we don't do so?

If don't do so - Yoast SEO will use old data from indexables table that could not have all translations in titles, descriptions, breadcrumbs.
Other way to update indexables table so it could store all translated content without using Yoast Test Helper - is manually update all posts, pages, custom post types items, categories, tags, custom taxonomy terms, author pages.

After updating to qTranslate-XT 3.11.1 version - this operation needs to be done one time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: yoast Integration with yoast
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants