Needs review
Project:
Real-time SEO for Drupal
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Oct 2018 at 06:32 UTC
Updated:
13 Jul 2023 at 04:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
SaraKlasson commentedI get the same error for yoast_seo version “2.0.0-alpha3" on Drupal version 8.5.8
When I create new content I get validation error messages for all the required fields I have filled in. It looks like a loop that runs through the fields.
This happens although the fields are filled in correctly and the content is saved.
It is only for creating new content, not editing. This has happened on two different sites for me.
Comment #3
robin.ingelbrecht commentedThis is fixed in the dev version
Comment #4
gemalmHi Robin,
As I explained in the issue, when I have more than one field required I don't get the errors but if I only have the title fieled as required I get this error. I tested installing the last commit of the dev version.
Comment #5
SaraKlasson commentedHi, I am using 2.0.0-alpha3 to solve the problem described here https://www.drupal.org/project/yoast_seo/issues/2843302,
so thats why I am not using the dev version.
Comment #6
SaraKlasson commentedHi, I am using 2.0.0-alpha3 to solve the problem described here https://www.drupal.org/project/yoast_seo/issues/2843302.
I need the analysis method that requires no specific fields to be present, so thats why I am not using the dev version.
Comment #7
SaraKlasson commentedI am now using version “2.x-dev#9fb7e37" but when creating new content I still get validation error messages for all mandatory fields when the content has been saved.
Comment #8
SaraKlasson commentedThe problem is the line
this.$form.find('.yoast-seo-preview-submit-button').mousedown();in yoast_seo.js.It submits the whole form (not only the yoast part) with the empty required fields when the form loads, and then these error messages are shown after saving.
Comment #9
SaraKlasson commentedSo I found my problem now, which was on our end in a custom module. Yoast is calling the preview function on the node that I was creating and in some custom code there was a call to `$entity->toUrl()->toString()` which will throw an exception when the node isn’t actually created yet. So now I’m catching the exception and it works.
Comment #10
tbsiqueiraHi, I'm having the same issue, I tried @SaraKlasson solution but had no success.
Comment #11
kingdutchThanks for pinning down the issue Sara, that sounds like it should be fixed with #3110455: Metatags depending on URL cause errors for unsaved entities after updating to Drupal 8.8.0
Comment #12
edgarmxl commentedI am having the same issue, however, it seems adding '#limit_validation_errors' => [], into src/Form/AnalysisFormHandler.php:129 as:
Solved the issue.
Comment #13
nixou commentedI can confirm the bug is still present (for example when uploading an image in the node edition form) and the last patch yoast_seo-3010164-12.patch needs to be applied to solve it.