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

Saving a post leads to crash #13

Open
ckanitz opened this issue Apr 1, 2020 · 1 comment
Open

Saving a post leads to crash #13

ckanitz opened this issue Apr 1, 2020 · 1 comment

Comments

@ckanitz
Copy link

ckanitz commented Apr 1, 2020

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

@Dinamiko
Copy link
Contributor

Dinamiko commented Apr 2, 2020

Hi @ckanitz,

that´s because Inpsyde\MultilingualPress\YoastSeoSync\TranslationUi\Post\Field\Title::sanitize is expecting a string but for some reason is receiving a null value.

as a quick fix you can try to remove the string type hint in method signature, so change this:
public static function sanitize(string $value): string
to this:
public static function sanitize($value): string

In order to understand why is receiving a null value, I´ll need a way to reproduce the issue locally, will be great if you can provide the steps to reproduce the issue, thanks.

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

No branches or pull requests

2 participants