GithubHelp home page GithubHelp logo

inpsyde / multilingualpress-yoast-seo-sync Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 3.0 341 KB

This is a simple add-on for the MultilingualPress plugin to synchronize the post metadata of the Yoast SEO plugin between translated posts.

License: GNU General Public License v2.0

PHP 97.92% Shell 1.98% JavaScript 0.09%

multilingualpress-yoast-seo-sync's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

multilingualpress-yoast-seo-sync's Issues

Simply does nothing

Hi,

this plugin simply does nothing, obviously it is outdated?
No YOAST settings are copied from one post/page to those of the linked language.

YOAST 7.1 free
WP 4.9.4 multisite
PHP 7.0.25
MultilingualPress 2.11.0

Fatal error: Uncaught DomainException: Empty Term.

Steps to reproduce

  1. Install latest versions of MLP Yoast (2.1.1) and MLP (3.3.0)
  2. Connect one site
  3. Create a new post category term

What should happen
I should see the Yoast tab correctly in translation metabox.

What happened instead
A fatal error is displayed:
Fatal error: Uncaught DomainException: Empty Term. in .../wp-content/plugins/MultilingualPress-Yoast-SEO-Sync/src/TranslationUi/Term/Repository.php on line 41

HTML markup is removed from category descriptions when Yoast SEO is used

Steps to reproduce

  1. Install latest versions of MLP Yoast(2.1.2) and MLP (3.3.0)
  2. Connect one site
  3. Create a category and fill the description using the WYSIWYG editor (and add some markup)
  4. Go to the linked category in the other language
  5. Save the linked category in the other language
  6. The HTML markup in the original language is removed

What should happen
The HTML markup should be kept.

What happened instead
The HTML markup is removed.

Notes

  • The WYSIWYG editor is added to term descriptions by the Yoast plugin
  • MLP loads meta boxes for all terms on every term page
  • The save action used by MLP removes all html tags from the description

Update for MLP 3.x and WP 5.x

We need exactly this plugin for Multilingual Press 3.x with WP 5.x.
Support told us, the development for this plugin already started.

Is there any scheduled release date?

Yoast plugin add rich text editor in Categories but MultilingualPress strips the html tags

Description
Yoast plugin adds advanced editor to term description, in MLP metabox, the term description field value is sanitized using sanitize_textarea_field resulting in HTML tags removed in remote term descriptions when term is saved.

Steps to reproduce the issue

  • Create a post category and in the description create an H1 tag title.
  • Connect it to another site through MLP translation Metabox.
  • Once connected, edit category in the remote site, click update button.
  • Go back to source site edit category.

What should happen?
H1 tag in description should exist.

What happened instead?
H1 tag in description does not exist.

Proposed solution
In order to prevent the above, we can use wp_kses_post which also sanitizes but allows basic HTML tags. In order to do so, in src/multilingualpress/TranslationUi/Term/MetaboxFields.php in FIELD_DESCRIPTION metabox field, replace sanitize_textarea_field to wp_kses_post.

Saving a post leads to crash

Hi there,

with the SEO-Sync plugin activated saving a post sometimes leads to There has been a critical error on your website. Please check your site admin email inbox for instructions.

WP: 5.3
Editor: Classic Editor

WP_DEBUG_LOG:

[01-Apr-2020 08:40:29 UTC] PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Inpsyde\MultilingualPress\YoastSeoSync\TranslationUi\Post\Field\Title::sanitize() must be of the type string, null given, called in /wordpress/wp-content/plugins/multilingualpress/src/multilingualpress/TranslationUi/Post/MetaboxField.php on line 99 and defined in /wordpress/wp-content/plugins/multilingualpress-yoast-seo-sync/src/TranslationUi/Post/Field/Title.php:53
Stack trace:
#0 /wordpress/wp-content/plugins/multilingualpress/src/multilingualpress/TranslationUi/Post/MetaboxField.php(99): Inpsyde\MultilingualPress\YoastSeoSync\TranslationUi\Post\Field\Title::sanitize(NULL)
#1 /wordpress/wp-content/plugins/multilingualpress-yoast-seo-sync/src/TranslationUi/Post/MetaboxAction.php(209): Inpsyde\MultilingualPress\TranslationUi\Post\MetaboxField->requestValue(Object(Inpsyde\MultilingualPress\Framework\Http\PhpServerRequest), Object(Inpsyde\MultilingualPress\TranslationUi\MetaboxFieldsHelpe in /wordpress/wp-content/plugins/multilingualpress-yoast-seo-sync/src/TranslationUi/Post/Field/Title.php on line 53
[01-Apr-2020 08:40:35 UTC] PHP Warning:  Illegal string offset 'plugin_name' in /wordpress/wp-admin/includes/class-wp-privacy-policy-content.php on line 96
[01-Apr-2020 08:40:35 UTC] PHP Warning:  Illegal string offset 'policy_text' in /wordpress/wp-admin/includes/class-wp-privacy-policy-content.php on line 97

Also there are some non-unique-id warnings on my console which can be tracked down to MLP metabox using the same IDs for the taxonomy inputs as the core-sidebar.

Let me know if you need any further information

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.